HDR -> SDR conversion

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Narkyy
Posts: 51
Joined: Thu May 25, 2017 11:51 pm

Re: HDR -> SDR tonemapping

Post by Narkyy » Mon Jun 18, 2018 12:23 pm

You're right, there's a difference between none and mobius mostly only in highlights, mobius being much better at retaining detail and not overblowing the lighting.

However the colors are still off, and increasing saturation doesn't restore the reds.
I managed to get the old 1.2 version of the plugin and the colors are much better.

In order: none, mobius, old plugin
1.png
1.png (1.4 MiB) Viewed 792 times
2.png
2.png (1.39 MiB) Viewed 792 times
3.png
3.png (1.43 MiB) Viewed 792 times
I don't really care about Hable either anymore, but I'm not sure it's a problem with Hable as it works properly on the old plugin.


Tested HDRTools with the different chromacity parameters
1 is Gx=0.265, Gy=0.690, Bx=0.150, By=0.060, Rx=0.680, Ry=0.320 (BT2100, from the github page)
2 is Gx=0.170, Gy=0.797, Bx=0.131, By=0.046, Rx=0.708, Ry=0.292 (BT2020, from the code)

4.png
4.png (1.4 MiB) Viewed 792 times
5.png
5.png (1.41 MiB) Viewed 792 times

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jun 18, 2018 12:57 pm

That's great info, thanks. Can I get the source file to be able to investigate all this? Thank you.

Narkyy
Posts: 51
Joined: Thu May 25, 2017 11:51 pm

Re: HDR -> SDR tonemapping

Post by Narkyy » Mon Jun 18, 2018 3:34 pm

Here's a small sample of the part
https://mega.nz/#!AVliwIqa!XSnOsoEAMGG8 ... R9hW8QvtYE

Script for HDRTools 0.1, it errors with the latest 0.2 for some reason.
ConvertYUVtoXYZ(Color=0,OutputMode=1, Gx=0.170,Gy=0.797,Bx=0.131,By=0.046,Rx=0.708,Ry=0.292,Wx=0.31271,Wy=0.32902)
ConvertXYZ_HDRtoSDR(MinMastering=1, MaxMastering=1000,Coeff_X=26, Coeff_Y=26, Coeff_Z=26)
ConvertXYZtoYUV(Color=2, OutputMode=2, pColor=0)
z_ConvertFormat(pixel_type="YV12")

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jun 18, 2018 3:37 pm

Great, thank you.

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

Re: HDR -> SDR tonemapping

Post by admin » Tue Jun 19, 2018 10:01 am

@Narkyy

Please re-download version 1.4 as I have slipstreamed a fix for the colors issue. Looks good to me although, again, this may not be my final gamut mapping solution.

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

@douzi

For your stream with the blown-out heater set light=400-500 for good results with this new version. I am working on a heuristic to set light automatically based on the metadata and video content.

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

Re: HDR -> SDR tonemapping

Post by admin » Tue Jun 19, 2018 10:16 am

Re-download one more time. I had the old version up instead of the new one. It is updated now.

Narkyy
Posts: 51
Joined: Thu May 25, 2017 11:51 pm

Re: HDR -> SDR tonemapping

Post by Narkyy » Tue Jun 19, 2018 1:48 pm

It looks good now, pretty much the same colors as HDRTools :hat:
Also where has Mobius been all this time? It's amazing the control you can have over highlights, which Hable didn't have :bow:

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

Re: HDR -> SDR tonemapping

Post by admin » Tue Jun 19, 2018 2:50 pm

Thanks for the testing, Narkyy. The mobius concept comes from MPV with some of my own changes and implemented for CUDA of course. I like it because the parameters are simple and easy to understand, whereas Hable...oy. Maybe Hable can give similar results, but good luck finding the parameter combination.

HDRTools will be fixed shortly for the issue you mentioned, according to the author.

Dion
Posts: 23
Joined: Sun Dec 04, 2016 1:30 am

Re: HDR -> SDR tonemapping

Post by Dion » Tue Jun 19, 2018 5:24 pm

Was never a fan of Hable but I did like Reinhard but it had issues.. Looks like mobius solved alot of those issues.

The amount of work you put into this is incredible.. :bravo:

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

Re: HDR -> SDR tonemapping

Post by admin » Tue Jun 19, 2018 6:06 pm

Thanks, HDR to SDR is a niche area but I like showing off what CUDA can do.

Post Reply