HDR -> SDR conversion

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jul 09, 2018 2:16 pm

You're welcome. But please, whenever you say "issues like this" don't assume we know what you are talking about. Tell it in words too. I look at your last image and think "umm, OK, what issue?". Context is completely lacking.

I'll try to guess. You are thinking there are hue shifts there leading to a blocking effect. Hard to say without the source. But, yes, it can happen to any RGB color if the individual channels get different scalings from the tonemapping.

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

Re: HDR -> SDR tonemapping

Post by Narkyy » Mon Jul 09, 2018 3:07 pm

Yes sorry, there's mostly visible blocking around vivid/deep colors.

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jul 09, 2018 3:38 pm

Got it, thanks. Keep that sample, I'm going to ask you for it later. ;)

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jul 09, 2018 4:24 pm

Ha, I don't even have to go to CIELAB and back (which is expensive). I can do it directly in linear RGB space. Find the max of R, G, and B. Then tonemap that max one and apply the resulting scaling to all three. It's also faster than tonemapping all three individually, although for CUDA the actual kernel time is small compared to the frame transfer time, so it's a moot point.

gonca
Distinguished Member
Distinguished Member
Posts: 583
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping

Post by gonca » Mon Jul 09, 2018 4:35 pm

Sounds like you are just flying thru it now

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jul 09, 2018 4:43 pm

It's working in my head. :lol:

Actually, I tested that one frame by just multiplying the RGB by 0.2 for the whole frame (because the largest RGB component is ~5.0) and the bright area looks great with no blocking or hue shift and more detail than madVR. So when I put the proper nonlinear function in place everything should look great. However, many a drop is spilt twixt cup and mouth. Or:

But, Mousie, thou art no thy lane,
In proving foresight may be vain;
The best laid schemes o' Mice an' Men,
Gang aft agley,
An' lea'e us nought but grief an' pain,
For promis'd joy!

-- "To A Mouse" by Robert Burns

gonca
Distinguished Member
Distinguished Member
Posts: 583
Joined: Sun Apr 08, 2012 6:12 pm

Re: HDR -> SDR tonemapping

Post by gonca » Mon Jul 09, 2018 5:37 pm

So, what you are so eloquently saying is that poop happens

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

Re: HDR -> SDR tonemapping

Post by admin » Mon Jul 09, 2018 8:56 pm

Or, maybe, don't count the chickens before they hatch.

Beta
Posts: 2
Joined: Tue Jul 10, 2018 7:54 am

Re: HDR -> SDR tonemapping

Post by Beta » Tue Jul 10, 2018 8:00 am

Hi guys!

Is anyone here who can help to me fix this issue?
The source is HEVC
Thank You!

Image

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

Re: HDR -> SDR tonemapping

Post by admin » Tue Jul 10, 2018 10:08 am

Looks like an AVSPMOD issue (AVSPMOD not using Avisynth+?). Try to open your script in VirtualDub2 and report the result. Note that these filters require Avisynth+.

Post Reply