[gst-devel] [PATCH] audioconvert: add NEON acceleration for some conversions

Sebastian Dröge sebastian.droege at collabora.co.uk
Mon Aug 10 16:59:51 CEST 2009


Am Montag, den 10.08.2009, 09:41 -0500 schrieb Rob Clark:
> 1) convert default processing functions to __attribute__((weak)) so they can be overrided with
>    architecture specific accelerated functions (ie. NEON, MMX, Altivec, etc)
> 2) override gst_audio_quantize_quantize_signed_tpdf_none() to use NEON vector instructions
> 3) override gst_audio_convert_unpack_float_le() to use NEON vector instructions
> 
> This speeds up audioconvert ~10x, at least for the 32b float -> 16b int conversion needed to play
> AC-3 audio (ie. DVD's) via ALSA

Hi,
first of all, could you file a bug for this and attach the bug there? :)

and then some comments on the patch itself:
- Don't use __atribute__(weak), it's not portable. Instead use liboil to
  detect at runtime if the CPU supports a specific instruction set and
  then use the appropiate function pointer to the unpack/quantize
  function
- Add a configure check to see if the compiler supports the specific
  instruction set and only compile that ARMv7 code then
- The start of a buffer might not be 16 byte aligned or what alignment
  is required by VFP. It's only guaranteed to be aligned to the sample
  type, i.e. 2 byte aligned for 16 bit samples, etc

In general this patch is a good idea though, something like this really
needs to go into audioconvert at critical places for other architectures
too.

FYI, David Schleef has partially converted audioconvert to use orc[0].
Together with the orc VFP backend this would obsolete your patch I guess.

[0] http://cgit.freedesktop.org/~ds/gst-plugins-base/log/?h=orc
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://lists.freedesktop.org/archives/gstreamer-devel/attachments/20090810/33614c12/attachment.pgp>


More information about the gstreamer-devel mailing list