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: 001358a97c ("vl/compositor: add a new function for YUV deint")

Acked-by: Thong Thai <thong.thai@amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26123>
This commit is contained in:
David Rosca
2023-09-28 17:23:59 +02:00
committed by Marge Bot
parent e9091b1f5c
commit 35b0ccd855
+4
View File
@@ -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;
}