From 86a60a4dd22a717a069346acf4a6171837fb01b3 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Thu, 23 Jul 2015 20:40:42 +0200 Subject: [PATCH] vo_opengl: fix scale=oversample's threshold calculations This resulted in wrong behavior for values of scale-param1 between 0.0 and 0.5 (not inclusive). --- video/out/gl_video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 92d74ee8e6..610a8fdb25 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1314,7 +1314,7 @@ static void pass_sample_oversample(struct gl_video *p, struct scaler *scaler, GLSLF("coeff = mix(coeff, vec2(0.0), " "lessThanEqual(coeff, vec2(%f)));\n", threshold); GLSLF("coeff = mix(coeff, vec2(1.0), " - "greaterThanEqual(coeff, vec2(%f)));\n", threshold); + "greaterThanEqual(coeff, vec2(%f)));\n", 1.0 - threshold); } // Compute the right blend of colors GLSL(vec4 left = mix(texture(tex, baseSW),