# Y′UV

Y′UV, also written YUV, is the color model found in the PAL analogue color TV standard. A color is described as a Y′ component (luma) and two chroma components U and V. The prime symbol (') denotes that the luma is calculated from gamma-corrected RGB input and that it is different from true luminance. Today, the term YUV is commonly used in the computer industry to describe colorspaces that are encoded using YCbCr.
In TV formats, color information (U and V) was added separately via a subcarrier so that a black-and-white receiver would still be able to receive and display a color picture transmission in the receiver's native black-and-white format, with no need for extra transmission bandwidth.
As for etymology, Y, Y′, U, and V are not abbreviations. The use of the letter Y for luminance can be traced back to the choice of XYZ primaries. This lends itself naturally to the usage of the same letter in luma (Y′), which approximates a perceptually uniform correlate of luminance. Likewise, U and V were chosen to differentiate the U and V axes from those in other spaces, such as the x and y chromaticity space. See the equations below or compare the historical development of the math.

## Related color models

The scope of the terms Y′UV, YUV, YCbCr, YPbPr, etc., is sometimes ambiguous and overlapping.
* Y′UV is the separation used in PAL.
* YDbDr is the format used in SECAM and PAL-N, unusually based on non-gamma-corrected (linear) RGB, making the Y component true luminance.
* Y′IQ is the format used in NTSC television.
* Y'PbPr is the separation used in component video.
* Y′CbCr is any digital encoding of Y'PbPr suited for video and image compression and transmission formats such as MPEG and JPEG.
All these formats are based on a luma component and two chroma components describing the color difference from gray. In all formats other than Y′IQ, each chroma component is a scaled version of the difference between red/blue and Y; the main difference lies in the scaling factors used, which is determined by color primaries and the intended numeric range (compare the use of U$_{max}$ and V$_{max}$ in § SDTV with BT.470 with a fixed ⁠1/2⁠ in YCbCr § R'G'B' to Y'PbPr). In Y′IQ, the UV plane is rotated by 33°.

## History

Y′UV was invented when engineers wanted color television in a black-and-white infrastructure. They needed a signal transmission method that was compatible with black-and-white (B&W) TV while being able to add color. The luma component already existed as the black and white signal; they added the UV signal to this as a solution.
The UV representation of chrominance was chosen over straight R and B signals because U and V are color difference signals. In other words, the U and V signals tell the television to shift the color of a certain spot without altering its brightness, or to make one color brighter at the cost of the other and by how much it should be shifted. The higher (or the lower when negative) the U and V values are, the more saturated (colorful) the spot gets. The closer the U and V values get to zero, the lesser it shifts the color meaning that the red, green and blue lights will be more equally bright, producing a grayer spot. This is the benefit of using color difference signals, i.e. instead of telling how much red there is to a color, it tells by how much it is more red than green or blue.
In turn this meant that when the U and V signals would be zero or absent, it would just display a grayscale image. If R and B were to have been used, these would have non-zero values even in a B&W scene, requiring all three data-carrying signals. This was important in the early days of color television, because old black and white TV signals had no U and V signals present, meaning the color TV would just display it as B&W TV out of the box. In addition, black and white receivers could take the Y′ signal and ignore the U- and V-color signals, making Y′UV backward-compatible with all existing black-and-white equipment, input and output. If the color-TV standard wouldn't have used color difference signals, it could mean a color TV would make funny colors out of a B&W broadcast or it would need additional circuitry to translate the B&W signal to color.
It was necessary to assign a narrower bandwidth to the chrominance channel because there was no additional bandwidth available. If some of the luminance information arrived via the chrominance channel (as it would have if RB signals were used instead of differential UV signals), B&W resolution would have been compromised.

## Conversion to/from RGB
### SDTV with BT.470

Y′UV signals are typically created from RGB (red, green and blue) source. Weighted values of R, G, and B are summed to produce Y′, a measure of overall brightness or luminance. U and V are computed as scaled differences between Y′ and the B and R values.
PAL (NTSC used YIQ, which is further rotated) standard defines the following constants, derived from BT.470 System M primaries and white point using SMPTE RP 177 (same constants called matrix coefficients were used later in BT.601, although it uses 1/2 instead of 0.436 and 0.615):
    ${\begin{aligned}W_{R}&=0.299,\\W_{G}&=1-W_{R}-W_{B}=0.587,\\W_{B}&=0.114,\\U_{\text{max}}&=0.436,\\V_{\text{max}}&=0.615.\end{aligned}}$
PAL signals in Y′UV are computed from R'G'B' (only SECAM IV used linear RGB) as follows:
    ${\begin{aligned}Y'&=W_{R}R'+W_{G}G'+W_{B}B'=0.299R'+0.587G'+0.114B',\\U&=U_{\text{max}}{\frac {B'-Y'}{1-W_{B}}}\approx 0.492(B'-Y'),\\V&=V_{\text{max}}{\frac {R'-Y'}{1-W_{R}}}\approx 0.877(R'-Y').\end{aligned}}$
The resulting ranges of Y′, U, and V respectively are [0, 1], [−U$_{max}$, U$_{max}$], and [−V$_{max}$, V$_{max}$].
Inverting the above transformation converts Y′UV to RGB:
    ${\begin{aligned}R'&=Y'+V{\frac {1-W_{R}}{V_{\text{max}}}}=Y'+{\frac {V}{0.877}}=Y'+1.14V,\\G'&=Y'-U{\frac {W_{B}(1-W_{B})}{U_{\text{max}}W_{G}}}-V{\frac {W_{R}(1-W_{R})}{V_{\text{max}}W_{G}}}\\&=Y'-{\frac {0.232U}{0.587}}-{\frac {0.341V}{0.587}}=Y'-0.395U-0.581V,\\B'&=Y'+U{\frac {1-W_{B}}{U_{\text{max}}}}=Y'+{\frac {U}{0.492}}=Y'+2.033U.\end{aligned}}$
Equivalently, substituting values for the constants and expressing them as matrices gives these formulas for BT.470 System M (PAL):
    ${\begin{aligned}{\begin{bmatrix}Y'\\U\\V\end{bmatrix}}&={\begin{bmatrix}0.299&0.587&0.114\\-0.14713&-0.28886&0.436\\0.615&-0.51499&-0.10001\end{bmatrix}}{\begin{bmatrix}R'\\G'\\B'\end{bmatrix}},\\{\begin{bmatrix}R'\\G'\\B'\end{bmatrix}}&={\begin{bmatrix}1&0&1.13983\\1&-0.39465&-0.58060\\1&2.03211&0\end{bmatrix}}{\begin{bmatrix}Y'\\U\\V\end{bmatrix}}.\end{aligned}}$
For small values of Y' it is possible to get R, G, or B values that are negative so in practice we clamp the RGB results to the interval [0,1] or more correctly clamp inside the Y'CbCr.
In BT.470 a mistake was made because 0.115 was used instead of 0.114 for blue and 0.493 was the result instead of 0.492. In practice that did not affect the decoders because the approximation 1/2.03 was used.

### HDTV with BT.709

For HDTV the ATSC decided to change the basic values for W$_R$ and W$_B$ compared to the previously selected values in the SDTV system. For HDTV these values are provided by Rec. 709. This decision further impacted on the matrix for the Y′UV↔RGB conversion so that its member values are also slightly different. As a result, with SDTV and HDTV there are generally two distinct Y′UV representations possible for any RGB triple: a SDTV-Y′UV and an HDTV-Y′UV one. This means in detail that when directly converting between SDTV and HDTV, the luma (Y′) information is roughly the same but the representation of the chroma (U & V) channel information needs conversion. Still in coverage of the CIE 1931 color space the Rec. 709 color space is almost identical to Rec. 601 and covers 35.9%. In contrast to this UHDTV with Rec. 2020 covers a much larger area and thus its very own matrix was derived for YCbCr (no YUV/Y′UV, since decommissioning of analog TV).
BT.709 defines these weight values:
    ${\begin{aligned}W_{R}&=0.2126,\\W_{G}&=1-W_{R}-W_{B}=0.7152,\\W_{B}&=0.0722\\\end{aligned}}$
The U$_{max}$ and V$_{max}$ values are from above.
The conversion matrices for analog form of BT.709 are these, but there is no evidence those were ever used in practice (instead only actually described form of BT.709 is used, the YCbCr form):
    ${\begin{aligned}{\begin{bmatrix}Y'\\U\\V\end{bmatrix}}&={\begin{bmatrix}0.2126&0.7152&0.0722\\-0.09991&-0.33609&0.436\\0.615&-0.55861&-0.05639\end{bmatrix}}{\begin{bmatrix}R'\\G'\\B'\end{bmatrix}}\\{\begin{bmatrix}R'\\G'\\B'\end{bmatrix}}&={\begin{bmatrix}1&0&1.28033\\1&-0.21482&-0.38059\\1&2.12798&0\end{bmatrix}}{\begin{bmatrix}Y'\\U\\V\end{bmatrix}}\end{aligned}}$