[gst-devel] stride

David Schleef ds at schleef.org
Thu Jul 22 15:02:21 CEST 2004


On Wed, Jul 21, 2004 at 07:35:07PM +0200, Thomas Vander Stichele wrote:
> while working on pixel aspect ratio stuff I ran into a problem that I'm
> not sure how we would want to handle it.
> 
> The problem I was having was that a video was being scaled to 1015x432. 
> Now when ximagesink was allocating buffers for this, the XShmCreateImage
> call gives you back a bytes_per_line property (which is video stride),
> and expecting it to be respected.  However, GStreamer was not feeding
> ximagesink data respecting the rowstride.
> 
> So I started thinking about it some more, and read some code.
> 
> - do we have an explicit or implicit definition of how data should be
> laid out in both RGB and YUV ?

Yes.  Both RGB and YUV implicitly use a rowstride that is the bytes-
per-line rounded up to a multiple of 4.  Both videotestsrc and
x[v]imagesink handle this correctly, ffmpegcolorspace does not.

> - videotestsrc implicitly seems to output data with rowstride in my
> particular test case.  Can we trust videotestsrc to be doing the correct
> thing or should I doublecheck it for all cases ?

I checked vts against my X server (with multiple drivers) for
every format supported for every (width%8) and (height%8).

> - should rowstride be part of the caps (at least in cases where the
> rowstride is not the one that you would implicitly assume) ?

Not necessary, imo.  It appears that all code that does it in a
vaguely correct way all do it in the same way.



dave...





More information about the gstreamer-devel mailing list