[pulseaudio-discuss] [PATCH 4/6 v3] core: Add ARM NEON optimized mono-to-stereo/stereo-to-mono remapping code

Arun Raghavan arun.raghavan at collabora.co.uk
Mon Oct 29 05:15:07 PDT 2012


Hi Peter,

On Tue, 2012-07-24 at 10:20 +0200, Peter Meerwald wrote:
> From: Peter Meerwald <p.meerwald at bct-electronic.com>
> 
> v3:
> * fix test code: init float and int map_table
> * different code path for Cortex-A8 and later (-A9, A15, unknown)
> * convert from intrinsics to inline assembly
> v2:
> * add ARM NEON stereo-to-mono remapping code
> * static __attribute__ ((noinline)) is necessary to prevent inlining and
>   work around gcc 4.6 ICE, see https://bugs.launchpad.net/bugs/936863
> * call test code, the reference implementation is obtained using
>   pa_get_init_remap_func()
> * remove check for NEON flags
> v1:
> * ARM NEON mono-to-stereo remapping code
> 
> compiled with Ubuntu/Linaro gcc 4.6.3:
> arm-linux-gnueabi-gcc -O2 -mcpu=cortex-a8 -mfloat-abi=softfp -mfpu=neon
> 
> runtime on beagle-xm:
> 
> D: [pulseaudio] remap_neon.c: checking NEON remap_stereo_to_mono(float)
> I: [pulseaudio] remap.c: Using stereo to mono remapping
> I: [pulseaudio] remap_neon.c: NEON: 3082 usec.
> I: [pulseaudio] remap_neon.c: ref: 24201 usec.
> D: [pulseaudio] remap_neon.c: checking NEON remap_stereo_to_mono(s16)
> I: [pulseaudio] remap.c: Using stereo to mono remapping
> I: [pulseaudio] remap_neon.c: NEON: 1190 usec.
> I: [pulseaudio] remap_neon.c: ref: 5615 usec.
> D: [pulseaudio] remap_neon.c: checking NEON remap_mono_to_stereo(float)
> I: [pulseaudio] remap.c: Using mono to stereo remapping
> I: [pulseaudio] remap_neon.c: NEON/A8: 2350 usec.
> I: [pulseaudio] remap_neon.c: NEON/A9: 4730 usec.
> I: [pulseaudio] remap_neon.c: ref: 3601 usec.
> D: [pulseaudio] remap_neon.c: checking NEON remap_mono_to_stereo(s16)
> I: [pulseaudio] remap.c: Using mono to stereo remapping
> I: [pulseaudio] remap_neon.c: NEON: 1403 usec.
> I: [pulseaudio] remap_neon.c: ref: 3724 usec.
> I: [pulseaudio] remap_neon.c: Initialising ARM NEON optimized remappers.

My results on a Pandaboard do not match for some of these (numbers at
the end). Stereo->mono shows gains, but mono->stereo does not.

At this point, I'd like to defer the remap patches to post-3.0. We can
continue investigating in the mean time, so it can go as soon as 3.0 is
done. Things should be simpler now that the basic infrastructure is
pushed along with the sconv code, and I've got easy access to a few
boards to run tests quickly and provide faster feedback.

Again, sorry this got such a delayed review and thank you for your
patience.

Regards,
Arun

p.s.: Pandaboard results:

D: [pulseaudio] remap_neon.c: checking NEON remap_stereo_to_mono(float)
I: [pulseaudio] remap.c: Using stereo to mono remapping
I: [pulseaudio] remap_neon.c: NEON: 417481 usec.
I: [pulseaudio] remap_neon.c: ref: 712982 usec.
D: [pulseaudio] remap_neon.c: checking NEON remap_stereo_to_mono(s16)
I: [pulseaudio] remap.c: Using stereo to mono remapping
I: [pulseaudio] remap_neon.c: NEON: 131531 usec.
I: [pulseaudio] remap_neon.c: ref: 487183 usec.
D: [pulseaudio] remap_neon.c: checking NEON remap_mono_to_stereo(float)
I: [pulseaudio] remap.c: Using mono to stereo remapping
I: [pulseaudio] remap_neon.c: NEON/A8: 429504 usec.
I: [pulseaudio] remap_neon.c: NEON/A9: 252746 usec.
I: [pulseaudio] remap_neon.c: ref: 232849 usec.
D: [pulseaudio] remap_neon.c: checking NEON remap_mono_to_stereo(s16)
I: [pulseaudio] remap.c: Using mono to stereo remapping
I: [pulseaudio] remap_neon.c: NEON: 214233 usec.
I: [pulseaudio] remap_neon.c: ref: 296631 usec.
I: [pulseaudio] remap_neon.c: Initialising ARM NEON optimized remappers.



More information about the pulseaudio-discuss mailing list