Non-Rec.709 video has wrong colors/saturation

I have a Panasonic plasma (P55VT50). It has been professionally calibrated for Rec.709 video. Anyone familiar with this display will know that it has the best black levels (other than the newer VT60s) available, and it’s easy to see the difference between black and almost black. Likewise, slight color differences are fairly easy to notice.

My Rec.709 test files were remuxes of the BluRays of The Bourne Identity and Iron Man. For Rec.2020/HDR, I used remuxes of the UHDs of these discs. Although I used my personal BluRays to make the 1080p remuxes, I downloaded the UHD remuxes because I don’t have a UHD drive in my PC. So, it’s possible there is something wrong with those remuxes, and I’ll check that once I get the UHD drive installed and rip my discs.

The Rec.709 files looked exactly the same when played by the Vero as when played by other devices (including the TV itself).

So far the only thing I have really tried on the Vero end is to force RGB output (echo 1 > /sys/class/amhdmitx/amhdmitx0/output_rgb) and that didn’t change anything (other than have the TV tell me it was now getting RGB instead of YUV), so it doesn’t look like its an EDID issue as some have. Nevertheless, here’s my EDID:

00ffffffffffff0034a9d7a00101010100160103800000780adaffa3584aa22917494b00000001010101010101010101010101010101023a801871382d40582c4500ba882100001e011d8018711c1620582c2500ba882100009e000000fc0050616e61736f6e69635456300a000000fd00173d0f440f000a202020202020019d02032a71499005200403020706012309070173030c001000b82d2fc007814901fe0608000000e3051f01011d007251d01e206e285500ba882100001e8c0ad08a20e02d10103e9600ba88210000188c0ad08a20e02d10103e96000b88210000188c0aa01451f01600267c4300ba88210000980000000000000000000000000086

I read some of the other topics about forcing HDR to SDR, and it’s obvious that that conversion is happening even without forcing, as I don’t have the completely washed out colors you normally see with Rec.2020 on a Rec.709 display.

I tried changing some settings on the TV, and switching from the calibrated gamma to the built-in sRGB curve helped a lot, but I still ended up with crushed blacks and whites. White wasn’t too bright, but “almost white” was changed to white, just like “almost black” became black.

So, it seems to be down to LUT and other color conversion options. But, there are a lot of possible options, as shown in this thread:
https://discourse.osmc.tv/t/4k-hdr-videos-too-dark-on-non-hdr-tv/54220

So, where would be the best place to start? Since I know what “right” looks like in a pretty much absolute sense, I think I might be able to help you find out-of-the-box settings that will work best (assuming a calibrated display).

I’d also like to know if the setting changes in /sys/module/am_vecm/parameters need to be done while a video is running, and if they are persistent when stopping/starting videos.

Hello,

Can you chuck me:

  • cat /sys/class/amhdmitx/amhdmitx0/edid
  • cat /sys/class/amhdmitx/amhdmitx0/disp_cap
  • cat /sys/class/amhdmitx/amhdmitx0/hdr_cap

So I can see kernel interpretation of your EDID.

So, if I understand correctly:

  • BD rips as-is that are non UHD are OK
  • BD rips that are expected to be Rec2020 (not yet confirmed) are problematic.

So the issue is with 2020.

That’s correct. Conversion should take place by default now.
There isn’t an exact science to conversion unfortunately, but there is room for improvement.

They should be persistent. If you switch mode in a significant way, you could see changes. If you kept playing the same set of demo clips, all encoded as HDR, you should be able to iterate easily enough.

No fixed approach yet. To be honest – I think experience varies across displays. A set of aggressively tested presets configurable via Kodi will probably be the way to go. I know the SoC vendor (AML) have some improvements in the pipeline; so we’re also looking forward to their improvements

Sam

http://paste.osmc.tv/homoyuqado.avrasm

BTW, that’s a direct HDMI connection to the TV…no AVR involved I’ll solve video first, then see if the AVR screws it up.

The 2160p movies are definitely Rec.2020 (The Bourne Identity, here):

Video
ID                                       : 1
Format                                   : HEVC
Format/Info                              : High Efficiency Video Coding
Format profile                           : Main 10@L5.1@High
Codec ID                                 : V_MPEGH/ISO/HEVC
Duration                                 : 1 h 58 min
Width                                    : 3 840 pixels
Height                                   : 2 160 pixels
Display aspect ratio                     : 16:9
Frame rate mode                          : Constant
Frame rate                               : 23.976 (24000/1001) FPS
Color space                              : YUV
Chroma subsampling                       : 4:2:0 (Type 2)
Bit depth                                : 10 bits
Language                                 : English
Default                                  : Yes
Forced                                   : No
Color range                              : Limited
Color primaries                          : BT.2020
Transfer characteristics                 : PQ
Matrix coefficients                      : BT.2020 non-constant
Mastering display color primaries        : Display P3
Mastering display luminance              : min: 0.0000 cd/m2, max: 1000 cd/m2
Maximum Content Light Level              : 1000 cd/m2
Maximum Frame-Average Light Level        : 73 cd/m2

Knowing about the “persistence” of the various attributes was a big deal, as I didn’t want to have to do the echo/play/cat to verify cycle for so many different settings.

I can understand that HDR->SDR doesn’t have a standard defined, because it’s basically a hack to extend the number of bits of luminance, but Rec.2020 is just another color space, and color space conversions have been done easily for years. I’m beginning to think this is another attempt at backdoor DRM, like some of the BluRay players that won’t play files with video bitrates higher than 20Mbps, or won’t pass through lossless audio from files.

So, thanks for your efforts in figuring out this stuff so we don’t have to use “certified” players.

Thanks for the follow-up.

The parameters look OK. It will be interesting to know if you can tweak your way out of this so that it looks any better.

Sam

No luck with the parameters listed.

Forcing hdr_mode has no effect, as it was correctly picking it. Setting it to 0 resulted in desaturated video.

force_csc_type appears to be a bitmask, with “255” meaning “pick the best from all available”. For my hardware, it picked 64. Trying various other settings gave the very washed out look often seen with HDR/Rec.2020. This setting applies changes immediately while playing a video.

range_control had no effect.

I played with a few others that looked like they might do something, but without docs, I don’t think I can really tweak. Where are the docs for these parameters?

One last thing…if you have Iron Man, watch the very beginning, when Tony is in the Humvee. Pause at the first shot looking at Tony from the front of the Humvee. Look at the background behind him (the back and side walls of the Humvee). It should not be solid black…it should be close to black, with variations. This is how it looks on my display when watching the regular BluRay. On the UHD, it is solid black (except for the dimple/rivet in the side wall). For most people, using most displays, the BluRay will also look like this, because only a handful of displays can resolve any differences in luminance so close to black.

Similarly, right after the start of chapter 2, the outside of Tony’s house should be various shades of stone…white all the way down to grey. Everything more than about 85% full white turns to while on the UHD version.

This is definitely some sort of “levels” issue with conversion, with the full luminance spectrum mapped to a smaller one, so that everything close to black becomes black, and everything close to white becomes white.