HDR -> SDR conversion

These CUDA filters are packaged into DGDecodeNV, which is part of DGDecNV.
Post Reply
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Go ahead and fill us with bitmaps. They're valuable and text is so boring. It's way easier for us than downloading from some links. Lots of storage here, don't worry.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

balloon hdr to sdr
Image
balloon sdr
Image
nose reflection
Image
clouds
Image
Image
Image
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Bravo, thanks for the testing. That last BMP looks blown out. Is that HDR->SDR? How does the SDR one look?
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

It is hdr to sdr
I will try to find the same frame in the sdr version
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

This should be the sdr frame
Image
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Yeah, that's what I concerned about. What white level? Can you upload that section to my ftp?
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

I assume you want the HDR sample
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Yes, please.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

white point was 3.5
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

white point=0.7
Image
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

My test on Interstellar(2014) UHD vs 1080p BluRay
Should add some tonemap via Madvr or whatever. Just need more time.

Now the DGTonemap looks too bright ( Sorry I am not familiar with algorithm so can only judge and comment by the versus comparisons without much analysis)
UHD Tonemapped and resized to 1080p vs 1080p BluRay
ImageImage

ImageImage

ImageImage

ImageImage

or
https://picload.org/image/daidawda/01a.png
https://picload.org/image/daidawdi/01b.png

https://picload.org/image/daidawdw/02a.png
https://picload.org/image/daidawar/02b.png

https://picload.org/image/daidawal/03a.png
https://picload.org/image/daidawai/03b.png

https://picload.org/image/daidawaw/04a.png
https://picload.org/image/daidawor/04b.png

My script on UHD(tonemap)

Code: Select all

LoadPlugin("D:\dgdecnv2053\DGDecodeNV.dll")
LoadPlugin("D:\DGTonemap\DGTonemap.dll")
LoadPlugin("D:\avsresize\Release\avsresize.dll")
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE) # May not be needed.
DGSource("D:\Encode Folder\Interstellar\UHD.dgi",fulldepth=true)
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
dgtonemap(white=100) # yes just want it not to be too bright so I set it so high
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
prefetch(2)
Spline36Resize(1920,1080, src_left=0, src_top=0, src_width=0, src_height=0)
1080p BluRay

Code: Select all

LoadPlugin("D:\dgdecnv2053\DGDecodeNV.dll")
DGSource("D:\Encode Folder\Interstellar\1080p.dgi")
They handle UHD in different way so it's zoom in a little bit (I am 100% sure UHD and HD are the same frame)? but it doesn't matter and tonemapped one does look too bright I guess. And in some scenes (I didn't post them) details in bright area are washed out.

Edit: one more vs when I use white = 0.7 :
100 vs 1080p BD vs 0.7
ImageImageImage

(Lastly plz forgive my poor english)
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

BTW, is "debug=True" in DGSource removed?
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

You should have the hdr sample now
DAE avatar
dmcs
Posts: 36
Joined: Sat Oct 21, 2017 9:40 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by dmcs »

Nginx wrote:
Sat Mar 24, 2018 9:47 pm
BTW, is "debug=True" in DGSource removed?
I think it's "show=true" is what you're looking for.
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

dmcs wrote:
Sun Mar 25, 2018 12:36 am
Nginx wrote:
Sat Mar 24, 2018 9:47 pm
BTW, is "debug=True" in DGSource removed?
I think it's "show=true" is what you're looking for.

All Right It Work !~~ Thank you
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Selur »

Just wondering, since the current version of DGTonemap aims at Avisynth+, do you plan to create a version for Avisynth 2.6 too?

Cu Selur
User avatar
DJATOM
Posts: 176
Joined: Fri Oct 16, 2015 6:14 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by DJATOM »

Selur wrote:
Sun Mar 25, 2018 3:15 am
Just wondering, since the current version of DGTonemap aims at Avisynth+, do you plan to create a version for Avisynth 2.6 too?

Cu Selur
2.6 one requires stacked or interleaved hack to work with HBD video. Not sure if avsresize support it. :scratch:
PC: RTX 2070 | Ryzen R9 5950X (no OC) | 64 GB RAM
Notebook: RTX 4060 | Ryzen R9 7945HX | 32 GB RAM
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Selur »

Probably not, but the resizers in the dither package might work instead,..
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

gonca wrote:
Sat Mar 24, 2018 10:15 pm
You should have the hdr sample now
Thanks, very much. Will work on improving the whites today.

Thanks to Nginx too for the test results.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

@gonca

I see you are linking from the web for your images. Are you able to attach them to your post instead? Then they would be here permanently. If it is not working I can fix it.
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Testing image attachment. Seems to work. Go to the attachments tab, upload image, and hit place inline. It seems that an extra blank line is needed to put a space between text and the image. I set the board quota to infinite and no limit on image size. You'll have to enable display of images inline in your user board prefs.

boring.png
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

OK, boys and girls, please re-download to get DGTonemap 1.1. It should significantly improve the whites and be much closer to the SDR versions. You can tweak it further if desired using the contrast and bright parameters.

http://rationalqm.us/DGTonemap.rar

shot.jpg
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Selur wrote:
Sun Mar 25, 2018 3:15 am
Just wondering, since the current version of DGTonemap aims at Avisynth+, do you plan to create a version for Avisynth 2.6 too?
I'm disinclined to support the 2.6 HBD hack. I think that as we move into the UHD era we need proper HBD support in our frame servers and filters.

Do you have some reason to cling to Avisynth 2.6?
User avatar
Selur
Posts: 134
Joined: Mon Nov 05, 2012 3:49 pm
Location: Germany
Contact:

Re: HDR -> SDR tonemapping

Post by Selur »

Do you have some reason to cling to Avisynth 2.6?
More a legacy thing. Got support for it in Hybrid and try to keep it alive. :)
I personally only use Vapoursynth nowadays since it's also available on Linux an Mac. (I only go back to Avisynth when I need some filters which are not available for Vapoursynth.)
So, no pain if you say you switched to Avisynth+, just thought I ask. :)

Cu Selur
Post Reply