SECAM D′R/D′B line-sequence error
Reversing the active SECAM component order relative to identification sends each line through the wrong decoder branch; wrong carrier references can tint even neutral grey.
Visible effect
The right component on the wrong line
Start with the colour bars, then choose the grey ramp. Wrong identification changes the colours and gives grey a tint. Switch Receiver identification to Follow actual order: settled colours return, although the active sequence remains reversed.
The fault is a disagreement between the transmitted line order and the receiver’s interpretation. Here the transmitter reverses each complete active-line FM component, including its resting carrier, while identification continues to announce the nominal order. The receiver initially trusts that order. D′R and D′B carry different signed colour differences, so their labels also select different decoding arithmetic.
A uniform patch has the same wrong colour on consecutive lines. Horizontal colour boundaries reveal which component came from the preceding line. Alternating stripes alone do not identify this fault: their presence depends on the scene and decoder, rather than being a mandatory SECAM symptom.
Physics
Follow the carrier and its label
SECAM sends one colour difference per line. D′R describes red relative to encoded lumaA luminance-related signal Y′ computed from transfer-encoded R′G′B′ components. Unlike physical luminance, it is not proportional to light.; D′B describes blue relative to luma. Frequency modulation, or FM, represents that difference as a change in carrier frequency. The SECAM colour path introduces the two components and their correction filters.
The receiver must know which component arrived. Identification tells its alternating line switch which lines are red and which are blue. That choice selects the resting frequency to subtract, the frequency-to-difference scale to divide by, and the output destination. A one-line memory supplies the component absent from the current line.
Our selected transmitter fault reverses the active FM sequence relative to identification. Both component data and the associated resting carrier move together. A nominal red slot therefore contains a complete blue FM line. Sync and luma remain nominal. Specifically, the line-identification reference on the back porch—the blanked interval after horizontal sync and before the active picture—keeps its nominal carrier order. Only the active picture's FM component order reverses. We declare this disagreement without generating the identification waveform; reversing identification together with the active sequence need not cause the same fault.
Keep nominal order models a receiver whose line switch stays tied to that reference. Follow actual order gives the receiver perfect knowledge of the active sequence. It is a comparison case, not an acquisition algorithm. A real receiver may identify the actual sequence, reject contradictory identification, suppress colour, or reacquire; its observed response need not match the fixed-switch experiment.
We use the conventional SECAM component definitions without choosing a radio-frequency (RF) transmission system. The model isolates ideal frequency discrimination and line recombination. It omits FM bandwidth, correction-filter transients and the identification waveform. Its per-pixel frequencies describe a local steady response; they do not constitute a generated composite signal.
Mathematics
The wrong reference leaves an offset
Start with dimensionless gamma-coded RGB, nominally zero to one. The prime marks encoded video components, not linear-light radiance. Luma is the weighted encoded sum:
For a constant colour patch, the matched pre-emphasis and de-emphasis leave the steady difference unchanged. The slopes are 0.280 MHz per unit D′R and 0.230 MHz per unit D′B; they are scaling coefficients, not maximum excursions. Frequencies in MHz are:
With reversed active order and nominal receiver identification, the blue carrier is decoded as red and the red carrier as blue. A hat marks the recovered value. The following flat-patch equations assume the two neighbouring lines have the same colour; decimals are rounded here, while the code uses the frequency ratios directly.
This is more than exchanging two numbers. Grey has D′R = D′B = 0, yet the wrong branches recover −0.55804 and +0.67935. Mid-grey RGB (0.5, 0.5, 0.5) becomes approximately (0.7934, 0.2629, 0.9514) before display clipping. Correctly following the actual order removes these offsets and recovers the original flat colour.
At a boundary we keep the two source lines distinct. Let n index consecutive transmitted rows. The receiver decodes one dimensionless number qₙ from line n using its chosen branch. The previous line contributes qₙ₋₁. If the receiver expects red on line n:
If it expects blue instead:
Reconstruct with the current row's luma Y′ₙ. The subscript o denotes the recovered RGB output:
Solving green this way preserves encoded luma before clipping. Even a nominal decoder combines colour from two lines, so horizontal colour boundaries can change. That baseline must not be mistaken for a sequence fault.
Shader
Reconstruct the pair before displaying it
The shared GLSL listing is compiled by the playground. It has two input RGB samples and no persistent framebuffer. Its analytic frequency path stands in for ideal FM encode/decode; the previous sample stands in for a one-line delay within a static field snapshot.
// WHAT: Recover wrong colour when SECAM line order disagrees with identification.
// HOW: Encode each line's selected FM frequency, decode with the expected branch,
// then combine the current and preceding lines around unchanged encoded luma.
// WHY: D′R and D′B use different resting frequencies, slopes and RGB destinations.
// RGB inputs are gamma-coded, dimensionless; output RGB is unclipped.
// sourceY is top-down, normalised over the uncropped synthetic 288-row field.
// reversed and tracking are discrete 0/1 values; tracking is ideal knowledge,
// not a simulation of identification acquisition. Filtering and FM noise omitted.
// 1. Field sampling. The line before row zero extends the first row's colour.
vec3 secamSourceRows(float sourceY) {
float row = clamp(floor(sourceY * 288.0), 0.0, 287.0);
return vec3(row, (row + 0.5) / 288.0,
(max(0.0, row - 1.0) + 0.5) / 288.0);
}
// x = ideal decoded difference; y = receiving branch (1 red, 0 blue).
vec2 secamDecodeLine(vec3 rgb, float row, float reversed, float tracking) {
bool nominalRed = mod(row, 2.0) < 0.5; // GLSL mod also handles warm-up row -1.
bool sentRed = nominalRed != (reversed > 0.5);
bool receiveRed = tracking > 0.5 ? sentRed : nominalRed;
float luma = dot(rgb, vec3(0.299, 0.587, 0.114));
vec2 differences = vec2(-1.902 * (rgb.r - luma), 1.505 * (rgb.b - luma));
// 2. MHz throughout. Reverse the complete component, not just its data input.
float frequency = sentRed ? 4.40625 + 0.280 * differences.x
: 4.25000 + 0.230 * differences.y;
float recovered = receiveRed ? (frequency - 4.40625) / 0.280
: (frequency - 4.25000) / 0.230;
return vec2(recovered, receiveRed ? 1.0 : 0.0);
}
// 3. Both samples are from one field snapshot at the same horizontal position.
vec3 applySecamLineSequence(vec3 current, vec3 previous, float row,
float reversed, float tracking) {
vec2 now = secamDecodeLine(current, row, reversed, tracking);
vec2 delayed = secamDecodeLine(previous, row - 1.0, reversed, tracking);
float redDifference = now.y > 0.5 ? now.x : delayed.x;
float blueDifference = now.y > 0.5 ? delayed.x : now.x;
float luma = dot(current, vec3(0.299, 0.587, 0.114));
float red = luma - redDifference / 1.902;
float blue = luma + blueDifference / 1.505;
float green = (luma - 0.299 * red - 0.114 * blue) / 0.587;
return vec3(red, green, blue);
}- Source textureGamma-coded video
- Ideal FM branches and one-line recombinationOne fullscreen pass · three texture reads per pixel
- Map uncropped source to a 288-row field
- Sample current and preceding row centres
- Select complete transmitted FM components
- Decode using nominal identification or ideal following
- Combine current and delayed colour differences
- Restore native luma detail, mix and clip for display
- Display output
- Aspect-fill maps the output pixel into the source. Coordinates are normalised, y down from the source top. Divide the entire uncropped source height into 288 synthetic field rows; each is a consecutive transmitted line, not an interlaced full-frame row.
- Use
secamSourceRowsto find row n and the centres of the current and preceding rows. Sample both with linear texture filtering at the same source x. For n = 0, extend the first row's colour into a virtual line −1 with the preceding parity; this primes memory without inventing a black border. - Row zero is nominally red by local convention.
reversedandtrackingaccept only 0 or 1. These switches choose complete branches; they do not interpolate identity or represent RF polarity. - Decode each line with its own transmitted carrier and expected reference. Combine the two decoded scalars using the current receiving destination, then reconstruct RGB without clipping.
- A third texture read supplies native source RGB. Add the same luma correction to all recovered channels to retain native luma detail between field-row centres. Chroma remains on the field grid. Finally blend and clip for display.
Here C is an RGB vector, ΔY′ is the native luma correction and m is Effect mix. The subscripts rec and blend name the corrected reconstruction and the comparison blend. The native luma correction is zero at a sampled row centre. One fullscreen pass uses three texture reads per output pixel. Parity and the previous-row address are established before cropping, so changing the pane aspect does not redefine the transmitted order. Both video samples come from one decoded frame; elapsed interline time and interlaced motion are omitted.
Notes
- This example reverses complete FM components relative to a fixed identification reference. Swapping only D′R/D′B data while leaving carrier references in their nominal slots is a different fault and has no resting-frequency offsets.
- Ideal following changes the receiving references and destinations immediately. It does not model automatic colour suppression, sequence detector thresholds, reacquisition time, line identification pulses or field identification signals.
- The row grid is a synthetic field sampling choice, not a recreation of a full 625-line interlaced waveform. There is no vertical blanking, field-order transition, motion-compensated memory, or RF transport.
- Difference pre-emphasis, carrier anti-bell/bell filtering, FM limiting, noise and switching transients are omitted. At edges, this is a component reconstruction approximation; use the correction-filter experiment to study horizontal filter response.
- Grey neutrality is deliberately lost under wrong carrier identification. This differs from deviation-gain error, where correct resting references preserve zero differences.
- RGB clipping can alter the measured output luma. The conservation claim applies to unclipped encoded values and does not imply constant physical display luminance. Browser sources stand in for encoded video; historical colour primaries and transfer functions are not reconstructed.
References
ITU-R BT.470-6 — Table 2 §§2.5, 2.11–2.13, 2.18 and notes 23–24 — defines the SECAM signed components, two resting carriers, deviation slopes and identification conventions. Reversing active components relative to a retained identification reference is the declared teaching fault; the affine wrong-branch response is derived here.
Philips/NXP — SAA7114, rev. 03 §8.1.3.1, pp. 20–21 and Fig. 10 — documents switch-controlled SECAM frequency-offset compensation, sequence detection, colour suppression and line-delay recombination. The ideal fixed and sequence-following receivers are comparison assumptions, not predictions of this chip’s fault response.