mirror of https://github.com/mpv-player/mpv
vo_gpu: improve gamut warning bounds checks
Test for signals exceeding 0.5% of the permitted gamut, in either direction. (Before, it was 1% above and 0% below) Should fix https://github.com/mpv-player/mpv/issues/8161
This commit is contained in:
parent
9976c83e0f
commit
dc0e9644cd
|
@ -898,8 +898,8 @@ void pass_color_map(struct gl_shader_cache *sc, bool is_linear,
|
||||||
|
|
||||||
// Warn for remaining out-of-gamut colors is enabled
|
// Warn for remaining out-of-gamut colors is enabled
|
||||||
if (opts->gamut_warning) {
|
if (opts->gamut_warning) {
|
||||||
GLSL(if (any(greaterThan(color.rgb, vec3(1.01))) ||
|
GLSL(if (any(greaterThan(color.rgb, vec3(1.005))) ||
|
||||||
any(lessThan(color.rgb, vec3(0.0)))))
|
any(lessThan(color.rgb, vec3(-0.005)))))
|
||||||
GLSL(color.rgb = vec3(1.0) - color.rgb;) // invert
|
GLSL(color.rgb = vec3(1.0) - color.rgb;) // invert
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue