ONE STAGE OF A CHAIN — WHAT ARRIVES, WHAT LEAVES, WHAT BREAKS DOWNSTREAM
Where This Sits In The Encoding Pipeline
A video encoder is not one algorithm but eight stages in a fixed order, and the order is not arbitrary: each stage exists because the one before it made its job possible. This tool models one of them. The chain below links to the other seven.
Pixel Sampling Lab — turns a continuous image into a grid of pixels, and fixes what detail can never be recovered afterwards
- What arrives
- A continuous optical image on the sensor. Infinite detail, no pixels yet.
- What leaves
- A grid of samples at one fixed spatial resolution.
- What the next stage assumes
- Every later stage assumes this grid is already a fair record of the scene. Not one of them can put detail back.
- What goes wrong here
- Sample below twice the finest detail present and that detail does not simply vanish — it comes back as a false coarse pattern that was never in the scene. Aliasing is baked in before the encoder is reached, and no bitrate undoes it.
Problem solved in full
-
The boundary for a 10-cycle pattern sampled 22 times 5 steps
A 10-cycle pattern sampled 22 times is safe; sampled 18 times it comes back as 8. Work out where the boundary is, and what the signal turns into on the wrong side of it.
-
The sampling theorem sets one condition: the rate must exceed twice the highest frequency present. Here that means anything above 20.
-
Twenty-two samples for ten cycles is 2.2 per cycle. It clears the bound, so the original is recoverable in principle — though only just, and with no margin for anything higher hiding in the signal.
-
Below the bound the signal does not degrade, it changes identity. Sampling at 18 makes the 10-cycle pattern indistinguishable from an 8-cycle one, and the reconstruction returns the 8.
-
That is aliasing, and the word is precise: the high frequency does not vanish, it adopts a false name and returns as something the system will faithfully reproduce.
-
The bound is strict rather than inclusive. Sampling at exactly 20 can land on every zero crossing and record nothing at all — equality is not enough.
Answer
The tool prints a source frequency of 10, a rate of 22 and 2.2 samples per cycle. The consequence is why every camera and sound card filters before it samples rather than after: once a frequency has aliased, it is a legitimate low frequency in the data and no later processing can distinguish it from one that was really there. Drop the rate to 18 and watch the reconstruction return a slower wave that the sampler has no way of knowing is wrong — moiré in a photograph is the same effect in two dimensions.
-
References (1)
- The sampling theorem behind the Nyquist limit: C. E. Shannon, "Communication in the Presence of Noise." Proceedings of the IRE 37(1), 10–21, 1949.