vo_opengl: apply 90° rotation to chroma texture size

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...
This commit is contained in:
wm4 2016-09-22 15:16:53 +02:00
parent e300bfcf3a
commit c296b6204f
1 changed files with 3 additions and 0 deletions

View File

@ -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) {