[gst-devel] YUV420p buffer plane alignmentg.

Tim-Philipp Müller t.i.m at zen.co.uk
Wed Feb 24 12:18:32 CET 2010

On Wed, 2010-02-24 at 11:54 +0100, Thibault Jochem wrote:


> I'm working with an YUV buffer taken from a fake sink, and I have some 
> troubles to find the right data alignment.
> For "standard" resolution, it's ok, but with Big Buck Bunny 480p for 
> example, which is 854x480 there is some kind of alignment :
> I figured out that for U and V buffer, each row is aligned to 
> even-numbered bytes (as buffers are 427x240).
> But I'm still missing something, as my total buffer size is 616320b 
> (reported by gstreamer), whereas my datas + alignment weight 615360b 
> ..... so I'm still missing 960b
> I also noticed that by U and V buffer are "offsetted" .... so I guess 
> that there is some padding between buffers ... but I'd like to know 
> exactly what's going on.

libgstvideo in -base has a few helper functions for this, e.g.



More information about the gstreamer-devel mailing list