diff options
author | Niklas Haas <git@haasn.xyz> | 2017-07-10 13:46:41 +0200 |
---|---|---|
committer | Niklas Haas <git@haasn.xyz> | 2017-07-10 13:46:41 +0200 |
commit | f76f37991fc964fdb14632d1bd8da63487ea1063 (patch) | |
tree | ae7609dd39337924b3f28d476572b73838cd2f23 /video/out/opengl/video.c | |
parent | e9f729c17c8d901dbdf88a94d133dfa730a62c0d (diff) | |
download | mpv-f76f37991fc964fdb14632d1bd8da63487ea1063.tar.bz2 mpv-f76f37991fc964fdb14632d1bd8da63487ea1063.tar.xz |
vo_opengl: fix dumb_mode chroma transformation fixup
In commit 6eb0bbe this was changed from xs[n] to use gl_format.chroma_w
indiscriminately, which broke chroma rendering when zooming/cropping.
The solution is to only use chroma_w for chroma planes.
Fixes #4592.
Diffstat (limited to 'video/out/opengl/video.c')
-rw-r--r-- | video/out/opengl/video.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 14d66074e5..bdd6c50050 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -2443,8 +2443,8 @@ static void pass_render_frame_dumb(struct gl_video *p, int fbo) int index = 0; for (int i = 0; i < p->plane_count; i++) { - int cw = p->gl_format.chroma_w; - int ch = p->gl_format.chroma_h; + int cw = tex[i].type == PLANE_CHROMA ? p->gl_format.chroma_w : 1; + int ch = tex[i].type == PLANE_CHROMA ? p->gl_format.chroma_h : 1; if (p->image_params.rotate % 180 == 90) MPSWAP(int, cw, ch); |