From d5ee11fb36af3aa5a18368648cb043448d66b845 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 9 Mar 2020 20:16:47 +0200 Subject: [PATCH] compositor: Create a square checkerboard for UYVY/YUY2/YVYU too Previously the "squares" were twice as wide. Fixes https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/issues/732 --- gst/compositor/blend.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c index 657732a..41e20c0 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -976,8 +976,8 @@ fill_checker_##name##_c (GstVideoFrame * frame) \ \ for (i = 0; i < height; i++) { \ for (j = 0; j < width; j++) { \ - dest[Y1] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \ - dest[Y2] = tab[((i & 0x8) >> 3) + ((j & 0x8) >> 3)]; \ + dest[Y1] = tab[((i & 0x8) >> 3) + (((2 * j + 0) & 0x8) >> 3)]; \ + dest[Y2] = tab[((i & 0x8) >> 3) + (((2 * j + 1) & 0x8) >> 3)]; \ dest[U] = 128; \ dest[V] = 128; \ dest += 4; \ -- 2.7.4