[FAQ] Video Levels and Color Spaces Demystified -- Get the Best Picture Quality
#16
(2015-12-15, 03:40)bossanova808 Wrote: Which version of Kodi are your results from, and on which platform? Because results are not consistent V15 to V16 and Windows vs. OE necessarily.

My results are based on Millhouse's Jarvis builds for the RPi, the Jarvis EGL Intel builds, and the default OE 6.0 builds on both the NUC and the RPi. I have been meaning to connect directly to my display to see if my AVR is touching the video but haven't found the time.
Reply
#17
Damn, the more i ask, the more questions i get Wink

Q3. OK so am i right assuming that source material in YCbCr limited output in RGB limited would yield the best PQ?
Q4. If my 1080p projector handle everything as it should (respect AV infoframes etc) and my Pi2 (OE) have the default config.txt config. What would the Pi negotiate and output?
Q5. If above don't conclude it, what Pi2 config.txt settings, Kodi settings and, if applicable, projector settings would yield the best video playback PQ?
Q6. I guess that most mediaplayer boxes regardless of type (android, android TV, chromebox w/ OE etc) still has the RGB 0-255 heritage mentioned above. Why is this? I think most users would rather have a correct outputed video than a correct outputed GUI/browser plugin/etc. Essentially, why aren't there any mediaplayers that handle media files as a blu-ray player does?
Reply
#18
(2015-12-16, 10:50)noggin Wrote: Mainly because PCs and GPUs are based around RGB colour space internally not YCbCr. VGA was an RGB standard (based on 0-255 colour space), and the form of DVI most commonly used by PCs was RGB 0-255 too. It was only really when PCs started having to handle DVDs and DVB/ATSC tuners, and start outputting HDMI video in 16-235 that 16-235 YCbCr colour space became an issue for PCs - but often you were playing 16-235 YCbCr content on a 0-255 RGB VGA/DVI monitor etc.

More than anything it's a heritage thing I think. PCs come from an RGB 0-255 heritage. Video comes from a 16-235 YCbCr heritage.

If you start thinking about 4:2:2 and 4:2:0 you also see that these colour spaces are not ideal for GUI and photo rendering as they have reduced chroma resolution. If you've ever run Windows in a 4:2:2 YCbCr mode you know how nasty it can look with smeared colours.

I know but somehow I believe that most bluray players output mainly in Rec.709 (4:2:0 YCbCr), so I expect from a mediaplayer to default to this standard. I know many cameras output to 4:2:2 and Sony using 0-16 range for encoding ,,triluminous" processing but from a standard point of view any translation results in more ore less errors.
Reply
#19
(2015-12-16, 18:58)hansolo Wrote: I know but somehow I believe that most bluray players output mainly in Rec.709 (4:2:0 YCbCr), so I expect from a mediaplayer to default to this standard. I know many cameras output to 4:2:2 and Sony using 0-16 range for encoding ,,triluminous" processing but from a standard point of view any translation results in more ore less errors.
4:2:0 YCbCr is not a valid HDMI video format up until HDMI 2.0. It had to be at least 4:2:2.
Reply
#20
(2015-12-14, 11:55)GrammatonKlerik Wrote: Which Combination to Use
Out of the eight combinations, only three have correct video levels by the time they reach the TV:
  1. Full,Full,Full -- Both Desktop & Video Content will look correct but video content is also scaled during the Y'CbCr --> RGB color space transformation. BtB & WtW are clipped so calibration will be more difficult
  2. Full, Limited, Limited -- This should be avoided since there are two levels of scaling which will likely cause unnecessary banding.
  3. Limited, Full, Limited -- Best option for embedded video player as there is zero video content scaling during the Y'CbCr --> RGB color space transformation. BtB & WtW are preserved to make calibration easier. If using a Desktop it will look overly dark
Your advice is questionable IHMO. Displays are RGB devices. All content fed to them eventually has to be turned into RGB 0-255 (in the case of an 8-bit panel) because that's what is sent to the display drivers (in the case of LCD) or equivalent DAC in any other digital display. The level expansion from 16-235 levels to 0-255 should be done at the same time as the color space conversion from Y'CbCr --> RGB. This means either send Y'CbCr (16-235) to your display and let the display convert it to RGB 0-255 internally in one step, or convert Y'CbCr to RGB 0-255 in the source and output that to the TV.

Since Kodi doesn't work natively in Y'CbCr and can't output it without intermediate conversions to RGB, the first is not an option. That leaves the 2nd as the best scenario. Since the color space conversion is done in floating point math you can simply change the coefficients slightly to generate 0-255 RGB, instead of 16-235 RGB, and get 8 good bits of data between 0-255 without any negative impact or issue from the level expansion. Converting Y'CbCr to RGB 16-235 and then having the display internally expand it to RG 0-255 is not ideal. You can't stretch 16-235 RGB to 0-255 RGB without introducing quantization error and the potential for banding / posterization.

That makes #1 the best scenario (unless the display can't accept RGB 0-255 levels). Yes, it's slightly harder to calibrate because you lose BTB and WTW, but it's not that hard to work around with the right patterns.
Reply
#21
(2015-12-16, 18:58)hansolo Wrote: I know but somehow I believe that most bluray players output mainly in Rec.709 (4:2:0 YCbCr)

No - they'll be 4:2:2 YCbCr rather than 4:2:0. Whilst DVD and Blu-ray players have 4:2:0 subsampled content on-disc they resample the chroma to 4:2:2 for playback and output this over HDMI as the minimum (though some will output 4:4:4 YCbCr or RGB as well)

4:2:0 is not a valid colour format for HDMI 1.x, and was only introduced for HDMI 2.0 (as a way of adding UHD 2160/50p and 60p over a lower bandwidth HDMI 1.x physical connection)
Reply
#22
I've had some success after changing some settings on my AVR to enable passthrough of an untouched signal from my GPU but now I have a question.

I have my signal chain setup limited-->full-->limited and I am able to see bars below 16 and above 235. Do I adjust my brightness on my display until only the bars above 17 are visible? All bars above 235 are visible and the contrast setting has no impact on this, do I just set my contrast for my preferred brightness and not worry about the whiter than white levels?
Reply
#23
(2015-12-17, 17:31)Jdiesel Wrote: I've had some success after changing some settings on my AVR to enable passthrough of an untouched signal from my GPU but now I have a question.

I have my signal chain setup limited-->full-->limited and I am able to see bars below 16 and above 235. Do I adjust my brightness on my display until only the bars above 17 are visible? All bars above 235 are visible and the contrast setting has no impact on this, do I just set my contrast for my preferred brightness and not worry about the whiter than white levels?
Based on your description your display wants 0-255 and you're sending it 16-235. So, either find the option in the menus to change the range of the format it's looking for to 16-235, or set your source to output 0-255.
Reply
#24
(2015-12-16, 20:19)Stereodude Wrote:
(2015-12-14, 11:55)GrammatonKlerik Wrote: Which Combination to Use
Out of the eight combinations, only three have correct video levels by the time they reach the TV:
  1. Full,Full,Full -- Both Desktop & Video Content will look correct but video content is also scaled during the Y'CbCr --> RGB color space transformation. BtB & WtW are clipped so calibration will be more difficult
  2. Full, Limited, Limited -- This should be avoided since there are two levels of scaling which will likely cause unnecessary banding.
  3. Limited, Full, Limited -- Best option for embedded video player as there is zero video content scaling during the Y'CbCr --> RGB color space transformation. BtB & WtW are preserved to make calibration easier. If using a Desktop it will look overly dark
Your advice is questionable IHMO. Displays are RGB devices. All content fed to them eventually has to be turned into RGB 0-255 (in the case of an 8-bit panel) because that's what is sent to the display drivers (in the case of LCD) or equivalent DAC in any other digital display. The level expansion from 16-235 levels to 0-255 should be done at the same time as the color space conversion from Y'CbCr --> RGB. This means either send Y'CbCr (16-235) to your display and let the display convert it to RGB 0-255 internally in one step, or convert Y'CbCr to RGB 0-255 in the source and output that to the TV.

Since Kodi doesn't work natively in Y'CbCr and can't output it without intermediate conversions to RGB, the first is not an option. That leaves the 2nd as the best scenario. Since the color space conversion is done in floating point math you can simply change the coefficients slightly to generate 0-255 RGB, instead of 16-235 RGB, and get 8 good bits of data between 0-255 without any negative impact or issue from the level expansion. Converting Y'CbCr to RGB 16-235 and then having the display internally expand it to RG 0-255 is not ideal. You can't stretch 16-235 RGB to 0-255 RGB without introducing quantization error and the potential for banding / posterization.

That makes #1 the best scenario (unless the display can't accept RGB 0-255 levels). Yes, it's slightly harder to calibrate because you lose BTB and WTW, but it's not that hard to work around with the right patterns.

This goes against everything I've read on this subject, including the OP, but what you're saying makes perfect sense. I'm currently using limited-full-limited and have ever so slight banding in my grey ramp. I'll have to try full-full-full and see how this compares.

Have you or anyone else tried both of these options?... What was your findings with respect to banding?
Reply
#25
(2015-12-16, 20:01)Stereodude Wrote: 4:2:0 YCbCr is not a valid HDMI video format up until HDMI 2.0. It had to be at least 4:2:2.
Thanks, I forgot that, you are right.

(2015-12-16, 20:19)Stereodude Wrote: Your advice is questionable IHMO. Displays are RGB devices. All content fed to them eventually has to be turned into RGB 0-255 (in the case of an 8-bit panel) because that's what is sent to the display drivers (in the case of LCD) or equivalent DAC in any other digital display. The level expansion from 16-235 levels to 0-255 should be done at the same time as the color space conversion from Y'CbCr --> RGB. This means either send Y'CbCr (16-235) to your display and let the display convert it to RGB 0-255 internally in one step, or convert Y'CbCr to RGB 0-255 in the source and output that to the TV.

Since Kodi doesn't work natively in Y'CbCr and can't output it without intermediate conversions to RGB, the first is not an option. That leaves the 2nd as the best scenario. Since the color space conversion is done in floating point math you can simply change the coefficients slightly to generate 0-255 RGB, instead of 16-235 RGB, and get 8 good bits of data between 0-255 without any negative impact or issue from the level expansion. Converting Y'CbCr to RGB 16-235 and then having the display internally expand it to RG 0-255 is not ideal. You can't stretch 16-235 RGB to 0-255 RGB without introducing quantization error and the potential for banding / posterization.

That makes #1 the best scenario (unless the display can't accept RGB 0-255 levels). Yes, it's slightly harder to calibrate because you lose BTB and WTW, but it's not that hard to work around with the right patterns.
Technically is correct but most TV disable processing for RGB signals, leaving with just 300lines motion resolution (from sample-and-hold limitations) and/or judder for 24p movies (no interpolation, pull-down instead frame repetition).
Reply
#26
(2015-12-18, 14:05)hansolo Wrote: Technically is correct but most TV disable processing for RGB signals, leaving with just 300lines motion resolution (from sample-and-hold limitations) and/or judder for 24p movies (no interpolation, pull-down instead frame repetition).

I guess ideally Kodi and the device GPU would pass through YCbCr to the TV but according to the guy you quoted this does not appear to be the case.

According to him, whether you run limited-full-limited or full-full-full your device is sending the TV an RGB signal. The conversion from YCbCr to RGB occurs within Kodi regardless. The only difference is how reference black and white are mapped: 16-235 or 0-256.
Reply
#27
Update:

I normally run my Kodi/OE (Fritsch Build) on a Haswell Mac Mini with a 2015 Sony 4K TV on Limited-Full(passthrough)-Limited. There is ever so slight banding visible on the grey ramp if you look closely but from 12' away on my 75" TV you can't see it. I would characterize the banding as consisting of very small steps. This is using a normal Cinema picture mode. BTB is visible if you increase the black level (brightness). WTW is always visible even on max contrast. I normally like my black levels so 19 is barely visible and 18 and 17 are black.

I just tried Full-Full-Full on the same setup. Black levels were slightly different... where 19 would normally be slightly visible, it was totally black but 20 was visible, so something changed slightly with the black levels it almost looked like the fall off in blacks increased slightly - I increased my TV black level (brightness) a couple of points to compensate so 19 was visible. As expected BTB and WTW were clipped. The ever so slight banding was still there but with an added more visible wide step added to the small step banding visible above. Does this mean there is an added conversion going on? Changing my TV to "Graphics" which apparently supports full RGB didn't make any difference, does this mean that the conversions (banding) is happening before the TV.

At least based on what I see with my eyes using the AVS709 test patterns, the limited-full-limited setting appears to offer slightly smoother grey ramp and better transition from grey to black on the low end. However, whiter than white cannot be tamed. The full-full-full had more visible banding, a little more dramatic transition from grey to black, but white levels were proper.

I'm not sure which is the better of the two setting combinations.
Reply
#28
(2015-12-18, 23:08)VirtualRain Wrote: Update:

I normally run my Kodi/OE (Fritsch Build) on a Haswell Mac Mini with a 2015 Sony 4K TV on Limited-Full(passthrough)-Limited. There is ever so slight banding visible on the grey ramp if you look closely but from 12' away on my 75" TV you can't see it. I would characterize the banding as consisting of very small steps. This is using a normal Cinema picture mode. BTB is visible if you increase the black level (brightness). WTW is always visible even on max contrast. I normally like my black levels so 19 is barely visible and 18 and 17 are black.

I just tried Full-Full-Full on the same setup. Black levels were slightly different... where 19 would normally be slightly visible, it was totally black but 20 was visible, so something changed slightly with the black levels it almost looked like the fall off in blacks increased slightly - I increased my TV black level (brightness) a couple of points to compensate so 19 was visible. As expected BTB and WTW were clipped. The ever so slight banding was still there but with an added more visible wide step added to the small step banding visible above. Does this mean there is an added conversion going on? Changing my TV to "Graphics" which apparently supports full RGB didn't make any difference, does this mean that the conversions (banding) is happening before the TV.

At least based on what I see with my eyes using the AVS709 test patterns, the limited-full-limited setting appears to offer slightly smoother grey ramp and better transition from grey to black on the low end. However, whiter than white cannot be tamed. The full-full-full had more visible banding, a little more dramatic transition from grey to black, but white levels were proper.

I'm not sure which is the better of the two setting combinations.

Do you have a receiver between your Mac Mini and your display? My Denon AVR has a setting for HDMI out that can switch between color spaces, however I never really noticed much of a difference by switching between Full and Limited on mine.
Reply
#29
(2015-12-19, 00:27)Jdiesel Wrote:
(2015-12-18, 23:08)VirtualRain Wrote: Update:

I normally run my Kodi/OE (Fritsch Build) on a Haswell Mac Mini with a 2015 Sony 4K TV on Limited-Full(passthrough)-Limited. There is ever so slight banding visible on the grey ramp if you look closely but from 12' away on my 75" TV you can't see it. I would characterize the banding as consisting of very small steps. This is using a normal Cinema picture mode. BTB is visible if you increase the black level (brightness). WTW is always visible even on max contrast. I normally like my black levels so 19 is barely visible and 18 and 17 are black.

I just tried Full-Full-Full on the same setup. Black levels were slightly different... where 19 would normally be slightly visible, it was totally black but 20 was visible, so something changed slightly with the black levels it almost looked like the fall off in blacks increased slightly - I increased my TV black level (brightness) a couple of points to compensate so 19 was visible. As expected BTB and WTW were clipped. The ever so slight banding was still there but with an added more visible wide step added to the small step banding visible above. Does this mean there is an added conversion going on? Changing my TV to "Graphics" which apparently supports full RGB didn't make any difference, does this mean that the conversions (banding) is happening before the TV.

At least based on what I see with my eyes using the AVS709 test patterns, the limited-full-limited setting appears to offer slightly smoother grey ramp and better transition from grey to black on the low end. However, whiter than white cannot be tamed. The full-full-full had more visible banding, a little more dramatic transition from grey to black, but white levels were proper.

I'm not sure which is the better of the two setting combinations.

Do you have a receiver between your Mac Mini and your display? My Denon AVR has a setting for HDMI out that can switch between color spaces, however I never really noticed much of a difference by switching between Full and Limited on mine.

I do have a Yamaha receiver. I don't think it has such a setting. I think it has some built in processing and up scaling but I've got it set to "Direct" which I would hope is pass through. I'll try bypassing the AVR to see if that makes any difference.

BTW, what way are you running things? Do you have any banding or other observations?
Reply
#30
(2015-12-19, 00:43)VirtualRain Wrote:
(2015-12-19, 00:27)Jdiesel Wrote:
(2015-12-18, 23:08)VirtualRain Wrote: Update:

I normally run my Kodi/OE (Fritsch Build) on a Haswell Mac Mini with a 2015 Sony 4K TV on Limited-Full(passthrough)-Limited. There is ever so slight banding visible on the grey ramp if you look closely but from 12' away on my 75" TV you can't see it. I would characterize the banding as consisting of very small steps. This is using a normal Cinema picture mode. BTB is visible if you increase the black level (brightness). WTW is always visible even on max contrast. I normally like my black levels so 19 is barely visible and 18 and 17 are black.

I just tried Full-Full-Full on the same setup. Black levels were slightly different... where 19 would normally be slightly visible, it was totally black but 20 was visible, so something changed slightly with the black levels it almost looked like the fall off in blacks increased slightly - I increased my TV black level (brightness) a couple of points to compensate so 19 was visible. As expected BTB and WTW were clipped. The ever so slight banding was still there but with an added more visible wide step added to the small step banding visible above. Does this mean there is an added conversion going on? Changing my TV to "Graphics" which apparently supports full RGB didn't make any difference, does this mean that the conversions (banding) is happening before the TV.

At least based on what I see with my eyes using the AVS709 test patterns, the limited-full-limited setting appears to offer slightly smoother grey ramp and better transition from grey to black on the low end. However, whiter than white cannot be tamed. The full-full-full had more visible banding, a little more dramatic transition from grey to black, but white levels were proper.

I'm not sure which is the better of the two setting combinations.

Do you have a receiver between your Mac Mini and your display? My Denon AVR has a setting for HDMI out that can switch between color spaces, however I never really noticed much of a difference by switching between Full and Limited on mine.

I do have a Yamaha receiver. I don't think it has such a setting. I think it has some built in processing and up scaling but I've got it set to "Direct" which I would hope is pass through. I'll try bypassing the AVR to see if that makes any difference.

BTW, what way are you running things? Do you have any banding or other observations?

I have tried just about every platform and build out there. Right now I am using the DSPlayer build with MadVR. I have MadVR set to Limited, my Intel GPU set to Full, and my Denon AVR set to Limited. I have no control over colorspace on my older Panasonic Plasma.

With this setup I am able to see BTB and WTW when using the AVSHD calibration videos. I adjusted my display's brightness to eliminate all the flashing bars below 17 and raised my contrast until my brightness was 30fL. The WTW is still there but as I understand this is not a problem. As for banding I notice very little, far less than I did when I had everything set to Limited.
Reply

Logout Mark Read Team Forum Stats Members Help
[FAQ] Video Levels and Color Spaces Demystified -- Get the Best Picture Quality1