CoreElec Nightly - hdr 2 sdr does not work

Hi there,

I got my N2 yesterday, put the recent CoreElec Nightly on microSD card and set hdr to sdr tonemapping to active.

To check this feature I played a 2160p mkv file with 10 Bit and HDR metadata, but the colors seemed to be washed out and the picture in general was way to dark. So I guess the tone mapping does not work or a took a non suitable source file. Does anyone know a suitable demo?

I also checked the kodi.log file, but i did not find anything obvious there - although I must admit that I do not understand that much from the log file anyway :slight_smile:

The N2 is connected to a Denon AVR, a Darbee box is following and a 1080p Beamer comes at the end. A PC with plex media player is connected to the very same Denon AVR, tonemapping works fine there, so my best guess is, that the problem should be the N2.

So for the moment, I do honestly not know where i could find the source of the problem.

Any help is warmly welcome!

Thanks,
nathan

1 Like

SDR to HDR works ok, but I’m pretty sure that the tonemap is geared towards a relatively bright TV.
Also SDR to HDR will only work, if the device at the end of the HDMI cable doesn’t support HDR natively. If the device supports HDR, it will not activate HDR to SDR tonemapping.

My projector does not support HDR at all, so SDR to HDR is switched off in the coreelec settings, which seem to be standard setting.
Actually I am looking for the other way round: HDR to SDR tonemapping, playing a 4k HDR mkv on the odroid which is connected to the 1080p SDR projector (Benq W1070) at the end. Already connected the N2 directly to the projector, no change.

Maybe the link to the logs helps?

Kodi logs

You can do a simple test. Turn HDR to SDR off, reboot, check how it looks. Then turn it on, reboot and check how it looks.
If you see a difference, then it means that HDR to SDR is working. Otherwise, it means that the N2 sees the device it’s connected to as HDR capable, and therefore it does not enable HDR to SDR tone mapping.
All of this is done automatically by the kernel, and it’s confirmed to work.

I did as you suggested and surprise: there is a difference :slight_smile: I used a LG New York HDR Demo file, switched tonemapping off (yes: off!) and the video looks brighter, although with a bit pale colours. You can get really every detail even in dark scenes. Pressed the “o” key on my remote, EOTF & Gamut said SDR BT.2020.
I reactivated tonemapping again, pressed “o” again, EOTF & Gamut said SDR BT.709. Guess that means that tonemapping is working, but the video is quite dark again, it is really hard to get the details in dark scenes.
So, is there any possibility to change/improve the way of tonemapping? Also found this line in the Kodi log:
ERROR: GetString: error reading /storage/.kodi/userdata/disp_cap
I am not an expert, but maybe this means, that Kodi does not now what the projector is capable of and therefore the tonemapping results in the way described above?

btw: the htpc with windows/plex media player does tonemapping as expected… maybe because Windows can recgonizes and handles the projector in a different way?

I will try to look into it this upcoming week or next weekend, maybe the tone mapping curve can be changed. But I can’t really promise anything, as I’m not that sure it’s easy.

Thanks a lot in advance as well as for your precious help so far!

I am quite sure as well that it is not easy. Some month ago I played around with the tonemapping settings in Plex (which uses mpv) where you can tweak the settings in mpv.conf. You can change the tone mapping mode there, the saturation and the brightness.
Found some example there, no idea if that can help in any way:
Tonemapping / mpv.conf

And yes, I know Kodi uses a totally different platform, so I will just wait and maybe there will be some improvement. If not, I am still very glad that you have helped me :slight_smile:

Just out of curiosity: could the result of the hdr-> sdr tonemapping be caused by those entries in the kodi.log?

ERROR: GetString: error reading /storage/.kodi/userdata/disp_cap
ERROR: GetString: error reading /sys/class/amhdmitx/amhdmitx0/vesa_cap

I am certainly no expert, but maybe Kodi does not properly tonemap when it does not know the display capabilities and/or the vesa capabilities?

No, this is not related. It’s just Kodi trying to read those files without first checking whether those files exist first. It must be something in one of our patches, not actual Kodi code, but this has nothing to do with HDR tone mapping.

Thanks a lot for clarification!

I can confirm the findings of @NathanX. My LG 55EG920V is a HDR 4K OLED, but HDMI does only accept 1080p SDR signal. The Odroid N2 performs the HDR to SDR with tonemapping, but the picture is very dark. Would be nice with an option to enable a brighter picture when tonemapping has occurred.

How is that ?
Your TV has 4K UHD 10bit panel and 3 x HDMI 2.0, and it cannot reproduce 3840 x 2160 resolution over HDMI ?

@TheCoolest–back on July 5th I asked about HDR to SDR with BT2020 using 4k ripped mkv files. You answered: “None of us have a projector. And I doubt any of us actually understand how the current HDR -> SDR mapping works exactly, so changing it makes no sense, when you don’t know what you are doing.
In addition, most of the users who actually use HDR -> SDR, don’t use a WCG projector, but a SDR TV.
I do understand your request, but I’m sorry to say that it is very unlikely that we are going to change the defaults provided by Amlogic.”

I’ve not followed the progress here since the major USB3 problem, but I popped in today and found this thread. Perhaps with the new Kernel default changes from AML–real HDR-SDR with BT2020 is now possible for projector owners like the the OP (with 1080p) and me who have 4k capable displays, but not enough brightness for HDR.

Is it?

And thanks again for all your teams hard work,
Ron

@Sholander You are right, I was stunned when I found out. Apparently it is a hardware limitation, 4K HDR is only possible through players running on the TV itself, none of the HDMI inputs support more than 1080p. In order to get high-quality sound through my AVR, I’ll have to use an external player (Odroid N2) and settle for 1080p.

You say one thing and then counter it with a complete opposite.
The TV has HDMI 2.0a ports, meaning it supports HDR10 over HDMI.
According to multiple users here, it works just fine.
You probably just need to enable UHD Deep Color on the HDMI port that your box is connected to in the TV settings.

When we switch over to the Android kernel, things may change, but there’s nothing new to report about tone mapping at this point.

@TheCoolest Two versions of the TV motherboard exist for this model, ZA and ZD as described in this post. Needless to mention that I unfortunately have the ZA version.

This article is about the EG960, though, not EG920. Do both use the same motherboard?

Yes it is essentially the same TV, 920 is equipped with smaller speakers. I bought it second hand a couple of years ago, and I did not try to feed it with an external HDMI based 4K HDR source until recently, and then I discovered this fatal flaw. Most of my 4K HDR contents is from Plex, played by the internal XPLay app. But sound is downsampled before it is sent out through ARC to my AVR. This is why I use the Odroid N2 with CoreElec to get Atmos passthrough for my 4k HDR movies.

I just tried the SDR to HDR option for some films that are not in HDR, i get the HDR logo pop up, and they look so much better, can see loads of detail and the over glowing whites are toned down, thats working good for me.