mastrboy
28th May 2020, 18:31
I'm trying to find a alternative to Histogram("luma") that works with higher bit depts, but actually solving it might be out reach with my knowledge.
By the description, the function doesn't seem very complex:
"This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws. "
I tried understanding the source code from Avisynth plus and Vapoursynth at
https://github.com/dubhater/vapoursynth-histogram/blob/master/src/luma.c
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/filters/histogram.cpp#L519
and then translating that into a expression than can be used in mt_lut.
Trying to do that has made me realize that I have no clue what I'm doing and I don't even know if mt_lut can do it at all.
So rather than wasting more time, anyone got a solution for this?
Or do I have have to wait for histogram to support HBD in Avisynth Plus?
Closest I got to something somewhat similear was:
mt_lut("x range_half / 16 ^ range_max *",use_expr=2).Grayscale()
Though it seems to remove most of the details instead of doing whatever histogram is doing.
By the description, the function doesn't seem very complex:
"This mode will amplify luminance, and display very small luminance variations. This is good for detecting blocking and noise, and can be helpful at adjusting filter parameters. In this mode a 1 pixel luminance difference will show as a 16 pixel luminance pixel, thus seriously enhancing small flaws. "
I tried understanding the source code from Avisynth plus and Vapoursynth at
https://github.com/dubhater/vapoursynth-histogram/blob/master/src/luma.c
https://github.com/AviSynth/AviSynthPlus/blob/master/avs_core/filters/histogram.cpp#L519
and then translating that into a expression than can be used in mt_lut.
Trying to do that has made me realize that I have no clue what I'm doing and I don't even know if mt_lut can do it at all.
So rather than wasting more time, anyone got a solution for this?
Or do I have have to wait for histogram to support HBD in Avisynth Plus?
Closest I got to something somewhat similear was:
mt_lut("x range_half / 16 ^ range_max *",use_expr=2).Grayscale()
Though it seems to remove most of the details instead of doing whatever histogram is doing.