ArticleslgStudy

science

YCoCg

YCoCg is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand YCoCg rather than just read about it. In short: 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.

YCoCg — main illustration
YCoCg — illustration

Key takeaways

  • YCoCg belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect YCoCg to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of YCoCg from memory before moving on to harder problems.

Reference excerpt

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.

History and naming The earliest documents (circa 2003) referred to this color model as YCoCg. It was adopted in an international standard for the first time in H.264/AVC (in its second edition professional extensions project), which had primarily been designed to use the YCbCr color model. When it was adopted it was noted that the Co component carried the deviation toward red and was thus more similar to Cr than Cb, so the signal assignment and the naming was switched in the standard, resulting in the YCgCo alternative name (YCgCo is used in ITU-T H.273).

Advantages The YCoCg color model offers several advantages, compared to YCbCr. Because it uses simple coefficients, all based on division by two, it is much faster to compute. Furthermore, YCoCg offers better decorrelation of the color planes, which improves compression performance. It is also exactly losslessly invertible.

Conversion with the RGB color model The three values of the YCoCg color model are calculated as follows from the three color values of the RGB color model: [YCoCg]=[141214120−12−1412−14]⋅[RGB] 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 (⁠1/4⁠, ⁠1/2⁠, −⁠1/4⁠). 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: [RGB]=[11−11011−1−1]⋅[YCoCg] To perform the inverse conversion, only two additions and two subtractions are necessary, with integer-valued coefficients, by implementing it as:

The lifting-based YCoCg-R variation A scaled version of the transformation, sometimes called YCoCg-R (where the "-R" refers to reversibility), can be implemented efficiently with a reduced bit depth. The scaled version uses a lifting scheme to make it exactly invertible while minimizing the bit depth of the three color components. For RGB signals with bit depth n, the bit depth of the Y signal when using YCoCg-R will be n and the bit depth of Co and Cg will be n+1, as contrasted with ordinary YCoCg which would need n+2 bits for Y and Cg and n+1 bits for Co. Here, possible values for Y are still in [0, 1], while possible values for Co and Cg are now in [-1, 1]. The conversion from RGB to YCoCg-R is:

The conversion from YCoCg-R to RGB is then:

(All divisions are truncating, as in C. The forward transformation may be adapted to produce a similar implementation of YCoCg.) It is also possible to pack all three elements in 3n bits using modulo arithmetic. However, the resulting discontinuity at wraparound can confuse subsequent stages of compression.

Efficiency gains The screen content coding (SCC) extensions of the HEVC (H.265) standard and the VVC (H.266) standard include an adaptive color transform within the residual coding process that corresponds with switching the coding of RGB video into the YCoCg-R domain. Use of YCoCg color space to encode RGB video in HEVC-SCC found large (~20%) coding gains for lossy video, but minimal gains when using YCoCg-R to losslessly encode video. The reversible variant gives 4.21 dB of coding gain, compared to 3.54 dB for the BT.470 color matrix and 3.98 dB for the JPEG 2000 reversible color transform.

Literature P. Agawane and K. R. Rao (Multimedia Processing Lab, University of Texas at Arlington), "Implementation and evaluation of residual color transform for 4:4:4 lossless RGB coding Archived 2010-07-04 at the Wayback Machine". International Conference on Recent Advances in Communication Engineering, Hyderabad, India, December, 2008.

References

Worked examples

Example 1 — a first encounter with YCoCg

Start with the simplest possible case. Write down what YCoCg claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to YCoCg before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about YCoCg ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of YCoCg

In research
YCoCg appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses YCoCg in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
YCoCg is common in secondary-school and first-year university syllabi. It links to neighbouring topics Color space, so understanding it makes those chapters shorter.
In everyday life
Look for YCoCg outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.
Ask Teacher Smith questions about this articleOpens your AI tutor with a question about “YCoCg” →

How to study YCoCg in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what YCoCg means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain YCoCg out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is YCoCg in simple terms?

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 d…

Why does YCoCg matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study YCoCg?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on YCoCg.

Tags

  • Color space

Keep exploring