Hi,
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. Kind regards, -- Thibault Jochem ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
On Wed, 2010-02-24 at 11:54 +0100, Thibault Jochem wrote:
Hi, > 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. http://gstreamer.freedesktop.org/data/doc/gstreamer/head/gst-plugins-base-libs/html/gst-plugins-base-libs-gstvideo.html#gst-video-format-get-component-offset Cheers -Tim ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
In reply to this post by Thibault Jochem
The solution here is to use the GStreamer video library (provided by
gst-plugins-base, pkgconfig name gstreamer-video-0.10, which provides helper functions for getting this right in gstreamer/video/video.h Cheers, Benjamin On Wed, 2010-02-24 at 11:54 +0100, Thibault Jochem wrote: > Hi, > > 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. > > Kind regards, > -- > Thibault Jochem > > ------------------------------------------------------------------------------ > Download Intel® Parallel Studio Eval > Try the new software tools for yourself. Speed compiling, find bugs > proactively, and fine-tune applications for parallel performance. > See why Intel Parallel Studio got high marks during beta. > http://p.sf.net/sfu/intel-sw-dev > _______________________________________________ > gstreamer-devel mailing list > [hidden email] > https://lists.sourceforge.net/lists/listinfo/gstreamer-devel ------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev _______________________________________________ gstreamer-devel mailing list [hidden email] https://lists.sourceforge.net/lists/listinfo/gstreamer-devel |
Free forum by Nabble | Edit this page |