Possible to allocate all the buffers at 16-byte boundary?

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Possible to allocate all the buffers at 16-byte boundary?

yiliang
Hi,

Is it possible that all the buffers allocated inside gstreamer are made aligned at 16-byte boundary? This is to make it easier to use SIMD acceleration for some plugins.

Thanks,
Yiliang
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

Stefan Sauer
yiliang wrote:

> Hi,
>
> Is it possible that all the buffers allocated inside gstreamer are made
> aligned at 16-byte boundary? This is to make it easier to use SIMD
> acceleration for some plugins.
>
> Thanks,
> Yiliang
>
>  
latest core git version has "--with-buffer-alignment 8,N,malloc,pagesize
(default is 32)" as a configure option.

Stefan

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

David Schleef-2
On Fri, Mar 12, 2010 at 07:49:06PM -0800, Stefan Kost wrote:

> yiliang wrote:
> > Hi,
> >
> > Is it possible that all the buffers allocated inside gstreamer are made
> > aligned at 16-byte boundary? This is to make it easier to use SIMD
> > acceleration for some plugins.
> >
> > Thanks,
> > Yiliang
> >
> >  
> latest core git version has "--with-buffer-alignment 8,N,malloc,pagesize
> (default is 32)" as a configure option.

Note that this doesn't mean that *all* buffers are aligned.  Just that
more of them are.  So you still have to handle unaligned cases.

Yet another good reason to use Orc for SIMD code.



dave...


------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

yiliang
Hi Dave,

What I tried to do is something very simple, converting interleaved 422 to planar 420 using SSE. I am not sure whether it is already available somewhere.

Does Orc suppose to replace liboil? I also briefly checked out on liboil, and found the functions are mostly implemented in C, with some functions implemented in intrinsics. Is the goal of liboil (or Orc) mainly to develop optimized inner loop functions in C, or assembly-like implementation if possible?

Maybe I should post these questions somewhere else.

Thanks,
Yiliang
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

yiliang
In reply to this post by Stefan Sauer
Hi Stefan,

I ran the configuration as below:

./configure --with-buffer-alignment=16

It gives me the 16-byte aligned buffer now, although I am not very certain whether this is the right commandline syntax.

Thanks!
Yiliang
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

Stefan Sauer
hi,

yiliang wrote:

> Hi Stefan,
>
> I ran the configuration as below:
>
> ./configure --with-buffer-alignment=16
>
> It gives me the 16-byte aligned buffer now, although I am not very certain
> whether this is the right commandline syntax.
>
> Thanks!
> Yiliang
>  
this is correct. To ellaborate a bit on davids reply - this applies only
to buffers allocated with gst_buffer_new_and_alloc /
gst_buffer_try_new_and_alloc and so on. If elements allocate own memory
(e.g. xvimagesink) this is not guaranteed (in my case xvimagesink
allocated buffers' alignment is fine). So you should still check those
situations.

Stefan

------------------------------------------------------------------------------
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
Reply | Threaded
Open this post in threaded view
|

Re: Possible to allocate all the buffers at 16-byte boundary?

David Schleef-2
In reply to this post by yiliang
On Mon, Mar 15, 2010 at 10:42:12AM -0800, yiliang wrote:
> Hi Dave,
>
> What I tried to do is something very simple, converting interleaved 422 to
> planar 420 using SSE. I am not sure whether it is already available
> somewhere.

Yes, in gst-plugins-bad/ext/cog/

> Does Orc suppose to replace liboil?

Yes.



dave...


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