From c296b6204fcace8a3ad99c08fa5d2931b70e57cc Mon Sep 17 00:00:00 2001 From: wm4 Date: Thu, 22 Sep 2016 15:16:53 +0200 Subject: =?UTF-8?q?vo=5Fopengl:=20apply=2090=C2=B0=20rotation=20to=20chrom?= =?UTF-8?q?a=20texture=20size?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit When we rotate the inmage by 90° or 270°, chroma width and height need to be swapped. Fixes #3568. But is the chroma sub location correct? Who the hell knows... --- video/out/opengl/video.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/video/out/opengl/video.c b/video/out/opengl/video.c index 5b1020f65e..ab799f3583 100644 --- a/video/out/opengl/video.c +++ b/video/out/opengl/video.c @@ -762,6 +762,9 @@ static void pass_get_img_tex(struct gl_video *p, struct video_image *vimg, float ls_w = 1.0 / (1 << p->image_desc.chroma_xs); float ls_h = 1.0 / (1 << p->image_desc.chroma_ys); + if (p->image_params.rotate % 180 == 90) + MPSWAP(float, ls_w, ls_h); + struct gl_transform chroma = {{{ls_w, 0.0}, {0.0, ls_h}}}; if (p->image_params.chroma_location != MP_CHROMA_CENTER) { -- cgit v1.2.3