diff options
author | wm4 <wm4@nowhere> | 2015-08-30 23:00:39 +0200 |
---|---|---|
committer | wm4 <wm4@nowhere> | 2015-08-30 23:05:49 +0200 |
commit | fb94744595aabfa665e0799e9b386e77633c1818 (patch) | |
tree | 1736d2d06123014352315d6af05f7717b82252a2 /video | |
parent | 82f0d373fbecc18cd2ddc748f0b330160845f2cd (diff) | |
download | mpv-fb94744595aabfa665e0799e9b386e77633c1818.tar.bz2 mpv-fb94744595aabfa665e0799e9b386e77633c1818.tar.xz |
vo_opengl: fix alpha video in one case
yuva444p worked, yuva420p didn't. This happened because the chroma pass
discards the alpha plane, which is referenced by the alpha blend code
later.
Add a terrible hack to work this around, actually using the same hack as
was used for the Y plane. (A terrible hack for terrible code.)
Diffstat (limited to 'video')
-rw-r--r-- | video/out/gl_video.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/video/out/gl_video.c b/video/out/gl_video.c index 4eb4030244..d5af6efcfc 100644 --- a/video/out/gl_video.c +++ b/video/out/gl_video.c @@ -1450,6 +1450,7 @@ static void pass_read_video(struct gl_video *p) // Chroma preprocessing (merging -> shaders -> scaling) struct src_tex luma = p->pass_tex[0]; + struct src_tex alpha = p->pass_tex[3]; int c_w = p->pass_tex[1].src.x1 - p->pass_tex[1].src.x0; int c_h = p->pass_tex[1].src.y1 - p->pass_tex[1].src.y0; const struct scaler_config *cscale = &p->opts.scaler[2]; @@ -1510,6 +1511,7 @@ static void pass_read_video(struct gl_video *p) } p->pass_tex[0] = luma; // Restore the luma plane + p->pass_tex[3] = alpha; // Restore the alpha plane (if set) if (shader) { load_shader(p, shader); gl_sc_uniform_f(p->sc, "cmul", cmul); |