[gst-devel] Re: liboil questions

David Schleef ds at schleef.org
Wed Jan 4 10:17:49 CET 2006

On Wed, Jan 04, 2006 at 04:00:39PM +0100, Stefan Kost wrote:
> hi ds and others,
> 1.) oil_init()
> I run
>   find . -name "*.c" -exec grep -Hn "oil_" {} \;
> against all my gst-0.10 cvs head sources and it looks like not all
> plugins using liboil do call oil_init(). These are the culprits:
>   gst-plugins-bad/gst/games/gstvideoimage.c
>   gst-plugins-base/gst/videotestsrc/videotestsrc.c
>   gst-plugins-good/gst/videobox/gstvideobox.c
> Should I add
>   oil_init();
> to their plugin_init() ?

Yes.  Btw, gstvideotestsrc.c calls oil_init() already.

> 2.) oilifying gstvolume
> I am looking at the volume element. It multiplies an array with a
> constant factor. It looks like we can replace
>   for (i = 0; i < num_samples; i++) {
>     *data++ *= this->real_vol_f;
>   }
> with
>   oil_scalarmult_f32(data,?,data,?,this->real_vol_f,num_samples);
> Questions:
> * what are the args int dstr and int sstr are for?

dstr and sstr should be 'sizeof(float)'.  The stride is the distance
(in bytes) from one element to the next.  This function will actually
be replaced fairly soon, since most functions with strides in them
are difficult to optimize usefully.

Please suggest new function classes if you feel they're useful.

> * is it okay to pass 'data' as source and target location?

You should consult the liboil documentation for a given function,
but in general, yes.

> 3.) Could a little note be added to the README or to the docs, that
> states which platforms currently benefit from using the liboil. From the
> source it looks like i386 and ppc. Is that right?

All platforms benefit somewhat.  i386 benefits a lot more.


David Schleef
Big Kitten LLC (http://www.bigkitten.com/) -- data acquisition on Linux

More information about the gstreamer-devel mailing list