Home
Icon LA VIE D'ABORD LA VIE D'ABORD, association to help people and families facing cancer ...
Registered VIP members: 13360
[15h50: 23 visitors - 1 VIP in]

Color selection for TV output

When editing video you will often tune the color ,brightness and contrast to your taste ... only to find out when you view the output on the TV it doesn't really quite look that good. Why this happens and what you can do to prevent this will be explained in this article.

The problem with handling video on a computer is that the computer monitor can handle more different colors than a TV screen can. Furthermore the Video signals don't suffer from cross modulation effects since the components are never combined. A computer video card generate independent Red Green and Blue signals. When this signal gets converted to a TV signal , either by a plug in analog output card , or trough the process of making a DVD or (S)VCD certain problems arise. In case of a (S)VCD or DVD the problems arise the moment the player reads the disc and converts the digital information to a so called composite video signal.

The advent of the S-Video standard has cured some of the problems but not all. A newer emerging standard is the YCrCb connection. Sometimes also referred to and labeled as YUV although that is not technically correct. Certain higher quality DVD players bring these signals out. And very good TV sets ( especially the HD sets ) have inputs for these signals.

Understanding TV signals and the YCrCb color space

Before we look at what can happen we need to have a basic understanding on how video information is processed and transmitted.

Video information is represented by 2 components : A brightness (luma) and a color (chroma) component. The luma signal is represented by the symbol Y and calculated from the R G and B values. The chroma component is a 'vector' pointing to a color on a color chart. This vector is represented by the Cr and Cb signals.

ycrcbmap

The Cr and CB data is calculated from the RGB data according to these formula's :

Y = 0.3R + 0.59G + 0.11B

Cr = R-Y = 0.7R-0.59G-0.11B
CB = B-Y = -0.3R-0.59G+0.89B

The Cr and CB signals are the Red and Blue channels with he luma (Y) removed. Technically you would also need the Cg signal but once you recalculate R and B you can reconstruct G by simple mathematics.

The factors for R G and B have been experimentally determined and are actually a representation of how the human eye detects colors. The eye is much more sensitive for blue then it is for green.

A small difference in the blue luminosity will be picked up faster then a small difference in the green level. The eye is also much more sensitive for Luma fluctuations than it is for chroma change.

Now why do editing programs use this YUV representation and not the RGB ?. Simply because it reduces drastically the number of calculations that need to be done to alter a pixel.

Example :

Luma ( brightness and contrast ) changing : In RGB color space if you wan to increase the brightness you need to calculate 3 new values ( keeping in mind the different sensitivity factors of our eyes for the individual colors. One multiplication each for R G and B. In a YCrCb color space all you do is increase or decrease the value of the Y byte ( addition and subtraction ). Adding and subtracting is less time consume then multiplication.

Changing contrast is a matter of plotting the existing values on a exponential scale and then re-scaling them.

In the image below I have not touched the Cr or CB component but simply played with the Y value. This resulted in a brightness change.

Low value for Y Midpoint for Y High value for Y
lospace rawspace hispace

Interpolating between pixels ( to put effects for instance. ) :You take the average of the U components and the average of the V components. Done. The new pixels brightness will lay in the middle between the surrounding pixels. And its chroma vector will point to the new color In RGB color space you need to make the averages too, but again keep in mind the sensitivity factors. The calculations are again more complex and take longer.

The overall calculation complexity goes down and speed goes up.

Problems treating and displaying Video information

The problems can be classified in 2 categories:

  • Signal distortion : These are the problems inherent to analog video signals and are created during the digital to analog conversion and transmission path. This includes problems caused by the digital compressors used to encode for (S)VCD or DVD.
  • TV Display limits : These are the problems caused by the re-conversion process that happens in a TV to display the image contained in the analog signal

Let's have a look at what what can happen in each of these stages and the possible solutions for them

Signal Distortion :

In the analog video world the color signals are also transmitted as YCrCb. Because the same simple rules to change contrast and color saturation apply. The electronics becomes Very simple and does not every time need to take the non-linearity of the human eye into account. Converting between RGB and YCrCb color space is an operation you do once. In analog electronics this is a simple operation. In the computer .. it doesn't need to be done since digital encoded video is most of the time already stored in this . When captured by the camera it is directly encoded into YCrCb

The distortion happens because these 3 individual signals Y Cr and CB need to be combined to form the composite video signal. The information is encoded as an amplitude , a frequency and a phase. Because of combination there occurs a phenomenon called intermodulation. : The signals will affect each other and become slightly distorted. The TV set needs to break this signal apart in its components. It needs a very stable frequency detector and phase detector. Because of internal drift of these detectors an additional error is introduced here.

svideo  

The S-Video standard overcomes this by keeping the Luma and Chroma separate. The Luminance ( intensity ) is transmitted separately from the chroma ( color ) . although a lot better it is not perfect yet.

High-end DVD players and TV sets actually have YCrCb inputs and outputs. These are sometimes labeled as YUV YCrCb ,or YPrPb.

The image on the left shows a S-Video connector. The picture on the right show you the classic composite ( yellow plug ) but also the YCrCb ( gray for Y , blue for CB and red for Cr.

plugs

Signal compression created problems.

Whenever you create an output stream using a compressed format the signal quality will deteriorate even further. Often you have no control over what the output of the compressor is going to look like. While you can control bitrate and compression strength there is no standardized way to make sure that the compressor does not create abrupt chroma or luma jumps. The only way to prevent this is to pre-smoothe your source video before sending it trough the compressor. One way to do such a thing is to apply a so called film-look effect.

crisp

When the above Raw transient from red to blue is shown on a computer monitor there is no problem. On a TV screen however the red will bleed into the blue. Bleeding typically occurs when jumps are made from one end of the spectrum to the other ( diagonal jumps ). Aliasing will insert a couple of pixels containing an interpolated color. This will change the vector so only one direction is traveled at the same time in the color space

TV display limits.

a TV is made with older technology then a computer monitor. Because in general you are further away fro a TV screen then a computer monitor , small fluctuations go by unnoticed. If you would show a static image on a TV then these fluctuations would become noticeable , but since TV is all about moving images it passes. The eye is very forgiving. Also the number of pixels is very limited on a TV set. Because of all these lower requirements the electronics to drive a TV picture tube , and the tube itself for that matter) can be made much cheaper . the drawback is that , when you try to show computer generated video on a TV , the TV set often can not follow the quick information changes that a computer monitor could display. The TV will be thrown off and might show things that aren't even there.

Another problem is that some things can actually throw the electronics in the TV off. Displaying a pure saturated white image can make the TV picture change size. This has to do with the way a TV picture tube is driven. Because of lower standard electronics all kinds of bizarre things go on. a last problem is that the synchronization of a TV set can be thrown off easier then that one of a computer monitor a TV has to 'reconstruct ' his sync information where a computer monitor gets it as separate signals form the computers video card. To make the TV set less susceptible to this problem the electronics will 'clip' the incoming analog signal to make it easier to detect the sync information. But in doing that part of your information gets lost.

Most people don't realize this but if you consider the whole path between the point where a camera picks up an RGB information pixels and the time it gets shown on a TV about 25 to 30 % if the original information is lost. But the human eye doesn't seam to mind because our brain will adjust itself anyway.

Problems and their solution

Now that you have an understanding of how video information is treated, and where the problems are created you will be able to understand the following problems and their solution.

Color bleeding : this happens when strong bright color suddenly are followed by darker low intensity. The TV can not follow this sudden jump and will create a bleeding effect. You can solve this by :

  • never going to full saturation ,
  • run anti-Aliasing. This inserts deliberately interpolated pixels that enables the TV set to follow the change easier.
  • Stay between intensity levels 32 and 230. Don't go near peak luma as this will cause bleeding.
  • Use and editing tool that understands the concept of 'TV-Safe' colors and automatically locks them out.

 

Moire patterns : rapid repetitive fluctuations of color will throw of the frequency and phase detectors. The internal drift in the TV set of these detectors will cause an interference pattern that becomes visible as a Moire patter. By interpolating again the video production tool can avoid this.

To summarize :

  • Avoid colors saturated over 80%, and certain color combinations where the hue is very far apart should be kept to even lower saturation.
  • Avoid "pure white" backgrounds, as they can cause some television screens to "bow".
  • Keep the luminance (Y) values for color combinations far apart.

The editing solution :

By using an editing program that understands these concepts you will avoid running into problems when creating effects and titles. However there is one more pitfall. Because of all the possible things going on you still don't see on the computer display what the image is going to look at on a real TV.

That is why editing studio's always use a real TV monitor hooked in to the real video signal to monitor the output. This can be done in the amateur studio as well..

By installing a dual head video card like the Matrox G450 or G550 you can hook up a TV set to the second channel and do the color adjustment there. Since you now are doing the whole process to convert from RGB out ( video card ) to YUV and composite to the TV and back to the picture tube you will see the loss of information. You can then adjust the colors until they are perfect on the TV. They might look strange on the computer but it's the end result that counts.

Getting a small inexpensive 14 inch TV screen and set it up next to the computer monitor covers that. You are looking at a total investment of roughly 150 to 180 $ for the TV and about 120 to 130 for the Dual Head video card.


Credits

Author: Vincent Himpe (12 July 2002 - Version 1)

 

Interface en français... Full window view...
Login




[ register | I forgot my pass ]
Newsletter


Subscribe
Unsubscribe
labDV recommends Firefox
Get Firefox
labDV is a trademark of BPF Sarl (France) - Copyright reserved © 2002-2015