# XvYCC

xvYCC or extended-gamut YCbCr is a color space that can be used in the video electronics of television sets to support a gamut 1.8 times as large as that of the sRGB color space. xvYCC was proposed by Sony, specified by the IEC in October 2005 and published in January 2006 as IEC 61966-2-4. xvYCC extends the ITU-R BT.709 tone curve by defining over-ranged values. xvYCC-encoded video retains the same color primaries and white point as BT.709, and uses either a BT.601 or BT.709 RGB-to-YCC conversion matrix and encoding. This allows it to travel through existing digital limited range YCC data paths, and any colors within the normal gamut will be compatible. It works by allowing negative RGB inputs and expanding the output chroma. These are used to encode more saturated colors by using a greater part of the RGB values that can be encoded in the YCbCr signal compared with those used in Broadcast Safe Level. The extra-gamut colors can then be displayed by a device whose underlying technology is not limited by the standard primaries.
In a paper published by Society for Information Display in 2006, the authors mapped the 769 colors in the Munsell Color Cascade (so called Michael Pointer's gamut) to the BT.709 space and to the xvYCC space. About 55% of the Munsell colors could be mapped to the sRGB gamut, but 100% of those colors map to within the xvYCC gamut. Deeper hues can be created – for example a deeper cyan by giving the opposing primary (red) a negative coefficient. The quantization range of the xvYCC$_{601}$ and xvYCC$_{709}$ colorimetry is always Limited Range.

## Background

Camera and display technology is evolving with more distinct primaries, spaced farther apart per the CIE chromaticity diagram. Displays with more separated primaries permit a larger gamut of displayable colors, however, color data needs to be available to make use of the larger gamut color space. xvYCC is an extended gamut color space that is backwards compatible with the existing BT.709 YCbCr broadcast signal by making use of otherwise unused data portions of the signal.
The BT.709 YCbCr signal has unused code space, a limitation imposed for broadcasting purposes. In particular only 16-240 is used for the color Cb/Cr channels out of the 0-255 digital values available for 8 bit data encoding. xvYCC makes use of this portion of the signal to store extended gamut color data by using code values 1-15 and 241-254 in the Cb/Cr channels for gamut-extension.

## Definition

xvYCC expands the chroma values to 1-254 (i.e. a raw value of -0.567–0.567) while keeping the luma (Y) value range at 16-235 (though Superwhite may be supported), the same as Rec. 709. First the OETF (Transfer Characteristics 11 per H.273 as originally specified by the first amendment to H.264) is expanded to allow negative R'G'B' inputs such that:
$V={\begin{cases}-1.099(-L)^{0.45}+0.099&L\leq -0.018\\4.500L&-0.018<L<0.018\\1.099L^{0.45}-0.099&L\geq 0.018\end{cases}}$
Here 1.099 number has the value 1 + 5.5 * β = 1.099296826809442... and β has the value 0.018053968510807..., while 0.099 is 1.099 - 1.
The YCC encoding matrix is unchanged, and can follow either Rec. 709 or Rec. 601 (Matrix Coefficients 1 and 5).
The possible range for non-linear R’G’B’$_{601}$ is between -1.0732 and 2.0835 and for R’G’B’$_{709}$ is between -1.1206 and 2.1305. That is achieved when YCC values are "1, 1, any" and "254, 254, any" in B' component.
xvYCC$_{709}$ covers 37.19% of CIE 1976 u'v', while BT.709 only 33.24%.
The last step encodes the values to a binary number (quantization). It is basically unchanged, except that a bit-depth n of more than 8 bits can be selected:
${\begin{aligned}Y_{{\rm {xv}}\ n}&=\left\lfloor 2^{n-8}(219\times Y+16)\right\rceil \\Cb_{{\rm {xv}}\ n}&=\left\lfloor 2^{n-8}(224\times Cb+128)\right\rceil \\Cr_{{\rm {xv}}\ n}&=\left\lfloor 2^{n-8}(224\times Cr+128)\right\rceil \\\end{aligned}}$

### Example

With negative primary amounts allowed, a cyan that lies outside the basic gamut of the primaries can be encoded as "green plus blue minus red". Since the 16-255 Y range is used (255 value is reserved in HDMI standard for synchronization but may be in files) and since the values of Cb and Cr are only little restricted, a lot of high saturated colors outside the 0–255 RGB space can be encoded. For example, if YCbCr is 255, 128, 128, in the case of a full level YCbCr encoding (0–255), then the corresponding R'G'B' is 255, 255, 255 which is the maximum encodable luminance value in this color space. But if Y=255 and Cr and/or Cb are not 128, this codes for the maximum luminance but with an added color: one primary must necessarily be above 255 and cannot be converted to R'G'B'. Adapted software and hardware must be used during production to not clip the video data levels that are above the sRGB space. This is almost never the case for software working with an RGB core.
The more complex example is YCbCr BT.709 values 139, 151, 24 (that is RGB -21, 182, 181). That is out-of-gamut for BT.709, but is not for sYCC and xvYCC$_{709}$, and to convert those values to display gamut you would convert to XYZ (0.27018, 0.40327, 0.54109) and then to display gamut.
The XYZ matrix is as specified in Nvidia docs.

## Adoption

A mechanism for signaling xvYCC support and transmitting the gamut boundary definition for xvYCC has been defined in the HDMI 1.3 Specification. No new mechanism is required for transmitting the xvYCC data itself, as it is compatible with HDMI's existing YCbCr formats, but the display needs to signal its readiness to accept the extra-gamut xvYCC values (in Colorimetry block of EDID, flags xvYCC$_{709}$ and xvYCC$_{601}$), and the source needs to signal the actual gamut in use in AVI InfoFrame and use gamut metadata packets to help the display to intelligently adapt extreme colors to its own gamut limitations.
This should not be confused with HDMI 1.3's other new color feature, deep color. This is a separate feature that increases the precision of brightness and color information, and is independent of xvYCC.
xvYCC is not supported by DVD-Video but is supported by the high-definition recording format AVCHD, PlayStation 3, Blu-ray. It is also supported by some cameras, like Sony HDR-CX405, that tag the video as xvYCC with BT.709 inside Sony's XAVC. Most of Sony's mirrorless cameras intended mainly for still photography tag this on recorded videos as well.

## History

On January 7, 2013, Sony announced that it would release "Mastered in 4K" Blu-ray Disc titles which are sourced at 4K and encoded at 1080p. "Mastered in 4K" 1080p Blu-ray Disc titles can be played on existing Blu-ray Disc players and will support a larger color space using xvYCC.
On May 30, 2013, Eye IO announced that their encoding technology was licensed by Sony Pictures Entertainment to deliver 4K Ultra HD video with their "Sony 4K Video Unlimited Service". Eye IO encodes their video assets at 3840 x 2160 and includes support for the xvYCC color space.

## Hardware support

The following graphics hardware support xvYCC color space when connected to a display device supporting xvYCC:
* AMD Mobility Radeon HD 4000 series and newer models
* AMD Radeon HD 5000 series and newer models
* AMD 785G, 880G and 890GX chipsets with integrated graphics
* Intel HD Graphics integrated on some CPUs (except Pentium G6950 and Celeron G1101)
* nVidia GeForce 200 series and newer models