[gst-devel] stride

Thomas Vander Stichele thomas at apestaart.org
Fri Jul 23 00:42:13 CEST 2004


Hi Dave,

> > 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.

Thanks for clarifying.  So for YUV, if it is planar, each of the planes
has a stride with multiple of four for each line ? And when it's packed,
every "line" of YUV data also has a rowstride rounded up to the next
foursome ?

As for elements, yes, ffmpegcolorspace doesn't do it correctly.  Neither
did videoscale, for which I fixed and verified for 16bit RGB, fixed (but
not yet able to verify) for 24 bit RGB.  I haven't touched YUV, since I
wanted to know first how it ought to be handled.

> > - 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).

ok, so that leaves us with ffmpegcolorspace fixing then ?

> > - 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.

Heh, good accidents happen :) Out of curiosity - do SDL, directfb, aa,
libcaca all handle video data the same way ? If they do, then
everything's fine.  If they don't - what does that mean ?

Thanks
Thomas


Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
When somebody knows you well
well there's no comfort like that
And when somebody loves you well
well there's no drug like that
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list