Entropy coding
Entropy coding is the final step of video compression, where the encoder packs data into the fewest bits by giving common patterns short codes and rare patterns longer ones, much like abbreviating frequently used words. It is lossless, so it never lowers quality. H.264 High profile uses CABAC, a stronger entropy coder than the simpler one in the Baseline profile.
Why it matters
Entropy coding squeezes out extra savings at no cost to quality. Choosing a stronger method, such as CABAC in H.264, produces smaller files for the same picture, which lowers delivery bills, though it takes more processing to decode.
How it works
- After quantization, the encoder has a stream of symbols describing the video.
- It measures how often each symbol or pattern appears.
- Frequent patterns get short codes and rare ones get longer codes.
- The decoder reverses the coding exactly, so no information is lost.
What is the difference between CABAC and CAVLC?
CABAC compresses data more efficiently than CAVLC but needs considerably more processing to decode. Both are entropy coders in H.264. CAVLC works in every H.264 profile, while CABAC is available from the Main profile upward, which is why High profile streams are usually smaller.
Is entropy coding lossy?
No, entropy coding is lossless. It only changes how data is written, not what the data says, so the decoder recovers it exactly. Quality loss in video compression comes from earlier steps such as quantization, not from entropy coding itself.
Where it's used
OTT services encode H.264 in the High profile, which uses the stronger CABAC entropy coder, so viewers get the same picture in smaller files.
By the numbers
- In H.264, CABAC compresses data more efficiently than CAVLC but requires considerably more processing to decode. (Wikipedia: Advanced Video Coding)


