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:
parent
e9f729c17c
commit
f76f37991f
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user