From 247f821826c644889fd981e7d86ecec745eb9600 Mon Sep 17 00:00:00 2001 From: Mathieu Duponchelle Date: Tue, 29 Dec 2020 23:42:08 +0100 Subject: [PATCH] compositor/blend.c: fix MT fill_checker for YUY2 The initial byte offset should be calculated from the stride, not from the dest_add variable Example pipeline: gst-launch-1.0 videotestsrc ! video/x-raw, width=1920, height=1080, format=YUY2 ! \ queue ! compositor sink_0::xpos=200 ! video/x-raw, format=YUY2 ! xvimagesink Part-of: --- gst/compositor/blend.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gst/compositor/blend.c b/gst/compositor/blend.c index bd6573d..0d54335 100644 --- a/gst/compositor/blend.c +++ b/gst/compositor/blend.c @@ -1026,7 +1026,7 @@ fill_checker_##name##_c (GstVideoFrame * frame, guint y_start, guint y_end) \ dest_add = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0) - width * 2; \ width /= 2; \ \ - dest += dest_add * y_start; \ + dest += GST_VIDEO_FRAME_COMP_STRIDE (frame, 0) * y_start; \ for (i = 0; i < height; i++) { \ for (j = 0; j < width; j++) { \ dest[Y1] = tab[((i & 0x8) >> 3) + (((2 * j + 0) & 0x8) >> 3)]; \ -- 2.7.4