[SOLVED] HLG HDR output flagged as HDR10 PQ

I’ll try them in the internal player and on the RockPro64 which outputs HLG correctly flagged as HLG in LibreElec.

It’ll take me a little while to get Android installed - can I boot that from uSD ? And do I need to do anything to boot from uSD rather than eMMC ? (I see an SPI / MMC switch on the front)

Choose the latest Android Pie using 32-bit system as 64-bit is fairly new and has probably a lot of issues… So version selfinstall-odroidn2-eng-s922_9.0.0_master-91-20191028.img by following HK’s OS installation guide or HK’s flashing guide :slight_smile:

You can either switch to SPI and choose OS with Petiboot, latest version is 201911-rc1 from the latest page of the thread, or unplug eMMC as you say and use mSD. The easiest way is to install petiboot by copying the renamed spiboot.img to an empty mSD card to update/install, wipe the same mSD card and flash Android to it with Etcher and finally plug it into with SPI selected and then choose OS with Petiboot.

Update: At first boot with Android, you have to remove eMMC with CE and not select SPI (turn the switch to the right). After that, the partions should be set-up so you can use SPI and don’t need to remove eMMC every time you want to use Android :+1:

Try the following in SSH:
echo 0 > /sys/module/am_vecm/parameters/hlg_process_mode
echo 1 > /sys/module/am_vecm/parameters/force_pure_hlg
Then start your HLG video and see if it works right or not.

Also, please post the link returned by dispinfo command during video playback before making the above change and after.

Great - thanks for this @TheCoolest and @CI6N0Z - am away from my HDR TV this evening. Should be able to do that tomorrow (though I can do the Android and SPI stuff tonight in preparation)

What your tv says when you play HLG content from the N2 (HLG or HDR)? My LG shows HLG.

Update 2:
In my case, my AVR is the issue as the manual says it supports HDR, yet nothing more regarding which HDR standard. So, unfortunately it might not support HLG. I’ve sent Onkyo a mail for clarification regarding this.

Dispinfo from playback when N2 is connected directly to TV

------------ /sys/devices/virtual/amhdmitx/amhdmitx0/config ------------
cur_VIC: 94
cur_video_param->VIC=94
VIC: 94 3840x2160p25hz
Colour depth: 10-bit
Colourspace: YUV444
Colour range: default
EOTF: HLG
YCC colour range: limited
Colourimetry: BT.2020nc


@TheCoolest, I can also confirm HLG samples being played in HDR10 as seen from dispinfo during playback of HLG sample

Running the following two commands, I’m not able to change hlg_process_mode as seen below, yet the value is already 0.

CoreELEC: ~ # echo 0 > /sys/module/am_vecm/parameters/hlg_process_mode
sh: can’t create /sys/module/am_vecm/parameters/hlg_process_mode: Permission denied
CoreELEC: ~ #
CoreELEC: ~ # echo 1 > /sys/module/am_vecm/parameters/force_pure_hlg

So, with force_pure_hlg = 1 the sample is played in SDR as seen in dispinfo during playback of HLG sample with force_pure_hlg = 1

Update:
As seen from dispinfo, HLG support is not checked for my display and I’m actually not 100% sure that my TV supports HLG. According to Samsung they say that “All of Samsung’s 2016 HDR TVs support HLG Broadcast technology” (Source). By playing a HLG Youtube sample, stats says: Color: arib-std-b67 (HLG) / bt2020 with vp9.2 (337) codec. However, I can’t confirm it actually being played in HLG, so noggin has to verify and look deeper into this as he has a HD Fury Vertex :+1:

OK - am back with my UHD HDR TV and AVR. Both of which are HLG compatible.

Here’s dispinfo output in idle whilst displaying 1080p50 SDR without any video playing http://ix.io/21p2 (Interestingly this seems to suggest it thinks my AVR+TV combo isn’t HLG compatible?

------------ /sys/devices/virtual/amhdmitx/amhdmitx0/hdr_cap ------------
HDR Static Metadata:
    Supported EOTF:
        Traditional SDR: 1
        Traditional HDR: 1
        SMPTE ST 2084: 1
        Hybrif Log-Gamma: 0
    Supported SMD type1: 1
    Luminance Data
        Max: 0
        Avg: 0
        Min: 0

HDR Dynamic Metadata:

colorimetry_data: c3

When I play the short sample.mkv clip of Seven Worlds, One Planet without making any changes I get this : http://ix.io/21p3

It’s output in HDR10 mode - but looks like it may be being converted from HLG to HDR10 - at least partially.

If I then type echo 1 > /sys/module/am_vecm/parameters/force_pure_hlg the TV goes into SDR mode and the picture looks correct (for HLG displayed backwards compatibly with SDR). I can then manually force my TV into HLG mode. My guess is that the N2 doesn’t think my TV / AVR is HLG?

dispinfo gives me this http://ix.io/21p4

I’ll try and take my AVR out of the chain - but both my TV and my AVR support HLG.

I’ll give Android a go too.

I thought the same about my Onkyo AVR which state at the website “This Onkyo AVR enables transmission of High Dynamic Range (HDR) formats…” So it should be able to passthrough HDR formats such as at least HDR10 and HLG. I’ve sent Onkyo an email to clarify this.

At least your results look similar to mine and I bet that you’ll get “Hybrif Log-Gamma: 1” and EOTF: HLG as I did when you connect N2 directly to your TV.

1 Like

What are the full product names for your TV and AVR? And which firmware version are they on?

Our edid values for the AVRs are quite similar. Two things to look into are ColorDeepSupport b8 and DolbyVision2 HDR DeepColor vs HDR DeepColor which I’ve. So, from edid, CoreELEC can’t recognice if the AVRs support HLG…

Update: With a newer Denon AVR, edid is similar, but HLG is working fine. In my case I think it’s my AVR which have issues with passthough of HLG

I have a Denon AVR X2400H (which had an HLG firmware upgrade). I have Sony 49XF9005 UHD HDR TV which is also HLG compatible.

I need to remove things from the chain to see if the HD Fury (which used to block HLG in error, but had a firmware update to stop this) and the Denon are causing the issue.

I’m pretty certain that my Amazon Fire TV Stick 4K output HLG correctly in iPlayer in the past, but I’ll need to dig it out. Ditto the Rock Pro64. (I remember posting about the Rockchip Pro being the first Kodi platform I had that correctly flagged and triggered HLG to my TV, and that would be via my Denon AVR)

And I’ll power cycle. Everything…

Yes, it looks like CE doesn’t see your display as HLG capable, so it outputs it as HDR10.
I have an LG TV, and HLG works correctly.

OK - looks like I may have to look at my HD Fury Vertex… Taking that out of the path - but with the TV and AVR still in circuit - my TV flips into HLG HDR mode (not HDR10 with a conversion) when I play an HLG file.

I think we can mark this thread as solved. Sorry for wasting everyone’s time.

Here is my dispinfo without the HD Fury Vertex in circuit in GUI mode : http://ix.io/21qq

------------ /sys/devices/virtual/amhdmitx/amhdmitx0/hdr_cap ------------
HDR Static Metadata:
    Supported EOTF:
        Traditional SDR: 1
        Traditional HDR: 0
        SMPTE ST 2084: 1
        Hybrif Log-Gamma: 1
    Supported SMD type1: 1
    Luminance Data
        Max: 0
        Avg: 0
        Min: 0

HDR Dynamic Metadata:

colorimetry_data: df

and here is dispinfo when playing an HLG file

http://ix.io/21qr

My bad. Very sorry everyone.

“BAD HD Fury. BAD…” The irony that the thing that provides me with the most data is proving problematic. It has worked properly in the past (and shown devices like the Rock Pro 64, the Amazon Fire TV Stick 4K etc. outputting HLG) - I think it must have got stuck in an odd mode.

On the plus side - it does look as if CE on the N2 does a good attempt at an HLG->HDR10 EOTF conversion.

Now we just need the www iPlayer add on to support UHD HDR on-demand and not just the live streams.

I have the same issue. I’m running @cdu13a’s Ng build on Le Potato. When playing a HLG sample the TV switches to “ST.2084” mode instead of “HLG”.

When I run “echo 1 > /sys/module/am_vecm/parameters/force_pure_hlg” and play the HLG file - the tv would correctly switch to HLG mode.

For now I added the above command to autostart.sh as it does not seem to affect HDR10 videos - with HDR10 the TV still switch to ST.2084.

dispinfo

Make sure that HDR to SDR is set to Auto and SDR to HDR is set to Off.

Tone map settings don’t make any difference, the TV still switch to ST.2084.

My bad. TV does indeed switch to HLG when “HDR to SDR” is set to Auto.

Hmm…, ??? :wink:

1 Like

In CoreELEC settings.

He meant that you said “HDR to SDR” twice :grinning:

d’oh, thx. I fixed it.