Why color levels go wrong in different color spaces

Don’t confuse YUV color space with RGB color space. The differences are critical for broadcast signals.

Digital and file-based technology provides broadcasters with an abundance of benefits and improvements to the transfer, storage, control and transmission of video by terrestrial, satellite, cables and web based delivery. However, no matter what systems are used by the broadcaster, the same fundamental requirements remain, deliver a consistent video signal to the viewer with no shadow detail lost because the blacks have been crushed, no highlights burning out half the picture, with natural colors and with loudness levels consistent from program to commercial, trailer to program.

To do this, broadcasters set and operate equipment within technical standards. Every new piece of content must be checked before transmission. Commercial spots may arrive as DV tapes from post and agencies, or downloaded over a satellite link or network such as DG Fastchannel. The encoding and formatting may be good but are the underlying baseband video levels accurate and good to go? Why do problems often occur in even the most carefully composited and edited content?

The challenge is that digital displays and television signals use different color spaces. The allowable levels of video luma and chroma in broadcast have to be carefully controlled so that when converted and displayed on the screen they reproduce the original picture and colors.

Why YUV

Computer screens and digital graphics use an RGB color space where colors are made up of combinations of Red, Green and Blue values usually expressed as 8 bit or 0 – 255.

Video signals use a YUV color space where the Y is Luminance or brightness, and U and V are color difference or Chroma values for Blue and Red also known as Cb and Cr . This is partly for historical reasons. The original black and white televisions used only the brightness Y. Color difference signals U and V were added when color television came along.

Color video is base on a YUV color space where the Y is Luminance  and U and V are Chroma values for Blue and Red. Computer screens and digital graphics rely on an RGB color space where colors are made up of combinations of Red, Green and Blue values usually expressed as 8 bit or 0 – 255. The quality of your broadcast signal depends on engineers understanding the the difference.

Color video is base on a YUV color space where the Y is Luminance and U and V are Chroma values for Blue and Red. Computer screens and digital graphics rely on an RGB color space where colors are made up of combinations of Red, Green and Blue values usually expressed as 8 bit or 0 – 255. The quality of your broadcast signal depends on engineers understanding the the difference.

YUV does however have a practical purpose in digital television as the human eye is more sensitive to changes in brightness than color hue. This allows the U and V chroma information to be sampled as a lower rate than the Y without sacrificing the perceived quality of the image. The ratio of subsampling between adjacent rows of pixels is expressed as 4:2:2, 4:2:1 or 4:2:0 video.

Luma Y’ is related to Luminance but is actually the combination of gamma corrected RGB colors. Luminance is a closer measure of true brightness but Luma is more practical to use for technical reasons. The prime symbol ‘ which denotes gamma correction is frequently omitted and YUV color spaces usually refer to luma Y’UV not luminance. Luma is derived from an RGB color by taking a weighted average of the red, green, and blue components.

For standard-definition television, the following formula defined in specification ITU-R BT.601 is used for analog video: Y’ = 0.299R + 0.587G + 0.114B. This formula reflects the fact that the human eye is more sensitive to certain wavelengths of light than others, which affects the perceived brightness of a color.

Blue light appears least bright, green appears brightest, and red is somewhere in between. This formula also reflected the physical characteristics of the phosphors used in analog televisions. The U and V chroma values or color difference values, are derived by subtracting the Y’ value from the red and blue components of the original RGB color: U = B-Y’ and V = R-Y’.

A newer formula in ITU-R BT.709 is used for high-definition television: Y’ = 0.2125R + 0.7154G + 0.0721B. Digital video uses a form of YUV called Y’CbCr which scales the values to 8 bit and adds offset.

The 601 formula for SD becomes: Y’=(0.257R + 0.504G + 0.098B) + 16.

The 709 formula for HD becomes: Y’=(0.183R + 0.614G + 0.062B) + 16

This table shows RGB and Y’CbCr values for various colors using the BT.601 definition.

This table shows RGB and Y’CbCr values for various colors using the BT.601 definition.

This above table shows that the Y’ and Cb/Cr values for colors are far from intuitive. The value of Y’ is scaled from 16 – 235, and the Cb/Cr from 16 – 240 with 128 representing zero. Some values of Y’ and Cb/Cr fall outside the range of full black to full white. For example Y’ values 0-15 are sub-black, and Cb/Cr values above 240 are outside of the color range or burned out.

Importantly it is also possible to have legal Y’CbCr values which give illegal RGB values (below zero being the most common). For example Y’CbCr values of 20,125,136 would give the RGB values of 18,-1,-1.

Legalizer toll

Verifying Y’CbCr correct levels requires careful control of the allowable values or broadcast color Gamut that represent the original colors. Legalizers try to ensure that the Y video signal lies between 16 and 235, Chroma 16 – 240, and lift or crush them if they are outside these values. However this can have the effect of losing detail or burning colors.

Say, for example, there was a sequence of video bytes (say a luminance ramp from black to white) which were coming in as 16, 17, 18, 19, 20, 21, 22, 23… 233, 234, 235 and the lift control was turned down so that these values became 13, 14, 15, 16, 17, 18, 19, 20… 230, 231, 232 then at the output of the legalizer the signal would be 16, 16, 16, 16, 17, 18, 19, 20… 230, 231, 232

Thus, some original detail has been clipped off or ‘crushed out’ and could never subsequently be recovered. If the lift control is later turned back up on this modified signal, the sequence would be 19, 19, 19, 19, 20, 21, 22, 23… 233, 234, 235, that is to say most of the picture would be returned to its original value, but the blacks would now be raised up and ‘black’ would be a dark grey – the original near-black detail is gone forever.

Converting between digital graphics and television color spaces can produce errors which show up as loss of picture quality or color artifacts. Adjusting Y’CbCr video levels that stray outside of the ITU 601/702 broadcast allowable levels is a complex task that requires a far more sophisticated analysis of the image than simple legalization.

Intelligent Auto Correction

The latest generation of correction tools for video levels use intelligent algorithms that analyse the image to correct limit violations while maintaining the integrity and quality of the picture. Vidchecker and Vidfixer quality control software from Vidcheck use algorithms developed and patented by the company that correct video levels in file-based digital video to gracefully bring them back into broadcast specification without degrading the image quality and introducing the visual artefacts previously produced by legalizers.

You might also like...

HDR & WCG For Broadcast: Part 3 - Achieving Simultaneous HDR-SDR Workflows

Welcome to Part 3 of ‘HDR & WCG For Broadcast’ - a major 10 article exploration of the science and practical applications of all aspects of High Dynamic Range and Wide Color Gamut for broadcast production. Part 3 discusses the creative challenges of HDR…

IP Security For Broadcasters: Part 4 - MACsec Explained

IPsec and VPN provide much improved security over untrusted networks such as the internet. However, security may need to improve within a local area network, and to achieve this we have MACsec in our arsenal of security solutions.

Standards: Part 23 - Media Types Vs MIME Types

Media Types describe the container and content format when delivering media over a network. Historically they were described as MIME Types.

Six Considerations For Transitioning To Cloud Based Video Distribution

There are many reasons why companies are transitioning from legacy video distribution workflows to ones hosted entirely in the public cloud, but it’s not a simple process and takes an enormous amount of planning. Many potential pitfalls can be a…

IP Security For Broadcasters: Part 3 - IPsec Explained

One of the great advantages of the internet is that it relies on open standards that promote routing of IP packets between multiple networks. But this provides many challenges when considering security. The good news is that we have solutions…