summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2020-03-09 20:16:47 +0200
committerTim-Philipp Müller <tim@centricular.com>2020-03-13 12:38:00 +0000
commit8524059bf5de1fee21caf41c67e5ebcfce5e608c (patch)
treeebc0442bcf4c6da815629bf0ce46396553ae5ace
parent228275930056b7377c19f2e4fadb9b425c6f032c (diff)
downloadgstreamer-plugins-base-8524059bf5de1fee21caf41c67e5ebcfce5e608c.tar.gz
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
-rw-r--r--gst/compositor/blend.c4
1 files 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; \