[gst-devel] Re: liboil questions

Stefan Kost ensonic at hora-obscura.de
Fri Jan 6 05:03:17 CET 2006


Hi David,

> 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.
Yes found that and added it to the others.
> 
>>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.
>
Suggestion:
oil_scalarmult_xxx(data,factor,num_values);
Multiply all elements in a vector with one and the same factor. Maybe
having a variant with and without clipping.

> 
>>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.
> 
Even platforms like arm or sparc? I run 'make check' and it outputs a
lot. Is there a kind of benchmark that I should run?

What about running such a benchmark on all gstreamer build-slaves. The
slave would fail if a chosen 'optimized' implementation is slower that
the normal C version. This seems to be part of the unit-tests anyway, right?
> 
> 
> dave...
> 

Stefan




More information about the gstreamer-devel mailing list