From d6af58c699dad489fa19337cd91d8c3b78350d5f Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 18 Feb 2016 10:41:13 +0100 Subject: vo_opengl: pass the correct target to deband functions Apple crap (namely hardware decoding interop) forces us to use rectangle textures for input. But after that we continue with normal textures. This was not considered for debanding, and the sampler type used for it can be different depending on the exact render chain. Simply use the target type of the input texture. --- video/out/opengl/video.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index d13cd30202..9331f002c1 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -1348,7 +1348,7 @@ static bool pass_prescale_luma(struct gl_video *p, float tex_mul, if (p->opts.deband) { // apply debanding before upscaling. - pass_sample_deband(p->sc, p->opts.deband_opts, 0, p->gl_target, + pass_sample_deband(p->sc, p->opts.deband_opts, 0, p->pass_tex[0].gl_target, tex_mul, p->texture_w, p->texture_h, &p->lfg); finish_pass_fbo(p, &p->deband_fbo, p->texture_w, p->texture_h, 0, 0); @@ -1468,7 +1468,7 @@ static void pass_read_video(struct gl_video *p) } if (p->opts.deband) { - pass_sample_deband(p->sc, p->opts.deband_opts, 1, p->gl_target, + pass_sample_deband(p->sc, p->opts.deband_opts, 1, p->pass_tex[1].gl_target, p->use_normalized_range ? 1.0 : tex_mul, p->texture_w, p->texture_h, &p->lfg); GLSL(color.zw = vec2(0.0, 1.0);) // skip unused @@ -1505,8 +1505,8 @@ static void pass_read_video(struct gl_video *p) GLSL(vec4 main;) GLSLF("{\n"); if (!prescaled && p->opts.deband) { - pass_sample_deband(p->sc, p->opts.deband_opts, 0, p->gl_target, tex_mul, - p->texture_w, p->texture_h, &p->lfg); + pass_sample_deband(p->sc, p->opts.deband_opts, 0, p->pass_tex[0].gl_target, + tex_mul, p->texture_w, p->texture_h, &p->lfg); p->use_normalized_range = true; } else { if (!prescaled) { -- cgit v1.2.3