91³Ô¹ÏÍø

Understanding Color Space Conversions in Display

VIP Expert

Sep 20, 2020 / 4 min read

Color space is a very powerful tool that comes in handy when capturing, transmitting and reproducing color back to the human eye. Systems such as cameras, GPUs, transmission cables (HDMI/DP), and monitors use color space metrics to preserve and transform color. This technology helps map real colors to the color model¡¯s discrete values.

Color modelling is a mathematical way of describing colors, independent from physical devices like cameras and displays. There are five major color models that sub-divide into others: CIE, RGB, YUV, HSL/HSV, and CMYK.

In continuation of our earlier blog, let¡¯s review color sub sampling and the different color space conversions.

Why YUV is preferred over RGB

YCbCr is a consumer video format and representation of encoded HD, whereas RGB is a traditional computer format. One is not superior to the other because each has its own strengths and weaknesses. YCbCr is generally preferred over RGB because of its native nature. However, many displays (almost all DVI inputs) only accept RGB. YCbCr formats are advanced in terms of transmitting and reproducing HD, 3D, UHD and 8k videos. So, if your display is HDMI it is likely to accept YCbCr if not switched to RGB.

Studies show human eyes are sensitive to luminance (intensity of light) but not so sensitive to chrominance (sensitivity of color). YCbCr color space makes use of this fact to achieve a more appealing representation of scenes and images by separating the luminance and chrominance components of a scene and reducing the chrominance.

Color Sub-sampling

Representation of YCbCr separates luminance and chrominance, making it easy for the computing system to encode the image using less bits. This is enabled through color subsampling, which simply encodes chrominance components with lower resolution. To explain further, let¡¯s dive down to cover four commonly used subsampling schemes: 4:4:4, 4:2:2, 4:2:0, and 4:0:0.

4:4:4 Sampling

4:4:4 is a full resolution in both horizontal and vertical directions with no subsampling done. Each pixel has both luminance (Y) and chrominance (cr, cb) components.

Color space sampling diagram Color space sampling diagram

Each of the two chroma arrays has the same height and width as the luma array.

Frame Bandwidth Calculation:

Frame size (in bytes) = 3 * Color_depth * width(length) * height

4:2:2 Sampling

In 4:2:2, half of chroma compounds are removed in every active line. In the example below, line1 (cr01, cb01) and (cr03, cb03) chroma compounds are removed.

Color space conversion example Color space conversion example

Each of the two chroma arrays has the same height and half the width of the luma array.

Frame Bandwidth Calculation:

Frame size (in bytes) = 2 * Color_depth * width(length) * height

4:2:0 Sampling

In 4:2:0, chroma is presented once in two lines and half of the chroma compounds are removed in every chroma presented line. In the figure below, line 1 chroma compounds (cr01, cb01) & (cr03, cb03) are removed. But in line2 all chroma compounds (cr10, cb10) (cr11, cb11) (cr12, cb12) and (cr13, cb13) are removed.

Color space conversion diagram Color space conversion diagram

In 4:2:0 sampling, each of the two chroma arrays has half the height and half the width of the luma array.

Frame Bandwidth Calculation:

Frame size (in bytes) = 3 * Color_depth * (width /2) * height

Y-Only or 4:0:0 Sampling

In monochrome sampling there is only one sample array, which is nominally considered the luma array.

Frame Bandwidth Calculation:

Frame size (in bytes) = 1* Color_depth * (width)* height

RGB-to-YCBCR Conversion Matrices:

Transformation between YCbCr to RGB generally occurs within the DTV after it receives a YCbCr encoded picture. Conversion between YCbCr color component samples and RGB color component samples can be accomplished by applying one of the four conversion matrices: ITU-R BT.601 [6], ITU-R BT.709 [7], ITU-R BT.2020 [40] constant luminance, or ITU-R BT.2020 [40] non-constant luminance.

By default, an SD video format is encoded according to ITU-R BT.601 [6] color space, an HD video to 2k format is encoded according to ITU-R BT.709 [7] color space, and ITU-R BT.2020 [40] is used for 4k video.

The ITU-R BT.601 [6] color conversion matrix is shown below for convenience.

Y¡¯= 0.299 R¡¯ + 0.587 G¡¯ + 0.114 B¡¯

CR¡¯ = ((R¡¯ ¨C Y¡¯) * 0.71327)

CB¡¯ = ((B¡¯ ¨C Y¡¯) * 0.56433)

The ITU-R BT.709 [7] color conversion matrix is shown below for convenience.

Y¡¯= 0.2126 R¡¯ + 0.7152 G¡¯ + 0.0722 B¡¯

CR¡¯ = ((R¡¯ ¨C Y¡¯) / 1.5748)

CB¡¯ = ((B¡¯ ¨C Y¡¯) / 1.8556)

The ITU-R BT.2020 [40] constant luminance color conversion matrix is shown below for convenience.

YC¡¯= (0.2627 R + 0.6780 G + 0.0593 B)¡¯

CRC¡¯ = ((R¡¯ ¨C YC¡¯) / 1.7184) for -0.8592 ¡Ü (R¡¯ ¨C YC¡¯) ¡Ü 0

CRC¡¯ = ((R¡¯ ¨C YC¡¯) / 0.9936) for 0 < (R¡¯ ¨C YC¡¯) ¡Ü 0.4968

CBC¡¯ = ((B¡¯ ¨C YC¡¯) / 1.9404) for -0.9702 ¡Ü (B¡¯ ¨C YC¡¯) ¡Ü 0

CBC¡¯ = ((B¡¯ ¨C YC¡¯) / 1.5816) for 0 < (B¡¯ ¨C YC¡¯) ¡Ü 0.7908

The ITU-R BT.2020 [40] non-constant luminance color conversion matrix is shown below for convenience.

Y¡¯= 0.2627 R¡¯ + 0.6780 G¡¯ + 0.0593 B¡¯

CR¡¯ = ((R¡¯ ¨C Y¡¯) / 1.4746)

CB¡¯ = ((B¡¯ ¨C Y¡¯) / 1.8814)

Prime values are transformed levels in non-linear color space.

Color Space plays a key role in Smart Phones, Laptops, Monitors and Home theatres. The color space is a key subject in Image capturing, storing, transforming, transmitting and re-producing. It is fast growing to meet the challenges given by Consumer Electronics, Animation and Image processing industries. Stay tuned, read our recent blogs on display here

For more information on Synopsys¡¯ Display and other VIP, please visit 

Continue Reading