Different color spaces - or how levels go wrong

Digital and file-based technology has transformed the world of broadcasting with many advantages 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 – that a consistent video signal is delivered 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 to trailer to program.

To do this, broadcasters set technical standards. Every new piece of content has to be checked before transmission, and for commercial spots this may be tens or hundreds of DV tapes from post and agencies, or files arriving every day over a satellite link or network such as DG Fastchannel. The encoding and formatting may be good but are the underlying baseband video levels correct and good to go, and 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 as the original black and white televisions used only the brightness Y to which were added the U and V when color television came along.

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

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

Color Table

This shows that that the Y’ and Cb/Cr values for colors are far from intuitive. Y’ is scaled from 16 – 235, and the Cb/Cr from 16 – 240 with 128 representing zero. So 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

Checking Y’CbCr levels are correct 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.

So 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.

For more information see www.vidcheck.com