[gst-devel] stride

Thomas Vander Stichele thomas at apestaart.org
Fri Jul 23 00:45:10 CEST 2004


Hi Ronald,

> On Thu, 2004-07-22 at 16:01, Thomas Vander Stichele wrote:
> > So does anyone know what the implied stride is for all colorspaces ? And
> > if it's ok to fix videoscale ?
> 
> For each, it's all bytepacked. For RGB, it's always width*bpp/8. For
> packed YUV, same. For planar YUV, it's ususally width for Y and
> width/hor_downsample for U/V. Hor_downsample is 1 for YUV422/444/411, 2
> for YUV420 (e.g. I420), 4 for YUV410, etc.

I assume you also know here what David said - that each of these strides
are rounded up to the nearest multiple of four ?

> > transforming could be done directly in videoscale IMO, as well as in
> > colorspace.
> 
> Why would colorspace change stride? I understand the "it's not hard to
> implement" argument, but for consistency, it's better not to (audioscale
> also doesn't convert channels mono<->stereo, no matter how easy that
> is).

It doesn't have to change the stride, but it has to respect it and
convert correctly.  3x2 from 16 bit to 24 bit should a) read the data
correctly as being video lines of 8 bytes per line (with 2 bytes
padding) and write them as 12 bytes per line (with 3 bytes padding).

Currently at least ffmpegcolorspace doesn't do this and I'm guessing
some of the others don't either.

Thomas

Dave/Dina : future TV today ! - http://www.davedina.org/
<-*- thomas (dot) apestaart (dot) org -*->
And discover your lover
Between the legs of another
And he's loving it
<-*- thomas (at) apestaart (dot) org -*->
URGent, best radio on the net - 24/7 ! - http://urgent.fm/






More information about the gstreamer-devel mailing list