From f76f37991fc964fdb14632d1bd8da63487ea1063 Mon Sep 17 00:00:00 2001 From: Niklas Haas Date: Mon, 10 Jul 2017 13:46:41 +0200 Subject: 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. --- video/out/opengl/video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'video') 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); -- cgit v1.2.3