1 .. SPDX-License-Identifier: GFDL-1.1-no-invariants-or-later
9 YUV is the format native to TV broadcast and composite video signals. It
10 separates the brightness information (Y) from the color information (U
11 and V or Cb and Cr). The color information consists of red and blue
12 *color difference* signals, this way the green component can be
13 reconstructed by subtracting from the brightness component. See
14 :ref:`colorspaces` for conversion examples. YUV was chosen because
15 early television would only transmit brightness information. To add
16 color in a way compatible with existing receivers a new signal carrier
17 was added to transmit the color difference signals.
23 YUV formats commonly encode images with a lower resolution for the chroma
24 components than for the luma component. This compression technique, taking
25 advantage of the human eye being more sensitive to luminance than color
26 differences, is called chroma subsampling.
28 While many combinations of subsampling factors in the horizontal and vertical
29 direction are possible, common factors are 1 (no subsampling), 2 and 4, with
30 horizontal subsampling always larger than or equal to vertical subsampling.
31 Common combinations are named as follows.
33 - `4:4:4`: No subsampling
34 - `4:2:2`: Horizontal subsampling by 2, no vertical subsampling
35 - `4:2:0`: Horizontal subsampling by 2, vertical subsampling by 2
36 - `4:1:1`: Horizontal subsampling by 4, no vertical subsampling
37 - `4:1:0`: Horizontal subsampling by 4, vertical subsampling by 4
39 Subsampling the chroma component effectively creates chroma values that can be
40 located in different spatial locations:
42 - .. _yuv-chroma-centered:
44 The subsampled chroma value may be calculated by simply averaging the chroma
45 value of two consecutive pixels. It effectively models the chroma of a pixel
46 sited between the two original pixels. This is referred to as centered or
47 interstitially sited chroma.
49 - .. _yuv-chroma-cosited:
51 The other option is to subsample chroma values in a way that place them in
52 the same spatial sites as the pixels. This may be performed by skipping every
53 other chroma sample (creating aliasing artifacts), or with filters using an
54 odd number of taps. This is referred to as co-sited chroma.
56 The following examples show different combination of chroma siting in a 4x4
59 .. flat-table:: 4:2:2 subsampling, interstitially sited
104 .. flat-table:: 4:2:2 subsampling, co-sited
149 .. flat-table:: 4:2:0 subsampling, horizontally interstitially sited, vertically co-sited
194 .. flat-table:: 4:1:0 subsampling, horizontally and vertically interstitially sited