0
0
mirror of https://github.com/mpv-player/mpv.git synced 2024-09-20 12:02:23 +02:00

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.
This commit is contained in:
Niklas Haas 2017-07-10 13:46:41 +02:00
parent e9f729c17c
commit f76f37991f
No known key found for this signature in database
GPG Key ID: 9A09076581B27402

View File

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