Problem with tonemapping HDR-to-SDR mapping on N2

My TV (LG 79UF8609) does not support HDR over HDMI.

Using latest nightly 20190906. To play 4K-HDR/BT.2020 files with CE the ‘Tone map HDR to SDR’ option in CoreELEC-settings is used. After the option was changed always a reboot took place.

1 Option set to 'automatic’

1.1 Playing a 4K-HDR/BT.2020 movie:
Movie is too dark, compared with the same movie in the Bluray-version.
EOTF&Gamut are reported as SDR/BT.709
dispinfo during playing 4K-HDR/BT.2020:

1.2 Now playing a full-HD/BT.709 movie (no reboot):
Colors are ok, EOTF&Gamut are shown as SDR/BT.709
dispinfo during playing full-HD/BT.709:

2 Option set to 'active’
same as set to ‘automatic’

3 Option set to 'off’
3.1 New CE-reboot with option set to ‘off’:
3.1.1 First movie played after reboot is a 4K-HDR/BT.2020 movie:
Colors are much brighter than with HDR2SDR-option set to ‘active’ or ‘automatic’, but
a little pale. Maybe this can be corrected by TV setup. But details are much much clearer,
picture impression is very good.
This has also be reported by NathanX (CoreElec Nightly - hdr 2 sdr does not work)

EOTF&Gamut are reported as SDR/BT.2020nc (that’s correct)
MediaInfo reported:

colour_primaries : BT.2020
transfer_characteristics : PQ
matrix_coefficients : BT.2020 non-constant

dispinfo during playing 4K-HDR/BT.2020:

When the movie is stopped the colors of the CE-GUI are very oversaturated.

3.1.2 Second movie played (no reboot) is a full-HD/BT.709 movie:
Colors are MUCH too bright (reds are very oversaturated).

EOTF&Gamut are reported as SDR/BT.2020nc (as with the 4K-HDR/BT.2020 movie, that’ NOT correct).
But MediaInfo reported:

colour_primaries : BT.709
transfer_characteristics : BT.709
matrix_coefficients : BT.709

dispinfo during playing full-HD/BT.709:

3.2 New CE-reboot with option set to ‘off’, now playing order is reversed (1st full-HD/BT.709, 2nd 4K-HDR/BT.2020):
3.2.1 first movie played after reboot now is the full-HD/BT.709 movie:
Colors are correct (as with option set ro ‘active’ or ‘automatic’.

EOTF&Gamut are reported as SDR/BT.709 (that’s correct)

dispinfo during playing full-HD/BT.709:

After stopping the GUI-colors are correct.

3.2.2 second movie played is now the 4K-HDR/BT.2020 movie:
Picture is brighter as in case 1., but colors are washed out, faded and not brilliant.

EOTF&Gamut are reported as SDR/BT.709 (that’s NOT correct)

dispinfo during playing 4K-HDR/BT.2020:

Setting the HDR2SDR-option to ‘Off’ plays BT.2020-files correctly (picture-impression is good).
But playing a BT.709-file next without reboot gives very oversaturated colors.

For me something goes wrong when switching the tonemapping between BT.709 and BT.2020 movies.

Your conclusion is incorrect.
HDR to SDR off simply plays the video without any tone mapping. When it’s set to on with a SDR TV, it will tone map HDR down to SDR.
The tone map curve could be bad, but the functionality itself is working fine.

What I suggest is you should try to max out your TV’s backlight setting with HDR to SDR turned on, and then see if that makes a difference.


Thanks for your answer.
I will try with max backlight.

When HDR2SDR=off:
Why is there a difference with the colors, depending on the
sequence of playing a full-HD/BT.709 or 4K-HDR/BT.2020 file? (see my case 3 above).
In case 3.1 playing the BT.2020 file is correct and then playing the BT.709 file
gives oversaturated colors? And after reboot in the otherway round sequence
the BT.709 file is ok, but the BT.2020 file is not? That is inconsistent.

As I understand HDR2SDR=off should play a BT.709-file with the same colors as with
HDR2SDR=automatic or active, because in case of a BT.709-file no tonemapping is done.
Am I correct?

And why are the GUI-colors oversaturated with HDR2SDR=off and after stopping a BT.2020-file?

Do you have the possibility to investigate the inconsistent color-behaviour with HDR2SDR=off?

Do you need more imformation/logs?

It is very annoying always to have to reboot CE when playing a BT.709 movie after a BT.2020 movie… :unamused:

I see what you mean about #3.
@cdu13a can you chip in on what the problem could be with this?

Do you think you can have a look at this issue?
Do you need more infos/logs?

It’s on my list of things to checkout. However it might take me a bit to get to it.

Maybe my question is stupid… but is the tonemapping feature for the odroid n2 a kodi thing or a CoreElec thing?

It’s part of the vendor kernel, so it’s a CoreELEC thing.

I see - thank you :slight_smile:

I didn’t experience the exact same results as the thread starter and I am really happy that there in fact is a tonemapping feature available in CE. In order to improve this functionality, is there something that users can provide? Screenshots? Logs?