HDR -> SDR conversion

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
dmcs
Posts: 32
Joined: Sat Oct 21, 2017 9:40 pm

Re: HDR -> SDR conversion

Post by dmcs » Wed Jul 18, 2018 12:42 am

Tried the latest version with the same sample I uploaded earlier.
I think the screenshot is pretty much self-explanatory. :D
      
MI5_HDR_Sample002467.png
MI5_HDR_Sample002467.png (1.81 MiB) Viewed 238 times
      
Edit:
I also notice the desaturation in version 1.5 (the first 3 sets of screenshots - sample 1). In the 4th set (sample 2), the sky has some strange artifact (?!).
I used Mobius to take screenshots in version 1.4

v1.4 -- v1.5
1st
Image Image

2nd
Image Image

3rd
Image Image

4th
Image Image

Samples

Code: Select all

https://mega.nz/#F!BwtXQC4A!r8wPHGJDE4ftwkpzudoVow
Last edited by dmcs on Wed Jul 18, 2018 6:55 am, edited 2 times in total.

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 6:44 am

I don't do self-explanatory. What is your point?

dmcs
Posts: 32
Joined: Sat Oct 21, 2017 9:40 pm

Re: HDR -> SDR conversion

Post by dmcs » Wed Jul 18, 2018 6:54 am

admin wrote:
Wed Jul 18, 2018 6:44 am
I don't do self-explanatory. What is your point?
Compared to Mobius in 1.4, the new method destroys color & detail in this sample


Image Image Image Image Image

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 7:11 am

Ouch. The new method of gamut mapping does constant hue and luminance, but it apparently desaturates too much to pull colors into gamut. I'll continue tweaking to find a reasonable compromise between desaturation and hue shifts.

Thank you for your test results.

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 9:17 am

I just made a momentous discovery! With a very simple change to the current design the following is now produced for dmcs's torture frame (light=300). Note the lack of any artifacting or hue change. I have to regression test it with my other samples; if everything is copacetic I'll give you a release.

Hope springs eternal!

dmcs2.jpg
dmcs2.jpg (247.24 KiB) Viewed 217 times

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 10:00 am

DGHDRtoSDR 1.6:

http://rationalqm.us/misc/DGHDRtoSDR_1.6.rar

Looks pretty good to me. Still ~110fps with i7-7700K + 1080 Ti. Now, splash cold water in my face. ;)

The design is ridiculously simple. I'd be embarrassed to disclose it. :oops:

dmcs
Posts: 32
Joined: Sat Oct 21, 2017 9:40 pm

Re: HDR -> SDR conversion

Post by dmcs » Wed Jul 18, 2018 10:26 am

:bow: :bow: :bow:

Thank you so much for this. :salute:

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 10:33 am

You're most welcome. But I have to say...without dmcs, Narkyy, gonca, and others providing samples and doing testing none of this would be possible. So I am truly indebted to you.

Onward and upward!

Gonna take a timeout to do a little physics now...unless something terrible comes to light with DGHDRtoSDR 1.6.

dmcs
Posts: 32
Joined: Sat Oct 21, 2017 9:40 pm

Re: HDR -> SDR conversion

Post by dmcs » Wed Jul 18, 2018 10:37 am

I have one question: Does 1.6 resolve the desaturation issue in 1.5? Or should I adjust the "sat" parameter manually?
Thank you.

User avatar
admin
Site Admin
Posts: 3973
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR conversion

Post by admin » Wed Jul 18, 2018 10:43 am

There should be no desaturation, but you are welcome to boost saturation if you like it that way.

In build 1.5, out-of-gamut (OOG) colors were desaturated (in CIELAB with constant hue and luminance) to put them in gamut, so if the frame has lots of OOG pixels then the overall impression is loss of saturation. Build 1.6 removes that mechanism and works completely differently, that's all I'll say. ;)

Hopefully, we are providing some amusement and distraction for video zealots suffering from the absence of another well-known forum that has been down for quite a while now.

Post Reply