GNOME Bugzilla – Bug 353658
[videotestsrc] doesn't round strides correctly for YVYU
Last modified: 2006-09-01 10:16:51 UTC
The following pipeline errors out with ** (gst-launch-0.10:15221): WARNING **: Size 152482 is not a multiple of unit size 152960 ERROR: from element /pipeline0/videoscale0: subclass did not specify output size gst-launch-0.10 videotestsrc ! video/x-raw-yuv,format=\(fourcc\)YVYU,width=319,height=239 ! videoscale ! video/x-raw-yuv,width=640,height=480 ! videoscale ! video/x-raw-yuv,width=319,height=239 ! fakesink This is because videotestsrc and videoscale don't calculate the stride for YVYU in the same way: videotestsrc : stride = GST_ROUND_UP_2 (width * 2); videoscale : stride = GST_ROUND_UP_4 (width * 2); Which one is the right one?
videotestsrc's code there is a NOP (width * 2 is, obviously, always a multiple of 2). So videoscale's code looks more plausible to me.
Agreed, but there's also always (c) none of the above ;)
True, but videoscale's makes sense too: YVYU is a format that inherently works 4 bytes at a time. I vote for videotestsrc being fixed. Also, by commenting on this multiple times, I can artificially inflate my bugzilla points score!
It is likely that videoscale is correct, since the a priori requirement is that rowstrides are multiples of 4. (Dare I say "word-aligned"?) In any case, the authority on this is always xvimagesink.
2006-09-01 Tim-Philipp Müller <tim at centricular dot net> * gst/videotestsrc/videotestsrc.c: (paint_setup_YVYU): Fix stride for YVYU to be word-aligned (#353658).