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

The Basic Principles Of Production Control Room Design

Designing and building a production control room means different things to different people and is often accomplished in a myriad of ways.

Keeping Studio IP Media Streams Reliable - Part 2

Distributing error free IP media streams is only half the battle when building reliable broadcast infrastructures. SDP files must match their associated IP media essence or downstream equipment will not be able to decode it. In this article we dig…

Keeping Studio IP Media Streams Reliable - Part 1

Modern broadcast facilities adopting video and audio over IP have found themselves working with thousands, or tens of thousands, of IP streams. Expecting humans to keep track of all these flows, monitor their quality and efficiently fault find is a…

Flexible Contribution Over IP - Part 2

Delivering determinant latency is more important than fighting variable latency, even if it is small. In this article, we look at how codec design and JPEG-XS can scale to make the best use of network bandwidth while keeping latency predictable.

The Pros (And Cons) Of Adding Cloud For Remote Workflows

At this year’s IBC Show in Amsterdam, finally in-person after two years, remote production solutions were scattered throughout the exhibition floors, to no real surprise. Reduced costs, travel and shipping expenses, scalable infrastructure and efficient use of resources were a…