From 8524059bf5de1fee21caf41c67e5ebcfce5e608c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= Date: Mon, 9 Mar 2020 20:16:47 +0200 Subject: 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 db7936253..7a69bdc9d 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -956,8 +956,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; \ -- cgit v1.2.1