# YPbPr

YPbPr or $Y'P'bP'r$, also written as YP$_B$P$_R$, is a color space used in video electronics, in particular in reference to component video cables. Like YC$_B$C$_R$, it is based on gamma corrected RGB primaries; the two are numerically equivalent but YP$_B$P$_R$ is designed for use in analog systems while YC$_B$C$_R$ is intended for digital video. The EOTF (gamma correction) may be different from common sRGB EOTF and BT.1886 EOTF. Sync is carried on the Y channel and is a bi-level sync signal, but in HD formats a tri-level sync is used and is typically carried on all channels.
YP$_B$P$_R$ is commonly referred to as component video by manufacturers; however, there are many types of component video, most of which are some form of RGB. Some video cards come with video-in video-out (VIVO) ports for connecting to component video devices.

## Technical details

$Y'P'bP'r$ can be derived from a gamma corrected $R'G'B'$ signal with a typical range of 0-700 mV. The first step is converting to $Y'$, $R'-Y'$ and $B'-Y'$.
$Y'$carries luma (brightness or luminance) and synchronization (sync) information. Luma is defined as:
* $Y'=0.212R+0.701G+0.087B$ for Hi-Vision;
* $Y'=0.2126R+0.7152G+0.0722B$ for HDTV;
* $Y'=0.299R+0.587G+0.114B$ for SDTV;
$R'-Y'$carries the difference between red and luma, defined as:
* $R'-Y'=0.7874R'-0.7152G'-0.0722B'$for Hi-Vision and HDTV;
* $R'-Y'=0.701R'-0.587G'-0.114B'$ for SDTV.
$B'-Y'$carries the difference between blue and luma, defined as:
* $B'-Y'=-0.2126R'-0.7152G'+0.9278B'$ for Hi-Vision and HDTV;
* $B'-Y'=-0.299R'-0.587G'+0.886B'$ for SDTV.
These $R'-Y'$ and $B'-Y'$ values are then scaled to obtain normalized $P'r$ and $P'b$ values in the range of +/- 350 mV:
* $P'b=(B'-Y')/1.826$ and $P'r=(R'-Y')/1.576$ for Hi-Vision;
* $P'b=[0.5/(1-0.0722)](B'-Y')$ and $P'r=[0.5/(1-0.2126)](R'-Y')$ for HDTV;
* $P'b=0.564(B'-Y')$ and $P'r=0.713(R'-Y')$ for SDTV.
There are other standards of YP$_B$P$_R$ components derivation available:
* SMPTE 240M (240M defined EOTF and uses SMPTE 170M primaries and white point) for 1920x1035;
* BT.601 matrix for 525 lines 60/1.001 Hz (SMPTE 273M) and 625 lines 50 Hz (ITU-R BT.1358).
To send a green signal as a fourth component is redundant, as it can be derived using the blue, red and luma information.
When color signals were first added to the NTSC-encoded black and white video standard, the hue was represented by a phase shift of a color reference sub-carrier. P for phase information or phase shift has carried through to represent color information even in the case where there is no longer a phase shift used to represent hue. Thus, the YP$_B$P$_R$ nomenclature derives from engineering metrics developed for the NTSC color standard.
The same cables can be used for YP$_B$P$_R$ and composite video. This means that the yellow, red, and white RCA connector cables commonly packaged with most audio/visual equipment can be used in place of the YP$_B$P$_R$ connectors, provided the end user is careful to connect each cable to corresponding components at both ends. Also, many TVs use the green connection either for luma only or for composite video input. Since YP$_B$P$_R$ is backwards compatible with the luminance portion of composite video even with just component video decoding one can still use composite video via this input, but only luma information will be displayed, along with the chroma dots. The same goes the other way around so long as 480i or 576i is used.

## YP$_B$P$_R$ advantages

Signals using YP$_B$P$_R$ offer enough separation that no color multiplexing is needed, so the quality of the extracted image is nearly identical to the pre-encoded signal. S-Video and composite video mix the signals together by means of electronic multiplexing. Signal degradation is typical for composite video, as most display systems are unable to completely separate the signals, though HDTVs tend to perform such separation better than most CRT units (see dot crawl). S-Video can mitigate some of these potential issues, as its luma is transmitted separately from chroma.
Among consumer analog interfaces, only YP$_B$P$_R$ and analog RGB component video are capable of carrying non-interlaced video and resolutions higher than 480i or 576i, up to 1080p for YP$_B$P$_R$.