Sub topic 16
Chroma Subsampling: 4:4:4, 4:2:2, and 4:2:0
This chapter assumes you know that an image is an array of pixels and that YCbCr separates brightness from colour information. You should also be comfortable with ratios and basic image file formats such as JPEG.
Why separate brightness from colour?
Human vision detects fine detail more accurately in brightness than in colour. Image formats use this fact to reduce colour data while keeping most visible detail.
YCbCr stores three components:
- Y represents luma, a brightness-like component.
- Cb represents the blue-minus-luma colour difference.
- Cr represents the red-minus-luma colour difference.
Chroma means colour information. Chroma subsampling stores fewer Cb and Cr samples than Y samples. The decoder then interpolates the missing colour samples when displaying the image.
The notation 4:a:b describes sampling across a region that is four luma samples wide:
- The first number, 4, describes the horizontal luma reference.
- The second number describes the number of chroma samples in the first row.
- The third number describes the number of chroma samples in the second row.
Comparing common sampling schemes
| Scheme | Luma samples | Cb samples | Cr samples | Typical use |
|---|---|---|---|---|
| 4:4:4 | 4 | 4 | 4 | Editing, graphics, text |
| 4:2:2 | 4 | 2 | 2 | Video production and broadcast |
| 4:2:0 | 4 | 1 per row pair | 1 per row pair | Consumer video and JPEG-like storage |
4:4:4 keeps full chroma resolution. Every luma position has matching Cb and Cr samples.
4:2:2 halves chroma resolution horizontally. A pair of neighbouring pixels shares one Cb sample and one Cr sample.
4:2:0 reduces chroma resolution horizontally and vertically. A two-by-two luma block commonly shares one Cb sample and one Cr sample. The exact positioning of samples depends on the format's chroma siting rules.
Trade-offs and common errors
Subsampling reduces storage and bandwidth, but it can blur coloured edges. This is especially visible in small text, saturated graphics, and sharp red or blue boundaries. It is less noticeable in natural scenes with gradual colour changes.
The ratio is not a direct percentage of total file size. Y usually remains full resolution, while only Cb and Cr are reduced. Compression, bit depth, padding, and metadata also affect the final file size.
A simple count illustrates the difference:
schemes = {
"4:4:4": (4, 4, 4),
"4:2:2": (4, 2, 2),
"4:2:0": (4, 1, 1),
}
for name, (y, cb, cr) in schemes.items():
print(name, y + cb + cr, "samples per 4-luma reference")For 4:2:0, the Cb and Cr counts describe a two-row sampling region, so compare schemes using the format specification rather than treating the three numbers as a universal byte formula.
Choosing a scheme
Use 4:4:4 when preserving coloured edges is important, such as in screen captures, titles, masks, and repeated editing. Use 4:2:2 when production workflows need lower bandwidth but still require good horizontal colour detail. Use 4:2:0 for efficient delivery of ordinary photographs and video.
Exercise
A video frame contains small, high-contrast red text on a grey background. Which scheme is safest for preserving the text edges, and why?
Show answer
4:4:4 is safest because it keeps Cb and Cr at every luma position. 4:2:2 or 4:2:0 may blur or colour-fringe the narrow red edges after chroma reconstruction.