Encoder
A video encoder can reuse known picture content and code the differences. Lossy coding rounds away detail to save bits. The decoder follows the resulting bitstream to rebuild the pictures.
For one sample, a guess of 80 and a correction of +5 rebuild 85. If lossy coding changes that correction to +4, the result is 84. The encoder keeps that same 84 for later predictions, so it works from what the decoder knows.
Predict, code, reconstruct
A simplified predictive transform encoder, as used in video codecs such as H.264.
Scroll horizontally to inspect the full diagram. Keyboard: focus the diagram and use the arrow keys.
01PredictionGuess a block from already decoded neighbours or other pictures. 02Residual and transformSubtract the guess. Describe the remaining difference as amounts of simple patterns. 03QuantisationRound the pattern weights. Small variations can disappear from the reconstructed picture. - JPEG blocking, ringing and detail loss
- Temporal quality variation
04Entropy codingWrite the rounded values and prediction instructions into the bitstream without further loss.