PAL/NTSC colour-subcarrier frequency error

A mistuned encoder changes both burst and picture-chroma frequency; colour depends on whether the decoder follows it or retains a residual frequency error.

Visible effect

Colour depends on the remaining frequency difference

A frequency error changes how fast the encoder’s colour carrier cycles. If the receiver follows that frequency and its phase, the recovered colour can remain correct. If a frequency difference remains, the relative angle keeps changing: NTSC colours drift with scan position and observation time.

Phase alignment once per line removes the accumulated error at burst, but a frequency difference builds a new error before and during the visible line. PAL restores its alternating colour axis; combining adjacent lines helps only to the extent that their errors and colours allow it.

Start with NTSC · line phase reset: each colour bar changes across its width. Compare Tracked reference for unchanged colour, then NTSC · free reference and scrub Observation time. Use the grey ramp to check that neutral grey stays neutral. A constant burst phase offset has a fixed angular error; a frequency error accumulates angle with elapsed time.

Physics

The receiver may follow the faulty encoder

The encoder uses a colour subcarrier, an oscillation whose amplitude and angle carry colour differences. A mistuned oscillator shifts both active-picture chroma and burstA short reference waveform in the blanking interval that lets a PAL or NTSC decoder recover colour-subcarrier phase and amplitude., the short reference in the blank interval before the picture. This fault belongs to transmitter video formation; it is distinct from mistuning the radio-frequency (RF) vision carrier.

A receiver recovers a local reference from burst. A phase-locked loop (PLL) adjusts an oscillator to follow a received reference. Settled tracking can follow a non-nominal colour frequency. Therefore transmitter error relative to a standard and residual error relative to the decoder are different quantities. The experiment holds the receiver response explicit rather than inventing a universal capture range.

1 · Encoder runs too fast

Dashed: nominal. Solid: faster encoder. This exaggerated waveform illustrates frequency; burst and picture chroma move together, without an independent burst-phase fault.

2 · Tracking removes the difference

Dashed outer trace: recovered reference. Solid: transmitted carrier. Their peaks coincide because settled tracking follows frequency and phase. Relative phase stays zero, so this component model recovers unchanged colour.

3 · Phase reset leaves a slope

At +2000 Hz, alignment at burst is followed by +3.60° at active start and +41.04° at its end. Equal phase errors recur on each line; PAL restores opposite axis signs.

4 · A free reference keeps accumulating

At +10 Hz, source row 0 advances from about +45° at 12.5 ms (solid) to +135° at 37.5 ms (dotted). A 25 ms interval adds 90°; resetting each line would remove this time-dependent offset.

Phase plots use the same scale: zero at the bottom dashed line, increasing phase upward. The frequency waveforms are schematic; the phase values use the executable model.

Three limiting cases separate the mechanism. Ideal tracking follows frequency and phase. Line phase reset aligns the reference at each burst centre but keeps its nominal frequency during the line. A free reference keeps nominal frequency after an initial alignment at time zero. The latter two are controlled reference models, not a simulation of a particular receiver’s PLL acquisition.

The residual difference accumulates phase during scanning. NTSC decodes it as a changing colour angle. PAL (Phase Alternating Line) represents colour using U and V, scaled blue-minus-luma and red-minus-luma components. It reverses the transmitted V component on alternate lines and restores that sign on reception. A delay-line decoder combines current and previous chroma; with a free reference those lines have different phase errors. Averaging does not universally restore correct colour.

See colour systems and regional standards for encoding and reference conventions, and the signal path for line timing. Burst amplitude, identification and picture timing remain correct in this experiment.

The signal-frequency and phase explanation supplies the cycles-to-radians relation used below. Vision modulation and VSB instead concerns the separate RF carrier; its frequency is held correct here.

Mathematics

Frequency difference becomes angle through elapsed time

Let Δf be transmitter frequency minus nominal frequency, in hertz (cycles per second). The nominal-free reference also makes this the residual difference; tracked mode removes the residual. φ is transmitted phase minus receiver phase, in radians. A positive Δf makes transmitted phase advance. x runs from 0 at the active line’s left edge to 1 at its right edge; n is the scan row. Observation time t is source row 0’s burst epoch relative to initial alignment. Rows are indexed before aspect-fill cropping, so the first visible row can have a later burst epoch. τₙ(x) is the elapsed time assigned by the selected reference model.

TH is a complete line period: 1.001/15750 seconds for NTSC-M, 64 µs for the selected 625-line PAL case. The teaching window uses active duration TA = 52 µs and delay d = 5 µs from burst centre to active start. These two rounded window values are illustrative, not exact regional blanking specifications. Nominal carrier frequencies are 315/88 MHz for NTSC-M and 4.43361875 MHz for the selected PAL case; PAL-M and PAL-N are not modelled.

At +2000 Hz, line phase reset gives 360·2000·5×10⁻⁶ = 3.60° at active start and gains another 37.44° across 52 µs. A free reference at +10 Hz gains 90° in 25 ms and returns through a complete phase cycle every 100 ms. No rate is derived from display frames or animation speed.

Use encoded luma Y′ = 0.299R′ + 0.587G′ + 0.114B′ and scaled colour differences U = 0.493(B′ − Y′), V = 0.877(R′ − Y′). Bold C is the pair (U,V). The rounded U/V coordinates match the existing burst-phase experiment; NTSC quadrature can be expressed in this plane, while its unequal bandwidths on the customary in-phase and quadrature (I/Q) axes and its regional primaries remain outside the model.

Write transmitted chroma as U sin(θ + φ) + sV cos(θ + φ), where θ is receiver carrier phase and s is +1 for NTSC or (−1)ⁿ for PAL. Multiplication by the receiver’s sine/cosine axes and ideal rejection of the doubled-carrier terms give the local baseband response:

Dₛ denotes the two-component decoded response. A positive transmitted advance rotates NTSC counterclockwise in a U-horizontal, V-upward diagram. This sign is opposite to advancing the receiver reference in burst phase error. Direct decoding preserves vector length and encoded luma before display clipping.

Subscript o means output. This expression assumes the same input C on the previous line, but uses its own phase φₙ₋₁ and opposite sign. In line-reset mode the two phases are equal, so the cross terms cancel and Cₒ = C cos φ. In free mode φₙ − φₙ₋₁ = 2πΔfTH; substituting a single cosine loses a real part of this approximation. Row zero uses a virtual equal-colour preceding line.

This averages already decoded U/V responses in the receiver’s coordinate plane. A conventional analogue PAL delay network instead combines carrier-domain signals before demodulation; its off-frequency response also depends on that network’s phase and amplitude response. The free-reference PAL result here belongs to the declared baseband averaging model, rather than predicting every analogue delay-line receiver.

Reconstruct R′ = Y′ + Vₒ/0.877 and B′ = Y′ + Uₒ/0.493; solve G′ = (Y′ − 0.299R′ − 0.114B′)/0.587. This preserves Y′ even when channels exceed display gamut; the framebuffer clips afterwards.

Shader

A snapshot of colour recovery at each scan position

The shared function takes encoded RGB, source x, integer scan row, transmitter error in Hz, observation time in seconds, reference mode (0 tracked, 1 line reset, 2 free) and decoder (0 NTSC-M, 1 simple PAL, 2 equal-neighbour PAL). It returns unclipped encoded RGB. The runtime makes one aspect-fill texture read, calls this function, blends Effect mix, and writes the display framebuffer.

applyFrequencyErrorGLSL
// WHAT: Show scan-dependent colour errors when a carrier frequency difference remains.
// HOW: Accumulate transmitted-minus-reference phase in seconds, demodulate U/V,
//      restore PAL's line sign, and optionally combine equal-colour adjacent lines.
// WHY: A frequency difference changes relative phase continuously; tracking removes it.
// Inputs: encoded RGB; x in [0,1] left to right; integer row in one active field;
// transmitter-minus-nominal Hz (-5000..5000); source-row-0 burst epoch seconds (0..0.1);
// reference (0 follows frequency/phase, 1 resets phase per line, 2 free nominal);
// decoder (0 NTSC-M, 1 simple 625 PAL, 2 ideal equal-neighbour 625 PAL).
// Output: unclipped RGB. This component model does not simulate a PLL or composite filters.
float carrierPhase(float x, float row, float frequencyHz,
                   float observationSeconds, float reference, float decoder) {
  if (reference < 0.5) return 0.0;
  float lineSeconds = decoder > 0.5 ? 0.000064 : 1.001 / 15750.0;
  // Illustrative burst-centre to active-start delay and active width, in seconds.
  float elapsed = 0.000005 + x * 0.000052;
  if (reference > 1.5) elapsed += observationSeconds + row * lineSeconds;
  // Reduce cycles before trig to limit argument size at the control extremes.
  return 6.28318530718 * fract(frequencyHz * elapsed);
}

vec2 decodeCarrierChroma(vec2 chroma, float phase, float lineSign) {
  float cosine = cos(phase);
  float sine = sin(phase);
  // chroma.x = U (scaled blue difference), chroma.y = V (scaled red difference).
  return vec2(chroma.x * cosine - lineSign * chroma.y * sine,
              chroma.y * cosine + lineSign * chroma.x * sine);
}

vec3 applyFrequencyError(vec3 rgb, float x, float row, float frequencyHz,
                         float observationSeconds, float reference, float decoder) {
  if (reference < 0.5 || frequencyHz == 0.0) return rgb;
  float luma = dot(rgb, vec3(0.299, 0.587, 0.114));
  vec2 chroma = vec2(0.493 * (rgb.b - luma), 0.877 * (rgb.r - luma));
  float lineSign = decoder > 0.5 && mod(row, 2.0) > 0.5 ? -1.0 : 1.0;
  float phase = carrierPhase(x, row, frequencyHz, observationSeconds, reference, decoder);
  vec2 recovered = decodeCarrierChroma(chroma, phase, lineSign);
  if (decoder > 1.5) {
    float previousPhase = carrierPhase(x, row - 1.0, frequencyHz, observationSeconds, reference, decoder);
    // Equal input colour is assumed; the previous phase is not assumed equal.
    recovered = 0.5 * (recovered + decodeCarrierChroma(chroma, previousPhase, -lineSign));
  }
  float red = luma + recovered.y / 0.877;
  float blue = luma + recovered.x / 0.493;
  float green = (luma - 0.299 * red - 0.114 * blue) / 0.587;
  return vec3(red, green, blue);
}
Processing pipelineBoxes mark actual render-pass boundaries.
  1. Source textureGamma-coded video
  2. Scan-time component recoveryOne fullscreen pass · one texture read per pixel
    • Read encoded RGB
    • Convert scan position to elapsed time
    • Accumulate residual carrier phase
    • Decode U/V and combine PAL line responses
    • Reconstruct with unchanged luma
    • Mix and display with RGB clipping
  3. Display output
  1. Convert scan distance to seconds before multiplying by hertz. Pixel count is not elapsed scan time.
  2. Choose the reference behaviour before accumulating phase. Tracking changes residual frequency to zero without changing the transmitter readout.
  3. Reduce accumulated cycles modulo one before trigonometry. Negative offsets remain equivalent after wrapping.
  4. Restore PAL’s V sign, then average responses with distinct current and previous phases.
  5. Recover green from the original luma equation; clip only at output.

The source height represents one active field: n = floor(N·y), with N = 240 for NTSC-M or 288 for PAL and source y increasing downward. Source x/y are computed before aspect-fill cropping. These are representative active-row counts, not a full interlaced raster; switching decoder changes both encoding and the declared timing case. There is no frame weave or vertical blanking. Observation time is a manual snapshot control independent of media playback.

Notes

  • This is a local component approximation after ideal demodulation. It does not sample composite video or model chroma bandpass response, luma/chroma leakage, RF recovery, PLL transients, noise, lock thresholds or automatic colour suppression.
  • The ±5000 Hz range deliberately exposes within-line phase accumulation. It is not a standard tolerance or a claim that a receiver tracks that range. Tracked mode assumes settled correct recovery at every chosen setting.
  • PAL averaging assumes equal adjacent input colour even on photographs or moving video. Vertical edge mixing, line-delay mismatch and adaptive decoding need a different model.
  • Large offsets can vary rapidly between rows. Texture filtering, canvas resolution and display scaling can hide or alias those patterns; the diagnostic phase values remain the mathematical reference. Manual time steps can also skip phase cycles at large offsets.
  • Neutral grey and encoded luma remain invariant before clipping. Physical luminance and perceived saturation need not remain invariant. An RGB vector may leave gamut.
  • The diagnostic omits vector angle when shown chroma rounds to 0.000×; a zero vector has no direction.
  • Effect mix is an RGB comparison aid: partial mixing can shorten a rotated vector. The vector readouts include mix; phase and frequency readouts describe the signal before that blend.
  • A change of transmitter frequency shared by burst and chroma is not a burst-only phase fault. SECAM uses line-sequential frequency modulation and needs its own frequency-deviation article.

References

ITU-R BT.470-6 — Conventional television systems, Tables 1, 1-1 and 2 — historical standard defining line periods, colour-subcarrier frequencies and burst conventions; the model uses NTSC-M and a 625-line PAL case.

Texas Instruments — TVP5146M2 data manual, §2.4 and Tables 2-18, 2-56 — documents frequency and phase recovery from burst, nonstandard subcarrier-to-line relationships, lock indication and controllable colour suppression; no device-specific capture range is inferred.

EBU Technical Review 256 (1993) — video encoders and decoders, §2.4.1 — explains simple and delay-line PAL and the limits of adjacent-line phase-error cancellation.