encoding.info
You are hereSourcePredictionTransformEntropy codingFiltersFramesDecisionsRate controlPerceptionQualityBitstreamSettingsEncoder map
Page 1 of 3 in Why video compresses

Four kinds of redundancy

Why video compresses · concept · added 2026-11-14

In Brief:
Video compresses because most of it is predictable or goes unnoticed. Similar neighbors, similar frames and common values can be exploited without changing the decoded picture. Discarding detail a viewer may not notice is lossy.

Video compresses because most of it is predictable or goes unnoticed. It helps to sort the waste into four kinds. Neighboring pixels are alike (spatial). Consecutive frames are alike (temporal). Some values occur far more often than others (statistical). Some detail a viewer may not notice (perceptual). The first three are redundancy: they can be exploited without changing the decoded picture. The fourth is irrelevance. Discarding it is lossy, but lossy coding can also remove detail that is visible.

Four kinds at a glance

Spatial
Neighboring pixels are alike
Temporal
Consecutive frames are alike
Statistical
Some values are far more common
Perceptual
Some detail may go unnoticed
Conceptual illustration.

Compare the predictions

The picture is one frame of a cartoon cat, 32×32 pixels at 8 bits each. Choose a prediction: each pixel is predicted, and only the difference is left to code. Flat predicts mid-gray everywhere, which removes nothing; it only re-centers the values. Left neighbor predicts each pixel from the decoded pixel to its left. Previous frame predicts it from the same position in the frame before. The cat had moved only slightly between the two frames, a third of a pixel, so they differ only along its outline and features.

Step sets how coarsely each difference is rounded before it is coded:

coded value = round(difference / step)
decoded difference = coded value × step

At step 1 every difference survives exactly. At step 8 a difference of 13 is coded as 2 and decoded as 16, an error of 3. As the step grows, the number of distinct values left to code shrinks and the error usually grows. Step stands in for quantization, which later pages apply after a transform.

In the middle panel mid-gray is zero, lighter is positive and darker is negative. The histogram shows the decoded differences, so its bars lie at multiples of the step.

Common values can be represented more cheaply than rare ones. Modeled bits per pixel uses the histogram to estimate an ideal average, treating each pixel's coded value as independent and assuming the decoder already knows how often each value occurs. Mean squared error is the average of the squared differences between source and decoded pixels; zero means an exact match.

Leave Step at 1 and switch between the three predictions. Each choice starts from the same source picture, so the modeled bit counts are alternatives, not savings that add up.

1
← 1: exactcoarse →
Source
Left to code
Decoded
Value left to code
Source bits per pixel
8
Modeled bits per pixel
Mean squared error
Simplified demo: the cat is invented, and the previous frame is taken as already decoded, with no motion search. Left neighbor uses the pixel above for the first pixel of a row, and mid-gray for the first pixel of all. There is no transform; later pages add it. Modeled bits per pixel is a bound for a coder that treats the values as independent. It is not a bitrate: a real coder also spends bits describing its predictions and its probability model, and gains by modeling neighboring values. The histogram's bar heights follow the square root of each value's share, scaled to the tallest bar, so that rare values stay visible; the teal bar is zero. Its axis runs from −160 to 160, which holds every value this cat produces at any setting. Differences outside the middle panel's display range appear black or white; the histogram and statistics use the full values. This cartoon has large flat areas; a photograph would give other numbers.

For this cat:

For this cat and rounding rule, Flat and Left neighbor decode to the same picture at every step. The prediction changed how many bits the model needs, not the result.

Which tool removes which

KindWhat repeatsTools
SpatialNeighboring pixelsIntra prediction, the transform
TemporalConsecutive framesMotion compensation, reference frames
StatisticalCommon valuesEntropy coding
PerceptualDetail that may go unnoticedQuantization, quantization matrices, adaptive quantization

The tools in the last row control where and how much error is introduced; they do not guarantee that it goes unnoticed.

The kinds overlap. A prediction is aimed at spatial or temporal redundancy, but what it changes is the statistics of what is left, as the histogram shows. The transform is a spatial tool too. The hybrid codec loop shows how the tools fit together.

What to carry forward

Sources

Read 2026-11-14.