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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-base/-/merge_requests/988>
This commit is contained in:
Mathieu Duponchelle 2020-12-29 23:42:08 +01:00 committed by Mathieu Duponchelle
parent 8ff5079e5e
commit 247f821826

View file

@ -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; \ dest_add = GST_VIDEO_FRAME_COMP_STRIDE (frame, 0) - width * 2; \
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 (i = 0; i < height; i++) { \
for (j = 0; j < width; j++) { \ for (j = 0; j < width; j++) { \
dest[Y1] = tab[((i & 0x8) >> 3) + (((2 * j + 0) & 0x8) >> 3)]; \ dest[Y1] = tab[((i & 0x8) >> 3) + (((2 * j + 0) & 0x8) >> 3)]; \