From 35b0ccd8554e8b46833cb5b57be91e6201754a4f Mon Sep 17 00:00:00 2001 From: David Rosca Date: Thu, 28 Sep 2023 17:23:59 +0200 Subject: [PATCH] gallium/auxiliary/vl: Scale dst_rect x0/y0 when rendering chroma plane This fixes incorrect chroma plane position when x0/y0 is not zero. Fixes: 001358a97cc ("vl/compositor: add a new function for YUV deint") Acked-by: Thong Thai Part-of: --- src/gallium/auxiliary/vl/vl_compositor.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/gallium/auxiliary/vl/vl_compositor.c b/src/gallium/auxiliary/vl/vl_compositor.c index 91a10a678c4..4d791f1afb6 100644 --- a/src/gallium/auxiliary/vl/vl_compositor.c +++ b/src/gallium/auxiliary/vl/vl_compositor.c @@ -691,6 +691,8 @@ vl_compositor_yuv_deint_full(struct vl_compositor_state *s, vl_compositor_render(s, c, dst_surfaces[0], NULL, false); if (dst_rect) { + dst_rect->x0 /= 2; + dst_rect->y0 /= 2; dst_rect->x1 /= 2; dst_rect->y1 /= 2; } @@ -727,6 +729,8 @@ vl_compositor_convert_rgb_to_yuv(struct vl_compositor_state *s, vl_compositor_render(s, c, dst_surfaces[0], NULL, false); if (dst_rect) { + dst_rect->x0 /= 2; + dst_rect->y0 /= 2; dst_rect->x1 /= 2; dst_rect->y1 /= 2; }