summaryrefslogtreecommitdiffstats
path: root/video
diff options
context:
space:
mode:
authorwm4 <wm4@nowhere>2016-02-18 10:41:13 +0100
committerwm4 <wm4@nowhere>2016-02-18 10:41:13 +0100
commitd6af58c699dad489fa19337cd91d8c3b78350d5f (patch)
treef581f0f347178b6ef560ed3638c196fd485f8948 /video
parent0d40140668a9f72162a234b874c0f0a89fd2fbc5 (diff)
downloadmpv-d6af58c699dad489fa19337cd91d8c3b78350d5f.tar.bz2
mpv-d6af58c699dad489fa19337cd91d8c3b78350d5f.tar.xz
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.
Diffstat (limited to 'video')
-rw-r--r--video/out/opengl/video.c8
1 files 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) {