Page 18 of 24

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 3:11 pm
by Guest
Can I please have the source sample for that shot of the blonde girl with colored streaks? Thank you.
I assume you means the clip (dumb question, long day at work :oops: :facepalm: )
I will prep it and upload it
Do you want it on your FTP server or my file sharing account?

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 4:24 pm
by Narkyy
v1.7 and roll doesn't seem to have the desired effect..
The colors don't seem to be changing, it's just getting brighter.
Since switching to Reinhard, the contrast has been off as well. Everything looks duller, more grey.

Order: v1.4 | v1.7 light=500 roll=0.5 | madVR

Image Image Image

The circled parts on the dress aren't as red as they're supposed to be, like 1.4 and madVR.
The wall is going grey instead of keeping the red color.
v1.4 had it right except for the highlight issues and random hue shifts.

Basically the whole contrast of dark/bright is low so everything looks boring is what I assume.

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 4:37 pm
by admin
gonca wrote:
Thu Jul 19, 2018 3:11 pm
Do you want it on your FTP server or my file sharing account?
Either way. FTP would be good just in case I can't use your file sharing.

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 4:41 pm
by admin
Narkyy wrote:
Thu Jul 19, 2018 4:24 pm
v1.7 and roll doesn't seem to have the desired effect..
The colors don't seem to be changing, it's just getting brighter.
Since switching to Reinhard, the contrast has been off as well. Everything looks duller, more grey.
I'll look into it. It can be hard to distinguish brightness from saturation differences. I'll break on strategic pixels and get an objective comparison of 1.4 versus 1.7.

BTW, why do you find the sat adjustment not helpful?

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 5:01 pm
by dmcs
Are you planning on bringing back Mobius in future builds?

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 6:39 pm
by Narkyy
admin wrote:
Thu Jul 19, 2018 4:41 pm
BTW, why do you find the sat adjustment not helpful?
It's not that the sat parameter isn't good, it's just not enough to get colors close to v1.4 and madVR even with sat=1.25.
Also the issue seems to affect only red, the rest looks just as good.
So I'm thinking it's more related to the new Reinhard contrast and the hue on red areas rather than just saturation.

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 8:25 pm
by Guest
You should have the clip now

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 8:57 pm
by admin
dmcs wrote:
Thu Jul 19, 2018 5:01 pm
Are you planning on bringing back Mobius in future builds?
I'll bring back whatever is needed to get the results we are after. Right now, I am focused on the desaturation issue. Mobius doesn't solve that in the current artifact-free design.

Re: HDR -> SDR conversion

Posted: Thu Jul 19, 2018 8:57 pm
by admin
gonca wrote:
Thu Jul 19, 2018 8:25 pm
You should have the clip now
Thank you!

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 12:04 am
by Dion
You guys are trying to solve a tonemapping problem that cannot be solved. We cannot see what an UHD clip is suppose to look like because we don't have the proper display for it. What we have is a glimpse of it atm.

Should just include all the tonemapping algorithms in the dll and let people choose what they want to use.. Cause there is no "CORRECT" answer or pick one for your liking and be done with it. Since tonemapping is done on a per display bases.. I think just including a bunch the best option.

Either way your work on this is incredible.. More then I have seen from anyone including the madVR guy.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 9:23 am
by admin
Thanks for your comment, Dion. I would clarify that I am not seeking perfection.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 3:13 pm
by admin
Narkyy wrote:
Thu Jul 19, 2018 6:39 pm
It's not that the sat parameter isn't good, it's just not enough to get colors close to v1.4 and madVR even with sat=1.25.
I find that I need sat=1.33 to match the madVR result for the red dress scene you are focused on. Here are my settings:

dghdrtosdr(sat=1.33,light=500,tm=0.9,roll=0.5)

Comparing this to madVR, I see no significant difference and nothing that motivates me to change anything. If you disagree please offer some objective evidence. Keep in mind that we will never achieve bit-for-bit identity.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 4:15 pm
by Narkyy
Yes it does blend better, but then the color is not quite right.
It's more orange with saturation instead of a dark purplish red like it is already without adjusting saturation.

Made this to show more clearly.
1.7 is without saturation adjustment.

comparison2.png

To me, there's a definite desaturation or hue change in the areas pointed by arrows and contained in lines drawn.
The arm isn't as purple, the bottom of the dress isn't as red, the background isn't as purple.
Some areas like the waist line looks fine, so it's like the darker red hue isn't on the entirety of the dress and just some parts.

It's also pretty clear to see where the red hue ends and desaturated/lower hue begins.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 4:20 pm
by admin
It is what it is. There is no way to argue that one is correct and the others are wrong, just as Dion pointed out.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 4:33 pm
by Guest
Which is closer to the HDR or SDR (blu ray) source
V1.4, V1.7, MadVR?
No source so it can't be determined
This is starting to be a discussion of which looks better to me on this particular sample
I believe the idea was to have a solution that was good overall with the flexibility to be adjusted for certain cases
No offense meant to anyone, but lets get real

MadVR is good but I don't believe it is perfect either

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 7:20 pm
by Narkyy
You're right, though not everyone likes using SDR as "source" for HDR tonemapped content.
Neither look like SDR in terms of colors, in scenes where red is prominent.

What's objectively different though, is the level of details retained in those high saturation/hue areas.
They seem to get blurred and grain lost.

Image Image

Frame 42.
Sample: https://mega.nz/#!MctgWKRR!5ZaekqyMeKK6 ... R8Rrmxrabk

Also for some odd reason, every time I generate a new frame the detail is shifted above the right eye. :scratch:

Though I'm not sure it's something possible to improve, thank you :salute:

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 7:38 pm
by admin
Narkyy wrote:
Fri Jul 20, 2018 7:20 pm
Also for some odd reason, every time I generate a new frame the detail is shifted above the right eye. :scratch:
I don't know what you mean by "generate a new frame".

Grain difference may be accounted for by madVR dithering.

Re: HDR -> SDR conversion

Posted: Fri Jul 20, 2018 10:08 pm
by Narkyy
When I refresh in AvsPmod (so it does all the processing again and outputs the same frame), the image isn't identical as it was before.
Which is supposed to be expected?

I just tested it again on madVR and it seems indeed to be caused by the setting "restore details in compressed highlights", which also changes the red to purple in this sample.
No idea what happens behind the option though.

DGHDRtoSDR is still noticeably smoother, especially if you compare the right eye.
And I can't find a setting that makes madVR closer.

Example, in order: v1.7 | madVR | madVR restore details in compressed highlights

Image Image Image

So v1.7 is actually spot on here, except for the middle of the face where's it's not blending with the colors and clipping is noticeable on the edges.

Tried old DGReinhard/DGHable and HDRTools, all look worse so madVR might just be doing something funky.
The detail is definitely there though.

Re: HDR -> SDR conversion

Posted: Sat Jul 21, 2018 9:32 pm
by admin
MadVR has a boatload of "picture improvement" features. For an Avisynth filter I prefer to give the plain vanilla SDR conversion and allow the user to do any desired post-processing using Avisynth filters.

I've run DGHDRtoSDR on many of the Masciola test patterns and I don't see any issues other than the slight desaturation that can be easily corrected if desired with the sat parameter. So at this point, I consider that I have met my design goals for this filter and it is ready for serious use.

The current design is actually totally ignorant of the 709 gamut boundary! I am working for fun and learning on a version that explicitly uses the gamut boundaries. Here is a picture of the two gamuts for green. White is the larger 2020 gamut (shown as all white because 2020 colors cannot be displayed on a 709 monitor), green is the 709 gamut. The y axis is lightness and the x axis is saturation. These gamuts were obtained by Monte Carlo sampling of the lightness/saturation space with a fixed hue.

gamuts.png

My idea is to do 2D warping to transform the 2020 gamut to the 709 gamut, using a sparse warp representation consisting of a set of corresponding points (vertices and other points on the gamut boundaries). This warping will define the transformation of lightness and saturation for each 2020 color. The hue space will be sampled at (say) 1 degree intervals.

http://groups.csail.mit.edu/graphics/cl ... orph_6.pdf

Re: HDR -> SDR conversion

Posted: Sun Jul 22, 2018 3:31 pm
by Dion
Is it possible to have your plugin not take everything straight to 8bit? Like a bits="10" command or something?

Re: HDR -> SDR conversion

Posted: Mon Jul 23, 2018 7:11 am
by admin
Dion wrote:
Sun Jul 22, 2018 3:31 pm
Is it possible to have your plugin not take everything straight to 8bit? Like a bits="10" command or something?
What is the use case? Would YUV420P16 be acceptable? You can add ConvertBits(10) if needed.

Re: HDR -> SDR conversion

Posted: Mon Jul 23, 2018 1:23 pm
by Dion
admin wrote:
Mon Jul 23, 2018 7:11 am
What is the use case? Would YUV420P16 be acceptable? You can add ConvertBits(10) if needed.
Yes 16 would be fine too.. I can add ConvertBits after.

Re: HDR -> SDR conversion

Posted: Mon Jul 23, 2018 3:46 pm
by admin
Again, what is the use case? And how would you do things if this change did not exist?

Re: HDR -> SDR conversion

Posted: Mon Jul 23, 2018 4:54 pm
by DJATOM
Probably better compression with 10 bit encoders, as plain 8 bit looks worse on my observation. Tested with 16 bit output, 10 bit output and dithered 8 bit output. 16 is bloat, 10 is fine and 8 kind of bit-starved. Well, it's possible to get acceptable results with 8 bit, just need to rise bitrate a bit.

Re: HDR -> SDR conversion

Posted: Mon Jul 23, 2018 5:06 pm
by Dion
admin wrote:
Mon Jul 23, 2018 3:46 pm
Again, what is the use case? And how would you do things if this change did not exist?
Down converting to 8bit causes banding. You can't just up convert back to 10/16 and its fixed.. the data is lost. A plugin would be required to fix the banding.

Can't encode in 10bit basically. Properly.