When outputting video to a TV or monitor, dark colors are displayed as gray, while light colors are displayed as white. What is YCbCr signal in HDMI

When using a Blu-ray player or game console, you often have to choose from a variety of color space modes. The most common options include YCbCr, 4:2:2, 4:4:4, RGB, RGB Full or Enhanced, RGB Limited. For the most part, all of this is various ways display the same content except "RGB Full". So what does this color space setting mean and what should you choose?

To display images on a TV, monitor or projector, the RGB method is used. With few exceptions, each pixel on the screen consists of Red, Green and Blue (R., G., B.) subpixels. Everything that goes to your display turns into an RGB signal at some stage. But initially, not everything is an RGB signal.

So why do YCbCr and RGB exist? This could be the topic of a separate article in itself, but we can immediately say that it has to do with black and white televisions, the transition from b/w to color TV, as well as the peculiarities of our visual perception. RGB treats all content the same, whereas YCbCr allows the black-and-white and color information of a signal to be treated differently. Since we are more sensitive to the black and white component than the color component, this separate approach allows for more compression (actually, the “CbCr” part of “YCbCr”), making the black and white more detailed. Our eyes don't see the difference, but we save a lot of traffic and storage space.

Full and limited RGB ranges are a completely different story. These names are confusing because it is logical to assume that we would always prefer to deal with full set data. Who would even think of choosing something limited for themselves? The answer has to do with how TVs handle video signals versus computers.

TVs use a range from 16 to 235. Signal levels up to 16 are defined as black, and information beyond 235 is considered white. A calibrated (correctly configured) TV will never show a signal below 16 other than as black. Most also interpret a signal above 235 as white, since video content should not contain such a signal.

With computers the situation is different - they use the range 0-255. There are no signal levels lower than 0 or higher than 255, since there are a total of 256 possible values. In short, this is much easier to understand due to the lack of ideas about “blacker than black” and “whiter than white” that apply to televisions.

It is because of these differences that the concepts of “full range RGB” and “limited range RGB” exist. Movies and TV programs use a signal range of 16-245. In computers and video games the range is 0-255. Since TVs and computer monitors use two different scales, there must be a way to change from one to the other. By setting a device's RGB range to "full" or "limited", we do just that.

When working with TVs, you should always use the “restricted” mode. By limited we mean limiting the signal range to 16-235 instead of the full 0-255. In the case of movies and TV programs, there will be no change since they are already in the 16-235 range. In the case of video games, this mode will convert from 0-255 to 16-235. Otherwise, the bright and dark areas of the image will lose their shading and gradation and appear pure black and white, and the image will not look right. You thus lose nothing by using an "RGB limited" signal, but using "RGB full" will result in a loss of image detail. You will also want to properly adjust the TV's "brightness" and "contrast" using a tuning dial such as Spears & Munsil.

The image below takes the test image from the beginning of the article and displays it as the TV would do when fed a "full" RGB signal. You can see cut off, indistinguishable light areas, while the dark part of the gradient ( smooth transition) all black. This is the detail in the highlights and shadows that we will lose.

With a computer monitor, the opposite approach is used. "Full RGB" will display video games and other content created in the 0-255 format in the correct 0-255 range. But TV shows, movies and other content in the video range (16-235) must be expanded to use the entire range available to computer displays. If you use "limited range" instead, shadows will appear gray instead of black, and highlights will appear dull. You won't be able to take full advantage of your monitor, and your content will look lackluster. The image below is the opposite of the previous one - now we have no highlights, they are slightly gray instead of white, while the black looks like a dark gray.

Although the terms themselves are not very good, "RGB full" and "RGB limited" allow the use of AV devices ( Blu-ray players, game consoles, etc.) together with TVs or computer monitors, without adjusting the image settings each time. Using this setting correctly, you will be able to see all the details in the highlights and shadows on any device. You don't have to tune your TV twice to watch content various types. I hope this helps clear up some of the misunderstandings that arise regarding the settings mentioned.

I have found that the topic generates a lot of discussion. In particular, new misconceptions are emerging regarding how the various ranges work, particularly with gaming consoles. I hope I can clear up a couple more questions to make the setup process easier to understand.

Q: Because video games use full RGB palette, shouldn't I use the full palette when playing games and switch to the limited palette when watching movies?

Oh no. Most video games are designed to use the full RGB gamut because they are created on computers that use it. However, when you play a game with a full range and your game console installed in limited mode, this circumstance is taken into account. Signal levels are shifted from 0-255 to 16-235, gamma correction curves are also adapted to the TV. You won't lose anything because everything is taken into account.

Q: When using the limited range, I get a low-contrast image. When using full, details in the shadows are cut off. What to do?

A: If you have a TV, then “limited range” will work correctly. A low-contrast image is caused by the TV settings setting the brightness too high. You should use an adjustment disc such as the free AVS 709, World of Wonder, Spears & Munsil and use them to adjust the image correctly. After this, the black levels will be correct in range limited mode, you will see all the shadow detail and it will have adequate contrast.

Q: My TV supports "Full Range" - should I use it?

Oh no. TVs support this mode to simplify the calibration process. Most TVs will not display blacks below 16 as the video content should not have it. Allowing you to see the black 15 or 14 simplifies the calibration process, allowing you to set the black correctly. However, you really shouldn't use this as your primary mode, as most displays aren't built to display levels below 16, and will often introduce unwanted color casts when going beyond the 240 (or so) limit. Plus, if you limit yourself to the 16-235 range, you'll get a brighter image with a better contrast ratio since you can turn up the "contrast" setting higher. Contrast ratio is what the eye is most sensitive to, so the resulting image will be more pleasing.

Also, since any content other than video games will only use the 16-235 range, the settings mentioned will apply to all signal sources, not just one.

ProjectorWorld Note: The meaning of the above is not very clear and may contain an error.

Q: Should I set the console to "Auto-detect" instead of selecting "limited" or "full"?

Oh no. If you can choose "limited" or "full", then it is better to do so. The console selection will be based on the EDID data of your display, receiver, or whatever is connected directly to it. Typically this is not a problem, but some devices provide incorrect data or the data is interpreted incorrectly by the console. Good example- Roku 3 set-top box, which does not allow you to change this setting. One receiver I tested reported the wrong EDID to my Roku, causing it to switch to full RGB mode, cutting off shadows and making the image look ugly. If Roku had allowed me to change the mode, the problem could have been avoided. Since you know which mode to use, it is better to make the choice yourself, thereby avoiding complications.

Q: What's with the "Super white" mode on PS3 and PS4?

A: "Super White" allows you to display YCbCr values ​​above 235 (in the case of Y - 240). It won't hurt anything - it's best to leave it on. Some Blu-ray content has reflections, such as sun reflecting off water, that may be brighter than maximum white and would not otherwise be displayed. This mode will allow you to watch such content if you wish, but will not affect anything when working with other types of content. This will not expand the dynamic range, but will simply allow you to work with signal levels beyond the standard maximum.

I hope this cleared up a few more issues with the mentioned settings. The rule of using "limited range" with TVs and "full range" with PC monitors still applies. The only thing is that you may need to configure the TV after selecting correct installation to make sure all the details are visible.

Lecture topic: Color systems 20th century. Systems "Y": YUV, YCbCr, YPbPr, YIQ, YDbDr.

"Y" color models

There are several closely related color models that have in common that they use explicit separation of brightness and color information. Component Y corresponds to the component of the same name in the model CIE XYZ and is responsible for brightness. Such models are widely application in television standards, since historically there was a need for compatibility with black-and-white televisions, which only received a signal corresponding to Y . They also used in some image and video processing and compression algorithms.

In television for standard PAL color model is applied YUV, For SECAM- model YDbDr, and for NTSC- model YIQ. These models are based on the principle according to which the main information is carried by the brightness of the image - the component Y(important - Y in these models it is calculated completely differently than Y in model XYZ), and the other two components responsible for color are less important.

One of the problems encountered color television , was Problem displaying color video on a black and white TV. It was necessary to transform RGB-signal at one image brightness signal Y . Best result obtained by transformation according to the formula:

Y = 0.299 R + 0.587 G + 0.114 B ,

Where R, G And B - the brightness of the corresponding color components, and their coefficients reflect the physiological characteristics of our vision.

Together with brightness signal Y so-called U chrominance signals And V :

U = B - Y, V = R - Y .

In color model YUV these quantities are considered as three components color shade . On television before the show video signal it is converted into ether from RGB V YUV according to the above formulas, and in television receivers the reverse conversion occurs. Components U And V responsible for color transmission. In fact, different television systems use slightly different formulas to calculate U And V .

Conversion to RGB and back

R = Y + 1.13983 * V;
G = Y - 0.39465 * U - 0.58060 * V;
B = Y + 2.03211 * U;


U = -0.14713 * R - 0.28886 * G + 0.436 * B;
V = 0.615 * R - 0.51499 * G - 0.10001 * B;

Where R, G, B - respectively , Y - brightness component, U And V - color difference components.

The model is widely used in television broadcasting and video data storage/processing. The luminance component contains It was convenient at the time of its appearance color TV for compatibility with older black and white TVs.

In color space YUV there is one component that represents brightness (brightness signal), and two other components that represent color (chrominance signal). While luminance is conveyed with full detail, some detail in components of a chroma signal devoid of luminance information can be removed by downsampling the samples. (filtering or averaging) which can be done in several ways (i.e. there are many formats for saving an image in the YUV color space).

Introduction

Many modern videos codecs used color space YCbCr, which is a version of the color model YUV. It would be more accurate to write YCbCr with subscripts b And r. Here's what the color space elements mean:

Y = brightness or intensity (luma); size 8 bits; values ​​from 16 to 235.

The luminance component contains "black and white" (grayscale) image, and the remaining two components contain information to restore the required color.

Cb = "chroma blue" (chroma) blue-yellow.

Cr = "chroma red" (chroma) or more precisely the color deviation from gray on the axis red-cyan.

Green color can be derived from these three values.

Color components are formed with the expectation of digital transmission according to standard ITU-R BT.601. Coding DVD-Video By MPEG-2 based on signals YCbCr 4:2:0.

Color space YCbCr often mistakenly confused with space YUV, which in turn is not used in digital processing , and is used in systems based on the system analogue color television PAL, such as analog television or analog magnetic video tapes.

Color bodies YCbCr:

It is worth noting that if RGB-coding each pixel has various components R, G And B channels, then for YCbCr-coding this statement is not true. YCbC r-coding uses the empirical fact that the human eye is more sensitive to changes in brightness pixel, rather than to changes in its color. So everyone pixel images in space YCbCr has a single component value Y (brightness), but at the same time may be part of a group of pixels having same value Cb And Cr.

The last remark leads to understanding indexes at YCbCr: 4:2:0.4:2:2.4:4:4 and so on. These proportions indicate the degree decimation(thinning) chromaticity . Each of the numbers in proportion corresponds to the sampling frequency of the corresponding channel:

1st - channel Y
2nd - channel Cb
3rd - channel Cr

4:4:4 format

Thus, 4:4:4 format means that for 4 channel samples Y there are 4 channel counts Cb AndCr , And every pixel contains unique values ​​of 3 channels (same as RGB model). No decimation doesn't happen, and consequently loss of quality.

4:2:2 format

4:2:2 format means what's happening decimation by chromaticity 2 times in the horizontal direction. That is, when encoding, the value is taken into account Y everyone pixel and meaning Cb And Cr every secondpixel .

4:2:0 format

4:2:0 format means what's happening decimation 2 times through channels Cb And Cr , but in in this case also in the vertical direction.

Matching formulas YCbCr - RGB:


Color models YCbCr And YPbPr are variations YUV with other scales for U And V (they correspond to Cb/Pb And Cr/Pr) . YPbPr used to describe , A YCbCr- For digital.

YPbPr is a color space used in video electronics, particularly in relation to component video inputs. YPbPr This analog version color space YCbCr, they are both numerically equal, but YPbPr designed for analog systems , while YCbCr For digital video.

Due to the fact that people often get tired trying to quickly pronounce YPbPr, these video cables are often called "Yipper cables". YPbPr often called in everyday life "component video", but this is not entirely accurate since there are many other types component video (mainly RGB with green synchronization or one or two separate signals).

YPbPr converted from RGB video signal, which splits into three components Y, Pb, And Pr .

Y carries information about brightness (luma) And synchronization (sync);

Pb means difference between blue and brightness (B - Y) ;

Pr means difference between red and brightness (R - Y) .

The green signal is not sent because it is derived from the luminance, blue, and red information.

Transition from RGB to YPbPr

YPbPr used to describe analog signals(mainly in television), A YCbCr- For digital. To determine them, two coefficient : Kb And Kr . Then the transformation from RGB V YPbPr is described as follows:

Choice Kb And Kr depends on what RGB-model is used (this in turn depends on the reproducing equipment). Usually taken as above, Kb = 0.114; Kr=0.299 . IN lately also use Kb = 0.0722; Kr=0.2126 , which better reflects the characteristics modern devices display.

YPbPr also means - connector, which is used to connect DVD or BluRay player, DTV decoder, HD multimedia player. YPbPr component input intended for transmission analog video signal- this provides best quality images with accurate color reproduction. As a result, the picture quality is close to cinema - well-developed details, high contrast and rich color.

Model YIQ

For NTSC color television was presented two basic requirements:

1) Be within the specified range of 6 MHz,

2) Ensure compatibility with black and white television.

In 1953 the system was developed YIQ.

Color appears as 3 components - brightness (Y) And two artificial color difference (I And Q) . Signal I called in-phase , Q - quadrature .

Conversion to RGB and back carried out according to the following formulas:

R = Y + 0.956 * I + 0.623 * Q;
G = Y - 0.272 * I - 0.648 * Q;
B = Y - 1.105 * I + 1.705 * Q;

Y = 0.299 * R + 0.587 * G + 0.114 * B;
I = 0.596 * R - 0.274 * G - 0.322 * B;
Q = 0.211 * R - 0.522 * G + 0.311 * B;

Where R, G, B - respectively color intensities of red, green and blue, Y - brightness component, I And Q - color difference components. Coefficients are given for color temperature V 6500 K, corresponding to natural light on a sunny day.

The model is used in television broadcasting M-NTSC standards And M-PAL, Where video bandwidth noticeably less than in other television standards. The luminance component contains "black and white" (grayscale) image, and the remaining two components contain information to restore the required color.

Using the model YIQ was a necessary measure. Psychophysiological studies have found that the resolution of the eye in color is less than in the brightness component, and the eye is thus little sensitive to the color of small details. Due to this, when creating a compatible system color television managed to reduce color difference frequency band (not containing brightness information, unlike the signals of the primary colors R, G and B) three to four times. To reduce the noticeability of interference from color difference signals on black and white TVs, it should be as small as possible, which corresponds to a larger subcarrier frequency. But at the same time the upper side chrominance band was suppressed even when the bandwidth was reduced fourfold, which when quadrature modulation led to distortion of color shades.

Further research has established that the eye is sensitive to color transitions of various types. different sensitivity, which made it possible to group the so-called. "warm" And "cold" shades, and in one group reduce resolution three more times. Now it was enough to transmit one of the signals stripes only 0.5 MHz, with the upper and lower side stripes transmitted without restrictions.

On phase plane (if you imagine R-Y as a vertical axis, and B-Y, as horizontal) signalsI And Q rotated relative to them by 33 degrees.

YDbDr- color space used in standard SECAM. It is very similar to the system YUV.

YDbDr components:

Y - brightness;

Db - difference in blue chromaticity;

Dr is the difference in the color of red.

Translation formulas from RGB V YDbDr:


Color space YDbDr also used in variety standard PAL - PAL-N.

It is known that color image requires at least three numbers per pixel to accurately convey its color. The method chosen to represent brightness and color is called color space.

There are three most popular color models– this is RGB (used in computer graphics); YIQ, YUV or YCbCr (used in video systems); and CMYK (used in color printing). All color spaces can be derived from the RGB space extracted by cameras and scanners.

This color space is most widely used in computer graphics. Red, green and blue are the main components of colors and represent the three dimensions of a given space (Fig. 3). The indicated diagonal of a cube with equal RGB values ​​indicates gradations of gray from black to white.

Rice. 3. RGB color cube

CRT and LCD color displays display RGB images by separately illuminating the red, green, and blue components of each pixel. If you look at the screen from the distance of an ordinary viewer, the various components merge into a single “correct color”.

RGB space suitable for computer graphics, because there, these three components are used to form color. However, RGB is not very effective when it comes to real images. The fact is that to preserve the color of images, it is necessary to know and store all three RGB components, and the loss of one of them will greatly distort the visual quality of the image. Also, when processing images in the RGB space, it is not always convenient to change only the brightness or contrast of an individual pixel, because in this case, you will need to read all three RGB component values, recalculate them to the desired brightness, and write them back. For these and other reasons, many video standards use luminance and two color difference signals as a color model other than RGB. The most famous among such spaces are YUV, YIQ and YCbCr. Despite the fact that they are all related to each other, there are nevertheless some differences.

It is known that the human visual organs are less sensitive to the color of objects than to their brightness. In the RGB color space, all three components are considered equally important, and they are usually stored at the same resolution. However, it is possible to display a color image more efficiently by separating luminosity from color information and presenting it at a higher resolution than color. Therefore, the YCbCr color space and its variations are a popular method for efficiently representing color images.

The letter Y in such color spaces denotes the luminosity component, which is calculated as a weighted average of the R, G and B components using the following formula:

,

where denotes the corresponding weighting factor. The remaining color components are essentially defined as the differences between the Y luminosity and the R, G and B components:

This results in four components of the new space instead of three RGB. However, the number Cb+Cr+Cg is constant, so only two of the three chromatic components need to be stored and the third calculated from them. Most often, Cb and Cr are used as the two desired color components. The advantage of YCbCr space over RGB is that Cb and Cr can be represented at a lower resolution than Y because The human eye is less sensitive to the color of objects than to their brightness. This makes it possible to reduce the amount of information required to represent chromatic components without noticeably degrading the quality of the image's color tones. This approach to color space conversion has an additional effect when compressing color images. In this case, compression algorithms first convert the original color space from RGB to YCbCr, compress, and then, during recovery, convert the image back to the RGB color space, because it is used in computers. In this case, the formulas for direct and inverse transformations look like this:

direct conversion

inverse conversion

Note that the factor kg is obtained from the relation, and the value of the component G is obtained by subtracting the sum of Cb and Cr from Y.

As noted above, the chromatic components Cb and Cr can be represented with lower resolution than the light component Y. In practice, the following formats for their mutual representation are used.

The most obvious format is the so-called 4:4:4 format, which means complete accuracy in the transmission of chromatic components, i.e. for every 4 light counts Y, 4 counts of the Cb and Cr components are transmitted (Fig. 4 a).

Rice. 4. Arrangement of chromatic components

Another 4:2:2 format (YUY2) assumes that for every 4 samples of the Y component there are two samples of the chromatic components, the location of which is shown in Fig. 4, b. This format is used for high-quality color video and is used in the MPEG-4 and H.264 standards.

The most popular sampling format is 4:2:0 (YV12) each component Cb and Cr has one sample per 4 samples Y (Fig. 5 a, b). Moreover, the counts of the Cb and Cr components are, as a rule, calculated in two ways. In the first case, interpolation is performed using the 4 closest readings of the Cb and Cr components to form one reading for them (Fig. 5, a). This approach is used in MPEG-1 and H.261, H.263 standards. In another case, interpolation is performed along two vertical samples (Fig. 5, b) and is used in the MPEG-2 standard.

Rice. 5. 4:2:0 format presentation

Due to the cost-effective presentation of color scenes, the 4:2:0 format is widely used in many consumer applications such as video conferencing, digital television, DVD. Since chromatic components are sampled 4 times less frequently than luminance components, the 4:2:0 YCbCr space takes up 2 times fewer samples compared to the 4:4:4 RGB video format.

The problem is a mismatch between the color space ranges of the video content and the display, as well as the settings of the decoder, player and video card driver.

  • Video distributed on discs and transmitted to digital television has a YCbCr color format with a dynamic range of 16-235. Video from the Internet, especially delivered via Flash player and records gameplay, has the format RGB colors with a dynamic range of 0-255. Some video recordings, mostly low-quality “rips” from disks, are in YCbCr format with a range of 0-255.
  • Computer monitors use the RGB color space with a range of 0-255, TVs use RGB with a range of 16-235. Some TVs (mostly LCD) support RGB display with a range of 0-255.

Ideally, the dynamic range of the video source should match that of the receiver. In practice, decoders, players, NVIDIA driver and even the TV itself can apply various dynamic range conversions, often leading to the said color mismatch problem. Below are the main recommendations for different cases:

  1. Output video with range 0-255 per computer monitor or TV (connected via VGA output or supporting range 0-255 when connected via HDMI). Update your NVIDIA driver to version 180.XX or later. In the driver panel, go to the “Adjust video color settings” section and in the “Dynamic range” option, set the range to full (0-255).
  2. Output video with a range of 16-235 to a computer monitor or TV (connected via VGA output or supporting the range of 0-255 when connected via HDMI). Update the NVIDIA driver to version 180.XX or later and in the "Adjust video color settings" section of the NVIDIA panel, in the "Dynamic Range" option, set the range to full (0-255). If you are using an older video card, use decoder conversion tools ffdshow or player Media Player Classic - Home Cinema. In FFDShow, in the properties of the video decoder, on the “Output” tab, disable all color spaces except RGB, and on the “RGB conversion” tab specify the output device type “Computer monitor”. In MPC-HC, in the options, configure the render output to “VMR renderless” or “EVR CP” and in the “Play” menu, enable the “Shaders” item and specify “16-235 -> 0-255” (video card support for pixel shaders version 2.0 is required )
  3. Output video with a range of 0-255 to a TV or video recording devices via analogue or HDMI output. Use the ffdshow decoder conversion tools or media player Player Classic- Home Cinema. In FFDShow, in the properties of the video decoder, on the “Output” tab, disable all color spaces except RGB, and on the “RGB conversion” tab, specify the output device type “TV/Projector”. In MPC-HC, configure the render output to “VMR renderless” or “EVR CP” and in the “Play” menu, enable the “Shaders” item and specify “0-255 -> 16-235” (requires video card support for pixel shaders version 2.0).
  4. Output video with a range of 16-235 to a TV or video recording devices via analog or HDMI output. Just check that YCbCr-RGB conversions are not enabled anywhere in the decoder, player, or receiver itself.