v19 Windows HLG passthrough - Beta test build (merged)
#1
Hi all

Finally I have accepted that Windows does not allow HLG passthrough Big Grin

Unfortunately always forces to HDR10 and first transforms HLG to SDR:

HLG => SDR => windows tonemap => false HDR10 (gamma 2.2)

HDR part is lost!!!

But in a moment of inspiration I have thought that it would be possible to trick Windows into thinking signal it's HDR10 so that it does not convert to SDR.

HLG => PQ (shaders) => passthrough => HDR10 (PQ) on TV

HDR10 is same quality or superior that HLG so no quality lost in transformation.

There is another important advantage: HLG is only supported on HDMI 2.0b devices (e.g. Intel NUC's are HDMI 2.0a) In this way it is possible to playback HLG (with HDR) on HDMI 2.0a devices.


Version 5.0.0

Enables HLG passthrough using HLG to PQ shaders.
Windows (desktop) only supports HDR10, with this trick Windows thinks that HLG is HDR10...
Picture quality obtained is the same that real HLG passthrough 😄

https://github.com/thexai/xbmc/releases

As test file can be used:
http://www.lelabodejay.com/files/videos/...50MBPS.mp4

Provided by @Gee11 

I wait for some feedback before generating the PR. Especially from NVIDIA users as I have only tested it on Intel NUC8.
Reply
#2
I'm confused, you have a open PR to resolve an issue with HLG passthrough which the user who reported the issues says results in working HLG, however here you say HLG can't be directly passed through and must be transformed to HDR10Huh
Reply
#3
There are two differents issues:
  1. Wrong colors / black level due graphics drivers may not support HLG color space. This affects all HLG sources both HDR and SDR displays.
  2. HLG HDR is not passed-trough to HDR display due Windows or device not supports (is need HDMI 2.0b and Windows does not support).

With (1) fixed HLG sources are displayed with correct colors but in SDR range (HDR part of signal is lost).

With (1) + (2) HLG sources are displayed with correct colors + HDR part of signal (only on HDR displays, of course).

The part 2 are on a separated commit: https://github.com/thexai/xbmc/commit/4c...b025d57c99  and is what need some testing     

and commit (1) needs to be merged prior than (2)   Smile


When people who have HDR TV and can watch 4K HLG channels try it, they will understand the (big) difference.
Reply
#4
Thanks for the clarification, that makes sense now. I'd assumed the user was now getting HLG HDR now rather that correctly mapped SDR.
Reply
#5
Not sure what the problem is, but I'll give this test build a try and report back.
Reply
#6
(2020-10-19, 16:42)boingman Wrote: Not sure what the problem is, but I'll give this test build a try and report back.
https://en.wikipedia.org/wiki/Hybrid_Log-Gamma
Reply
#7
(2020-10-19, 16:42)boingman Wrote: Not sure what the problem is, but I'll give this test build a try and report back.

Seems the test build I provided to you was to allow SDR output from a HLG source with correct colour mapping, so although you were getting correct looking colours you wouldn't have been getting HDR output. The builds here are to allow proper HDR10 output from a HLG source.
Reply
#8
Just tested jogal’s version 5.0.0 with 8 GB NVIDIA GEFORCE RTX 2070 SUPER

First thing I noticed is that this version disables Inputstream adaptive...

The video sample plays with more vibrant colours for sure, it's quite evident in the sea landscape of the center of the image, however the text at the bottom gets more blurry, and you can't tell apart as many shades of colour in the side bars as before, not sure if that is normal or not...
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#9
Works fine, HDR is triggered correctly with the HDR logo displayed on my TV.
(2020-10-19, 17:39)jjd-uk Wrote:
(2020-10-19, 16:42)boingman Wrote: Not sure what the problem is, but I'll give this test build a try and report back.

Seems the test build I provided to you was to allow SDR output from a HLG source with correct colour mapping, so although you were getting correct looking colours you wouldn't have been getting HDR output. The builds here are to allow proper HDR10 output from a HLG source.
I see, which would explain why the Kodi GUI looked the same as when playing a SDR file when I used your build. Unchanged. Kodi GUI colors are usually messed up when playing a HDR file. At least with the Confluence skin.
And after finally using the test file in the first post I think I'm seeing the difference as well. Wasn't clear on my sports recording.
Reply
#10
Thanks for the feedback.

Below I comment on things to help interpret correctly the test patterns in the video:

Image


1 -2 -3 - 4: High bright colours in HDR range. On SDR display 1 has tone orange, 2 violet. On HDR display should be pure RED and BLUE

This zones has also a gradient to detect clipped values (due out of range display capabilities). 3 frames with darker areas should be vaguely visible (but visible).

5: R-G-B colors in SDR range. They should be seen correctly on an SDR display.

6: Black level indicator. All 4 squares should be slightly visible. The lower ones hardly visible (only in the dark).


Other than this it is simply an test pattern (subjectively it may give the feeling that it "looks better" in SRD). The true image quality is seen later in the video, especially the last parts: Artgrid and Pixel's Revenge
Reply
#11
(2020-10-20, 02:03)manfeed Wrote: First thing I noticed is that this version disables Inputstream adaptive...

This is completely unrelated. It's probably just because this build contains other commits than the build you used previously. Maybe the addon needs to be updated or is temporarily broken until it is updated in the repository.
Reply
#12
Version 5.0.1

Updated at 20-10-2020 (forked from Kodi 19 alpha master).

Fix logic to toggle HDR on/off during playback HLG stream.
Can be used F11 key in manual mode (GUI Settings / Player / Use HDR display capabilities = OFF) to switch between HLG SDR mode and HLG HDR passthrough mode.

https://github.com/thexai/xbmc/releases
Reply
#13
(2020-10-20, 11:27)jogal Wrote: Below I comment on things to help interpret correctly the test patterns in the video:

Other than this it is simply an test pattern (subjectively it may give the feeling that it "looks better" in SRD). The true image quality is seen later in the video, especially the last parts: Artgrid and Pixel's Revenge

Ok, thanks for the explanation. I have also tested 5.0.1 version and in my side everything looks perfect. Thanks!
If I have helped you or increased your knowledge, please click the 'thumbs up' button to give thanks :)
Reply
#14
Wow!
This is a huge difference now.

Tested 5.0 version yesterday using SES UHD demo channel on the Astra 1 satellite 19.2°E tansmitting in UHD HLG.
This is a Windows 10 x64 PC containing a AMD Ryzen 7 2700x processor and  AMD Radeon RX570 graphics card and the Marantz SR7010 receiver.

Like before my LG Oled TV switches to "HDR" (= HDR10 not HLG), but the dynamic colors and contrast and the luminess is far more briliant compared to the normal KODI master version and this demo channel.
I even had to lower down the color settings on my OLED TV because to much color in image.
I pushed up the brightness a little.

It seems to be correct and a very good solution to bypass Windows 10 in this matter.

Thanks!
Reply
#15
All these improvements have already been merged into master branch
Reply

Logout Mark Read Team Forum Stats Members Help
Windows HLG passthrough - Beta test build (merged)0