From 4b25ec3a9d43638812adab38fe6177a57f81785a Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 5 Sep 2019 17:10:19 +0200 Subject: vo/gpu: fix check on src/dst peak mismatch In the past, src peak was always equal to or higher than dst peak. But since `--target-peak` got introduced, this could no longer be the case. This leads to an incorrect result (scaling for peak mismatch in gamma light) unless some other option (CMS, --linear-scaling, etc.) forces the linearization. Fixes #6533 --- video/out/gpu/video_shaders.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/gpu/video_shaders.c b/video/out/gpu/video_shaders.c index b34aa90bfa..e3021fdb9c 100644 --- a/video/out/gpu/video_shaders.c +++ b/video/out/gpu/video_shaders.c @@ -774,7 +774,7 @@ void pass_color_map(struct gl_shader_cache *sc, bool is_linear, // operations needs it bool need_linear = src.gamma != dst.gamma || src.primaries != dst.primaries || - src.sig_peak > dst.sig_peak || + src.sig_peak != dst.sig_peak || need_ootf; if (need_linear && !is_linear) { -- cgit v1.2.3