After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 353658 - [videotestsrc] doesn't round strides correctly for YVYU
[videotestsrc] doesn't round strides correctly for YVYU
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-base
git master
Other Linux
: Normal normal
: 0.10.10
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2006-08-31 08:47 UTC by Tim-Philipp Müller
Modified: 2006-09-01 10:16 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Tim-Philipp Müller 2006-08-31 08:47:00 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?
Comment 1 Michael Smith 2006-08-31 09:00:56 UTC
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.
Comment 2 Tim-Philipp Müller 2006-08-31 09:12:20 UTC
Agreed, but there's also always (c) none of the above ;)
Comment 3 Michael Smith 2006-08-31 09:47:30 UTC
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!
Comment 4 David Schleef 2006-08-31 20:30:37 UTC
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.
Comment 5 Tim-Philipp Müller 2006-09-01 10:16:51 UTC
 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).