YUV investigations


The YUV color space

The YUV color space is very important in different digital image- and video compression standards (JPEG, MPEG, AVC, HEVC). YUV expresses colors with 3 numbers: a black and white luminance value (Y) and two color components (chroma).

The two main reasons for using YUV are:

The most common chroma-subsampling stores 1 chrominance value each per a 2 x 2 pixel area:

+---+---+        +-------+     +-------+
| Y | Y |        |       |     |       |
+---+---+        |   U   |     |   V   |      4:2:0
| Y | Y |        |       |     |       |
+---+---+        +-------+     +-------+

This reduces both chroma information to ¼. A digital color image using the YUV space is encoded/decoded separately as 3 sub-images or planes. For example in this 4:2:0 JPEG both chroma sub-images take up only ¼ of the whole image size:

        

 RGB color image                         Luma plane (Y)                   1/4 Blue plane (U)  1/4 Red plane (V)

After the decoding process the RGB color image is put together either by hardware (digital television, YUV video overlay) or software by computing RGB values for the display frame buffer.

                             +----> Y  ----> encode -------> decode Y -->---+
                             |                                              |
RGB-to-YUV conversion --->---+----> U  ----> encode -------> decode U -->---+-------> YUV-to-RGB conversion
                             |                                              |
                             +----> V  ----> encode -------> decode V -->---+

© 2018 A. Tarpai | Simple HTML version