Originally Posted by madshi
4K HDR to SDR Madvr Implementation
Hi Madshi, happy new year!
I have been thinking lately while watching 4K HDR movies on my projector how to improve HDR "pop" on a low brightness projector.
Below my quoted old idea which you did not like for good reasons.
Based on that feedback and my user experience, here here is my new idea:
1) A bit complicated but nice
I am using the HDR to SDR shader math mapping with a 300nits target, with dynamic compression of the highlights up to the peak luminance of each image.
What I have noticed is very often only a few pixels in the image are reaching this peak luminance (let's say 1000nits), but most of the highlights (let's say 90% of the pixel above 300nits) are still below 600nits.
So Madvr is compressing the pixels between 300nits to 1000nits in order to NOT clip ANY pixels, even it's only a few. But doing so, most of the pixels are compressed heavily in the process, for those few.
I would propose to give the user a choice for setting "a dynamic clipping nits limit" in "percent" of the number of pixels above "this display target nits".
This "P=percentage clipping value" (in our example 90%) would be used like this:
- T= total number of pixels above "the display target nits" (in our example 300nits)
- C= cumulated number of pixel above 300nits sorted by increasing nits
- When C/T=P=90%, then select accordingly the clipping value. (in our example, 90% of the pixels above 300nits are below 600nits).
In another word, we are looking for the NITS level of the P=% Quantil for the pixels above "this display target nits"
Use the new calculated clipping value instead of "the measured peak luminance".
- Most of pixels composing the highlights above the "soft clipping" have now a better differenciation and the HDR effect will be more pronounced
- Good use of Madvr looking at each single pixel nits
A certain amount of pixel is now clipped but it should be small enough not to impact the image quality negatively
2) Very simple but less nice
-->provide the user an input box to define a hard coded "clipping limit.
You would then have:
1) the soft clipping point / this display target nits = 300nits
2) the clipping limit = 600nits for example
Everything above 600nits gets clipped.
Everything between 300 and 600 nits gets compressed up to the peak luminance of the said picture
Below 300nits: nothing touched
Of course you could implement both. :-)
Also: could you add in the information displayed under "CTrl+Y" so that we have those 4:
- chosen value for "this display target nits" (above example 300nits)
- average nits of the picture
- maximum peak luminance in nits (above example 1000nits)
- Nits Number for of the 90% cumulated number of pixel ranked by increased brightness between "this display target nits" and "peak luminance" (in the above example 600nits). In another word the Nits level for the 90% Quantil of the pixels above "this display target nits".
Thank you a lot!
I know I am asking a lot and I hope Masvr V1.0 comes soon so that I can give a least a bit back to you.
Originally Posted by Soulnight
I am a very happy user of Madvr, especially for 4K Upscaling of my favorite bluray via NGU.
Thank you so much!
I have been recently also using your HDR to SDR (DCI-P3) shader math implementation with my projector Epson EH-LS10000 which can be perfectly calibrated to DCI-P3 D65.
I started using 400nits as "this display's peak nits" and it looked very nice.
However, I also noticed that for some portion of the HDR videos, the avg frame HDR peak luminance measured by Madvr (seen with Ctrl+Y) was lower than that. Sometimes, it even gets lower that 120nits for a longer period of time.
I created some keyboard combination shortcuts to quickly be able to change from 120nits to 1000nits.
As I result, I can clearly see that the user would get better brightness and HDR quality, if the display peak nits could be dynamicly based on what peak luminance madvr measure.
Could you implement something like this?
- use display peak nits as long as maximum frame peak luminance does not get below.
- if peak luminance get below, use peak luminance as new "display's peak nit"
Or something even smarter that you could come up with. I think there is much more to be gained from Madvr analysing each frame luminance as what is currently implemented. (maybe something based on the area of a luminance above a certain level...)
4) Again, thank you for your hard work on your free time. Madvr is a wonderful tool. I hope you can bring those ideas to real life. This would certainly be a huge improvement for all projector users with low nits (<100nits) output.