Replies: 3 comments 2 replies
-
Hey, I tried my best the last two days understanding the code. My try was to search for the peak-detect feature and have a look how it works: From my understanding, the function is
... looks for me like pixels with a raising brightness are counted, until there are so many pixels counted as the peak-percentile values suggests ( From that perspective i think, that From that perspective, i thought of a function like:
where just the lowest bin (-64) is refered with its slices from 0 to SLICES. Now i have some troubles: I am missing the idea how to transfer the
I think that's all i can do at this place. Very many greetings! |
Beta Was this translation helpful? Give feedback.
-
Hey @haasn ... if you had interest in the feature, we can discuss this via discord. I made it to work now with a few workarounds: In my comment above, i already stated an idea how to implement this thing. The only thing was missing to me was knowledge how to bring the value from Creating the new black level value (shaders/colorspace.c)
secondly, i had to create a
Then, i had to change the avg-function in the
Using the new black-level value (tone_mapping.c) First, i want to limit the feature to the specified output_min level.
It should be said firstly, that a use in the linear-function ( Therefore, i had to modify the
And then, i had to modify the
Thats all. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
EDIT:
See my second and last comment for a solution that is useable, but not "clean and nice" regarding the code implementation
Hey @haasn ,
I am thinking of a feature that measures the lowest spot in the scene and scales the scenes, so that this spot appears as a 0 nits // 0 through RGB values...
...Like the opposide of the hdr-compute-peak feature:
Setting the target-contrast in mpv raises the black level of the output format to the specs of the desired display by upscaling the scene from the src black-level to the display black-level.
In the actual version of libplacebo, the src black-level is always assumed to be 0 meaning that a constant upscaling is taking place for every movie and every scene in it.
But what if a scene only has pixels that are above 0?
In this scene, the black-level scaling of mpv would not only be insufficient, but also harming the image quality by a visible greyish look.
A black-level-detection could work as the opposide pendant to the hdr-peak-detection:
In this case, the scene would be less upscaled, adapting its specific darkest pixel to the desired display black-level.
My personal Case (Could be indirectly solved by using the feature)
Surprisingly but disappointingly lots of movies have black levels in the greyish area. Even in darkest scenes, a full black level will not be reached. Instead of, the scene looks washed out.
Using some gamma tricks to raise the details in the dark (e.g. to make movies watchable in projector setups) makes the problem worse: Now the "grey" level of the movie looks bright grey instead of dark grey.
But those settings are the only values with which some other dark movies can be enjoyed.
The result would be a contrastier image, which quality would be uniform and indepent from the image quality of the movie.
Very much greetings,
Lukas
Beta Was this translation helpful? Give feedback.
All reactions