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 »

Thanks. Did you try tweaking 'white' for the brightness?
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Not yet but I will
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

You can tweak the saturation down in your script if you find Reinhard a bit 'colorful'.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

I find the color levels fine
The brightness doesn't bother me as I like the hdr to sdr look over the sdr on this movie at least
I'll play around with settings to try and find the closest match
This is largely user taste, some prefer more color others less, some brighter others darker, but you need default values so as close to original and let the user tweak to their taste
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Fully agree with that. The only problem would be if for some unusual scene there are no decent settings.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Of course, but you can only do so much.
If you set up good defaults and allow the user to tweak, if that rare circumstance occurs, then the odds are that no hdr to sdr algorithm would do a good job. Up to the user to find the best possible settings in that case or another approach for that rare circumstance
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

Hi.
Tried to test the tonemap script. But no matter how I import the avsresize.dll plusin, avsP said : There is no function named z_ConvertFormat...
I am using AVS+ (.dll in avs+/plugin folder or use plugins(path/to/.dll) in my script).
And btw my DGSource dont have "fulldepth" args as well . any idea ?

Thumbnails:
import in script :
Image

or copy .dll to plugins folder:
Image

set fulldepth=True
Image
Image


http://imgbox.com/eIMFcu5k
http://imgbox.com/Sz28gZj9
http://imgbox.com/JIvd2kbm
http://imgbox.com/U73IM26N
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

I don't know anything about avsP. Try to get it working with VirtualDub2 first.
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

admin wrote:
Fri Mar 23, 2018 10:38 pm
I don't know anything about avsP. Try to get it working with VirtualDub2 first.
Hi. Used VirtualDub 1.10.4 -> File -> Open Video File -> select my scrip (UHD.avs) -> ↓↓↓↓
Image

And once again, both LoadPlugin("xxxx/avsresize.dll") and put avsresize.dll to AVS+/plugins folder were tried. Both said no function named z_ConvertFormat.

Edit : testing VirtualDub2 now.
Edit2 : Same result. No function named bla bla bla :(
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Are you using 32 or 64 bit versions?
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Nginx wrote:
Sat Mar 24, 2018 5:48 am
admin wrote:
Fri Mar 23, 2018 10:38 pm
I don't know anything about avsP. Try to get it working with VirtualDub2 first.
Hi. Used VirtualDub 1.10.4 -> File -> Open Video File -> select my scrip (UHD.avs) -> ↓↓↓↓
Image

And once again, both LoadPlugin("xxxx/avsresize.dll") and put avsresize.dll to AVS+/plugins folder were tried. Both said no function named z_ConvertFormat.

Edit : testing VirtualDub2 now.
Edit2 : Same result. No function named bla bla bla :(

Your test script should be similar to the sample provided
loadplugin("dgdecodenv.dll")
loadplugin("DGTonemap.dll")
loadplugin("avsresize.dll")
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE) # May not be needed.
dgsource("THE GREAT WALL.dgi",fulldepth=true)
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
dgtonemap(white=0.7)
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
prefetch(2)
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

gonca wrote:
Sat Mar 24, 2018 6:44 am
Your test script should be similar to the sample provided
loadplugin("dgdecodenv.dll")
loadplugin("DGTonemap.dll")
loadplugin("avsresize.dll")
SetFilterMTMode("z_ConvertFormat", MT_MULTI_INSTANCE) # May not be needed.
dgsource("THE GREAT WALL.dgi",fulldepth=true)
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
dgtonemap(white=0.7)
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
prefetch(2)
Hi
Thanks for your quick reply & Very appreciated.
My Script now looks like :
LoadPlugin("D:\dgdecnv2053\x64 Binaries\DGDecodeNV.dll")
LoadPlugin("D:\avsresize\x64\Release\avsresize.dll")
LoadPlugin("D:\DGTonemap\x64\DGTonemap.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=0.7)
z_ConvertFormat(pixel_type="YV12",colorspace_op="rgb:linear:2020:l=>709:709:709:l",dither_type="ordered")
prefetch(2)
And it said
Image

And of course I tried without SetMTMode:
Image

The DGSource and DGTonemap is fine to use. No error if I wrote DGSource("xxxxx").DGTonemap("xxxx") sololy. Just somehow can't use z_ConvertFormat.

All tested on both x64 and x86 env.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

just drag the script onto VDub2 and test
Don't use Open File or anything else
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Are you using Avisynth+? It is mandatory. Please advise what version you use.

Also, everything must be consistently 32-bit or 64-bit. Since you can do both please use 64-bit for this debugging, including Avisynth+ of course.

I am using my own built avsresize. I'll check now that the linked one is OK.

EDIT: The linked one r1d is OK.
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

admin wrote:
Sat Mar 24, 2018 7:16 am
Are you using Avisynth+? It is mandatory.

Also, everything must be consistently 32-bit or 64-bit. Since you can do both please use 64-bit for this debugging, including Avisynth+ of course.

I am using my own built avsresize. I'll check now that the linked one is OK.

EDIT: The linked one is OK.
Hi .again thanks for quick reply.

I am using AVS+ , path : C:\Program Files (x86)\AviSynth+
And now I am using all 32bit things. Script like :
[quoteLoadPlugin("D:\dgdecnv2053\DGDecodeNV.dll")
LoadPlugin("D:\DGTonemap\DGTonemap.dll")
LoadPlugin("D:\avsresize\Release\avsresize.dll")
DGSource("D:\Encode Folder\Interstellar\UHD.dgi")
z_ConvertFormat(pixel_type="RGBPS",colorspace_op="2020ncl:st2084:2020:l=>rgb:linear:2020:l", dither_type="none")
dgtonemap(white=0.7)[/quote]

And drag the script to VirtualDub2 directly. Same error.

Not sure if it's because I used AVS before. But I've uninstall and remove C:\Program File(x86)\AVS folder before install AVS+. Same error happened on my friend too. (No func named bla bla bla)
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Please give output of AVSMeter -avsinfo executed in the same directory as your script.

I guess you must be picking up a spurious avisynth.dll from somewhere. Maybe from your avsP installation?

There's no point to looking at avsresize until you can tolerate that SetFilterMTMode() call. It will verify that you invoke the correct avisynth.dll.
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

admin wrote:
Sat Mar 24, 2018 7:35 am
Please give output of AVSMeter -avsinfo executed in the same directory as your script.

I guess you must be picking up a spurious avisynth.dll from somewhere. Maybe from your avsP installation?

There's no point to looking at avsresize until you can tolerate that SetFilterMTMode() call. It will verify that you invoke the correct avisynth.dll.
Hi. I uninstall AVS+ first. Then searched "Avisynth.dl" in C:\ and deleted all of them.
And re-install AVS+, now everything looks like:
d:\Encode Folder\Interstellar>D:\AVSMeter275\AVSMeter275\AVSMeter.exe -avsinfo

AVSMeter 2.7.5 (x86) - Copyright (c) 2012-2017, Groucho2004

VersionString: AviSynth+ 0.1 (r1576, x86)
VersionNumber: 2.60
File / Product version: 2.6.0.5 / 2.6.0.5
Interface Version: 5
Multi-threading support: No
Avisynth.dll location: C:\Windows\SysWOW64\avisynth.dll
Avisynth.dll time stamp: 2014-01-02, 11:14:26 (UTC)
PluginDir2_5 (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins
PluginDir+ (HKLM, x86): C:\Program Files (x86)\AviSynth+\plugins+


[CPP 2.6 Plugins (32 Bit)]
C:\Program Files (x86)\AviSynth+\plugins+\DirectShowSource.dll [2014-01-02]
C:\Program Files (x86)\AviSynth+\plugins+\ImageSeq.dll [2014-01-02]
C:\Program Files (x86)\AviSynth+\plugins+\Shibatch.dll [2014-01-02]
C:\Program Files (x86)\AviSynth+\plugins+\TimeStretch.dll [2014-01-02]
C:\Program Files (x86)\AviSynth+\plugins+\VDubFilter.dll [2014-01-02]

[Scripts (AVSI)]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.avsi [2014-01-03]

[Uncategorized files]
C:\Program Files (x86)\AviSynth+\plugins+\colors_rgb.txt [2014-01-03]
And then one more time I tested everything which responded same result as I post above.
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

Hey I saw some difference between mine and yours. like MT thread support : No etc. I downloaded avs+ from : http://avs-plus.net/


All right . I will test https://github.com/pinterf/AviSynthPlus/releases first then give you some response. Thank you ~
DAE avatar
Nginx
Posts: 26
Joined: Fri Mar 23, 2018 12:48 am

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Nginx »

OK it works now. I'm using all x64 plugins. It just needs the latest AVS+ which shouldn't download from its official site lmao.

Many thanks to both of you. Very appreciated. :) :hat:
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Glad to be of assistance.

Yes, that is a strange situation. Also, the installer situation is strange. Still, glad you got it working. Looking forward to your feedback on the HDR->SDR functionality.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

white point=3.5
what do you think
Image
If you wish I can test different samples
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Looks OK. I'd have to see some frames with what is supposed to be pure white, to see if it is too dim or if it is blown out.
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Give me some time and I will look to see if I can find them on the sample
DAE avatar
Guest

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by Guest »

Would clouds in the sky work?
Meanwhile I will look for a sample with more white
User avatar
admin
Posts: 4551
Joined: Thu Sep 09, 2010 3:08 pm

Re: HDR -> SDR tonemapping for DGDecodeNV

Post by admin »

Or reflection highlights. Anything you expect to be pure white. That scene where they are sitting down that I had before is good for the light reflection off their noses. Also that glacier scene you sent me.
Post Reply