YCoCg

The YCoCg color model, also known as the YCgCo color model, is the color space formed from a simple transformation of an associated RGB color space into a luma value (Y) and two chroma values called chrominance orange (Co) and chrominance…

Uses your system voice; voice and rate in settings.

Snapshot

≈ 3 min read

Names in other languages

No names in other languages are held for this entry yet.

Article bodies are English and are not machine-translated. A name in another language is not a translation of the article.

The YCoCg color model, also known as the YCgCo color model, is the color space formed from a simple transformation of an associated RGB color space into a luma value (Y) and two chroma values called chrominance orange (Co) and chrominance green (Cg). It is supported in video and image compression designs such as H.264/MPEG-4 AVC, HEVC, VVC, JPEG XR, and Dirac.

It is simple to compute, has good transform coding gain, and can be losslessly converted to and from RGB with fewer bits than are needed with other color models. A reversible scaled version with even lower bit depth, YCoCg-R, is also supported in most of these designs and is also used in Display Stream Compression.

The more complete definition with variable bit depths of Y and chrominance values is given in ITU-T H.273. \begin{bmatrix} Y \\ Co \\ Cg \end{bmatrix} = \begin{bmatrix} \frac{1}{4} & \frac{1}{2} & \frac{1}{4} \\ \frac{1}{2} & 0 & -\frac{1}{2} \\ -\frac{1}{4} & \frac{1}{2} & -\frac{1}{4}\end{bmatrix} \cdot \begin{bmatrix} R \\ G \\ B \end{bmatrix} The values of Y are in the range from 0 to 1, while Co and Cg are in the range of −0.5 to 0.5, as is typical with "YCC" color models such as YCbCr. For example, pure red is expressed in the RGB system as (1, 0, 0) and in the YCoCg system as ( , , − ).

However, since the coefficients of the transformation matrix are simple binary fractions, it is easier to compute than other YCC transformations. For RGB signals with bit depth n, either the resulting signals would then be rounded to n bits or would ordinarily be n+2 bits when processing data in this form (although n+1 bits would be sufficient for Co). The inverse matrix converts from the YCoCg color model back to the RGB color model: \begin{bmatrix} R \\ G \\ B \end{bmatrix} = \begin{bmatrix} 1 & 1 & -1 \\ 1 & 0 & 1 \\ 1 & -1 & -1\end{bmatrix} \cdot \begin{bmatrix} Y \\ Co \\ Cg \end{bmatrix} To perform the inverse conversion, only two additions and two subtractions are necessary, with integer-valued coefficients, by implementing it as: tmp = Y - Cg; R = tmp + Co; G = Y + Cg; B = tmp - Co;

Text derived from https://en.wikipedia.org/w/index.php?oldid=1339743343 under CC BY-SA 4.0; modifications have been made.

Sources cited in this revision

13 named source(s) extracted from the cited revision. A source with no author is shown by its publication; nothing is invented.