Open geextahslex opened 2 days ago
Likely duplicate of #12707 you can try with target-contrast=inf
This doesn't fix it, this messes up the contrast or black levels
It seems like I would need to disable this "feature" that desatures the image
// Avoid raising saturation excessively when raising brightness, and // also desaturate when reducing brightness greatly to account for the // reduction in gamut volume.
https://github.com/mpv-player/mpv/issues/12707#issuecomment-1774077987
that fix didn't age well "shaders/colorspace: scale down saturation when raising brightness" https://code.videolan.org/videolan/libplacebo/-/merge_requests/477/diffs
https://github.com/mpv-player/mpv/issues/12707#issuecomment-1778651176
I reverted that patch and recompiled and saturation looks fine now. This piece of code is responsible for the described effect in dark scenes.
How to patch this out? I have no experience with this...
@haasn My suggestion would be to add an percantage option to this function, so you can turn it on, off or fine-tune it to your liking.
is this the code responsible for this? https://github.com/mpv-player/mpv/blob/master/video/out/gpu/video_shaders.c
if (!opts->gamut_mode || opts->gamut_mode == GAMUT_DESATURATE) {
GLSL(float cmin = min(min(color.r, color.g), color.b);)
GLSL(if (cmin < 0.0) {
float luma = dot(dst_luma, color.rgb);
float coeff = cmin / (cmin - luma);
color.rgb = mix(color.rgb, vec3(luma), coeff);
})
GLSLF("float cmax = 1.0/%f * max(max(color.r, color.g), color.b);\n",
dst.hdr.max_luma / MP_REF_WHITE);
GLSL(if (cmax > 1.0) color.rgb /= cmax;)
}
}
Hey @geextahslex .... I want to understand more about this: How did you find out that vf=format=sig-peak=4.926 deactivates the feature. What does this do exactly?
Wouldn't it be the same to set target-peak = 1000 ?
So what you want is the Brightness of the HDR picture, but you do NOT want the washed out colors, mhh?
Did you try out the spline tone-mapping instead of st2094 ? It really works out as the best i think. The algorithm makes really sense.
@stonix015
I want to understand more about this: How did you find out that vf=format=sig-peak=4.926 deactivates the feature. What does this do exactly?
I found this out by accident, and kasper gave me this line to fix it.
Wouldn't it be the same to set target-peak = 1000 ?
From my understanding no, because target-peak is kinda your output target and the metadata nits is the input to the pipeline. You can see it at the top in these screenshots.
almost black and white
normal
So what you want is the Brightness of the HDR picture, but you do NOT want the washed out colors, mhh?
Yes, I dont want the desaturation effect.
Did you try out the spline tone-mapping instead of st2094 ? It really works out as the best i think. The algorithm makes really sense.
At this point I tried out everything, spline, hable, rainhard etc. For me st2094-10 works kinda the best.
mpv Information
Other Information
Reproduction Steps
use these hdr tonemapping settings and compare a dark scene with and without
vf=format=sig-peak=4.926
to see the difference in saturationExpected Behavior
saturation stays the same
Actual Behavior
dark scenes get desaturated and look washed out
Log File
full output output full.txt gpu-debug output.txt
Sample Files
almost black and white
normal
washed out
normal
I carefully read all instruction and confirm that I did the following:
--log-file=output.txt
.