[gst-devel] aligned(16) GstBuffer Payload ?
David Schleef
ds at schleef.org
Sat Oct 13 05:53:48 CEST 2007
On Fri, Oct 12, 2007 at 05:05:58PM +0200, SP GLE wrote:
> is there a way to get a GstBuffer with a configurable memaligned
> payload (aligned(16)), in order to use payload with SSE2 and other
> liboil methods (even if liboil can work on not aligned data, using
> aligned could speed up some processing).
There are very few situations where allocating aligned buffers to
use with liboil will result in faster performance. Liboil was designed
to allow you to use it without thinking of such things.
In any case, you can create aligned buffers by allocating a normal
buffer with extra padding, and creating an appropriate subbuffer.
Alternately, you could create a subclass of GstBuffer similar to
the efence element in -good. Or you could patch gstbuffer.c and
add a function similar to gst_buffer_new_and_alloc() that allocates
memory using posix_memalign() instead of mallc().
dave...
More information about the gstreamer-devel
mailing list