YCbCr: Difference between revisions

From MultimediaWiki
Jump to navigation Jump to search
mNo edit summary
No edit summary
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
Many modern video codecs rely on a YCbCr colorspace. The correct written expression for this colorspace is YC<sub>b</sub>C<sub>r</sub>, with the 'b' and 'r' characters as subscripts. This is what the components represent:
Many modern video codecs rely on a YCbCr colorspace. The correct written expression for this colorspace is YC<sub>b</sub>C<sub>r</sub>, with the 'b' and 'r' characters as subscripts. This is what the components represent:


* Y = luminance, or intensity
* Y = luma, an approximate version of luminance / intensity (See [https://en.wikipedia.org/wiki/Luma_(video) Wikipedia] for how it differs from true luminance)
* C<sub>b</sub> = "blue chrominance", or more precisely the color deviation from gray on a blue-yellow axis
* C<sub>b</sub> = "blue chrominance", or more precisely the color deviation from gray on a blue-yellow axis
* C<sub>r</sub> = "red chrominance", or more precisely the color deviation from gray on a red-cyan axis
* C<sub>r</sub> = "red chrominance", or more precisely the color deviation from gray on a red-cyan axis
Line 7: Line 7:
Green can be calculated based on these three values.
Green can be calculated based on these three values.


YC<sub>b</sub>C<sub>r</sub> is often falsely mixed up with YUV, which is a different colorspace that is not used in digital media but in analog PAL-based stuff as analog TV transmission or analog video tapes.
'''YUV''': YC<sub>b</sub>C<sub>r</sub> is often falsely mixed up with YUV. Properly speaking, YUV is the analogue PAL color encoding, where the color components U and V differ from C<sub>b</sub> and C<sub>r</sub>, found in PAL TV transmission and analogue video tapes. Nevertheless, it's very common for software to call YC<sub>b</sub>C<sub>r</sub> "YUV".


Note that with most digital [[RGB]] color encodings, every single pixel has a different R, G and B sample. The same is not true with many YC<sub>b</sub>C<sub>r</sub> and also not necessarily true for [[YCoCg|YC<sub>o</sub>C<sub>g</sub>]] color encodings. These YC<sub>b</sub>C<sub>r</sub> variants operate on the empirical evidence that the human eye is more sensitive to variations in the intensity of a pixel rather than variations in color. Thus, every pixel in an image of such a YC<sub>b</sub>C<sub>r</sub> variant has an associated Y sample, but groups of pixels share C<sub>b</sub> and C<sub>r</sub> samples.
'''Chroma subsampling:''' Note that with most digital [[RGB]] color encodings, every single pixel has a different R, G and B sample. The same is not true with many YC<sub>b</sub>C<sub>r</sub> (including [[YCoCg|YC<sub>o</sub>C<sub>g</sub>]]) color encodings. These YC<sub>b</sub>C<sub>r</sub> variants operate on the empirical evidence that the human eye is more sensitive to variations in the intensity of a pixel rather than variations in color. Thus, every pixel in an image of such a YC<sub>b</sub>C<sub>r</sub> variant has an associated Y sample, but groups of pixels share C<sub>b</sub> and C<sub>r</sub> samples.


There are different matrix coefficients defined to convert encodings in the RGB color space to YCbCr. Among the more important ones are:
There are different matrix coefficients defined to convert encodings in the RGB color space to YCbCr. Among the more important ones are:


* ITU BT.601 Mainly used for Standard Definition television signals
* ITU BT.601 Used for Standard Definition television signals
* ITU T.871 JPEG File Interchange Format (JFIF)
* ITU T.871 JPEG File Interchange Format (JFIF)
* ITU BT.709 Mainly used for High definition television (HDTV)
* ITU BT.709 Used for High definition television (HDTV)
* ITU BT.2020 Mainly used for Ultra high definition television
* ITU BT.2020 Used for Ultra high definition television
* [[YCoCg]]


Others are proprietary or less widely used, such as those defined in [[Cinepak]] and SMPTE 240M.
Others are proprietary or less widely used, such as those defined in [[Cinepak]] and SMPTE 240M.

Latest revision as of 21:05, 16 July 2023

Many modern video codecs rely on a YCbCr colorspace. The correct written expression for this colorspace is YCbCr, with the 'b' and 'r' characters as subscripts. This is what the components represent:

  • Y = luma, an approximate version of luminance / intensity (See Wikipedia for how it differs from true luminance)
  • Cb = "blue chrominance", or more precisely the color deviation from gray on a blue-yellow axis
  • Cr = "red chrominance", or more precisely the color deviation from gray on a red-cyan axis

Green can be calculated based on these three values.

YUV: YCbCr is often falsely mixed up with YUV. Properly speaking, YUV is the analogue PAL color encoding, where the color components U and V differ from Cb and Cr, found in PAL TV transmission and analogue video tapes. Nevertheless, it's very common for software to call YCbCr "YUV".

Chroma subsampling: Note that with most digital RGB color encodings, every single pixel has a different R, G and B sample. The same is not true with many YCbCr (including YCoCg) color encodings. These YCbCr variants operate on the empirical evidence that the human eye is more sensitive to variations in the intensity of a pixel rather than variations in color. Thus, every pixel in an image of such a YCbCr variant has an associated Y sample, but groups of pixels share Cb and Cr samples.

There are different matrix coefficients defined to convert encodings in the RGB color space to YCbCr. Among the more important ones are:

  • ITU BT.601 Used for Standard Definition television signals
  • ITU T.871 JPEG File Interchange Format (JFIF)
  • ITU BT.709 Used for High definition television (HDTV)
  • ITU BT.2020 Used for Ultra high definition television
  • YCoCg

Others are proprietary or less widely used, such as those defined in Cinepak and SMPTE 240M.

For information on specific YCbCr formats, see the YCbCr formats category page.