4 ms·
Mathematically Y'CbCr is a lossless conversion of RGB. Practically there are some losses, though, especially if you use video-range. 4:1:1 is half of RGB but I
by cornstalks 5y ago
Mathematically Y'CbCr is a lossless conversion of RGB. Practically there are some losses, though, especially if you use video-range.
4:1:1 is half of RGB but I've never seen anyone ever use it. Pretty much everything in use today (at the consumer level) uses 4:2:0. It's good enough for today's standards (AV1 Main profile only supports 4:0:0 and 4:2:0).
- layoutIfNeeded 5y ago>Mathematically Y'CbCr is a lossless conversion of RGB. Assuming infinite precision, sure. Interestingly however, there's a closely related color space called YCoCg, that actually does achieve lossless coversion to/from RGB (this lossless variant is often referred to as YCoCg-R, the R stands for "reversible"): https://en.wikipedia.org/wiki/YCoCg#The_lifting-based_YCoCg-R_variation https://en.wikipedia.org/wiki/YCoCg#The_lifting-based_YCoCg-...
- cvwright 5y agoWhat’s 4:1:1? What people call 4:2:0 is actually 4 pixels of Y and 1 each of Cb and Cr.
- cornstalks 5y agoWikipedia has a decent article with visuals: https://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_systems_and_ratios https://en.wikipedia.org/wiki/Chroma_subsampling#Sampling_sy... The difference between 4:1:1 and 4:2:0 is that in 4:1:1 the chroma covers a 1x4 line of pixels whereas in 4:2:0 the chroma covers a 2x2 square of pixels.
- cvwright 5y agoTIL. Thanks!
- pdq 5y agoThis is correct, with one subtlety. YUV to RGB conversion (and vice-versa) requires use of conversion coefficients (BT.470, BT.709, etc): https://en.wikipedia.org/wiki/YUV https://en.wikipedia.org/wiki/YUV Different apps/algorithms can choose their own coefficients, so you get a slightly different RGB colors. If you converted RGB back to YUV with a different set of coefficients, you would get a different result.
- astrange 5y agoJPEG specifies the matrix, I think it's the same as BT.470. It's fairly easy to guess the intent even if the metadata is missing (which, well, it usually is) - just have to know if the source is a video or not and then if it's HD or not.