Skip to content
tezvyn:

Compare YCbCr and RGB. Why chroma subsampling for compression?

Source: Wikipedia: YCbCrMediumHow cards are made

Compare YCbCr and RGB. Why chroma subsampling for compression?

Tests color decorrelation and perceptual redundancy. Contrast correlated RGB with YCbCr's luma-chroma split; eyes resolve brightness better than color, so 4:2:0/4:2:2 cuts chroma bandwidth ~50-75% with little loss.

What's really being asked

This question probes whether you understand why video and image pipelines transform pixel data into a different color space before compression. The interviewer wants to see that you know RGB is not optimal for perceptual coding, that YCbCr provides a decorrelated representation, and that you can connect engineering decisions like chroma subsampling to biological constraints of the human visual system rather than treating them as arbitrary tricks.

The full answer

A strong response should hit four points in order. First, describe RGB as an additive color model where all three channels carry both luminance and chrominance information, making them highly correlated and thus inefficient for compression. Second, explain that YCbCr is derived from RGB primaries but separates the signal into one luma channel (Y) and two chroma channels (Cb and Cr), which decorrelates the data and lets compressors treat brightness and color independently. Third, state the perceptual principle: the human retina contains roughly 120 million rods versus 6 to 7 million cones, giving us far higher spatial resolution for luminance than for color; therefore, our brains reconstruct fine detail primarily from brightness edges, not color edges. Fourth, connect this directly to subsampling by noting that standards like 4:2:2 or 4:2:0 store chroma at half or quarter resolution, reducing raw bandwidth by roughly 33% to 50% while preserving perceived sharpness because the dropped color samples are below our perceptual threshold.

The mistakes people make

One red flag is saying chroma is subsampled because it is simply less important than luma without mentioning spatial acuity; this signals a memorized fact without understanding. Another mistake is claiming YCbCr is used because it reduces file size automatically, ignoring that the transform itself is lossless and the savings come from downstream quantization and subsampling. Some candidates also confuse YCbCr with YPBPR, so be ready to note that YCbCr is the digital quantization of the same underlying concept.

What usually comes next

An interviewer might push on the math by asking you to compute the byte difference between a 1920x1080 RGB24 frame and a 4:2:0 YCbCr frame, which is roughly 6.2 MB versus 3.1 MB. They could also ask why subsampling is less acceptable for computer screen text or chroma keying, where sharp color edges matter. Another angle is asking how modern codecs like HEVC or AV1 handle chroma beyond simple subsampling, such as cross-component linear model prediction.

A concrete example

Consider a 4K video stream at 3840 by 2160. In uncompressed RGB8, each frame requires 3840 times 2160 times 3 bytes, about 24.9 MB. Converting to YCbCr does not change the uncompressed size, but applying 4:2:0 subsampling drops the two chroma planes to 1920 by 1080 each. The resulting frame is then about 12.4 MB, a 50% reduction before any transform coding or quantization even occurs, and viewers typically cannot distinguish the subsampled version from full resolution in natural imagery.

Interview question

Switching from RGB to YCbCr does not reduce uncompressed frame size, yet 4:2:0 YCbCr cuts bandwidth roughly in half. What best explains where the savings come from?

  • a.Because RGB channels are highly correlated, YCbCr eliminates redundancy by dropping one entire channel during conversion.
  • b.The RGB-to-YCbCr conversion is lossy and permanently drops chroma information during the matrix transform.
  • c.YCbCr uses fewer bits per channel than RGB by default, reducing the uncompressed payload before any codec is applied.
  • d.Separating luma from chroma allows chroma planes to be stored at lower spatial resolution because human eyes have lower color spatial acuity.Correct
Why?

The YCbCr transform is lossless and does not reduce uncompressed size; savings come from chroma subsampling, which exploits the human visual system's lower spatial resolution for color versus brightness. Distractor B is wrong because the transform does not inherently use fewer bits per pixel—it merely enables efficient subsampling and quantization.

Just read this? Test yourself on what you have been reading.

Read the original → en.wikipedia.org

You just looked this up. Could you explain it out loud?

That is the part interviews actually test. Tezvyn takes questions like this one and gives you what the interviewer is really checking, the answer that lands, and the mistake that ends the conversation, in the four minutes before your next meeting.

The iPhone app is on the way

We are building it. Until it lands, nothing here is held back from you: every interview card, your saved cards, streaks and the job board all work in Safari, plus hundreds of free practice quizzes of thirty questions each. Sign in and it all carries over to the app the day it arrives.

Want it as an icon? Tap Share at the bottom of Safari, then Add to Home Screen. It opens full screen and the cards you have read stay available offline.

Get it on Google PlayiPhone app coming soon

We are hiring for this. Every open role lists the topics its interview covers, so you can prepare for the real thing rather than guessing.

See open roles