]> code.delx.au - pulseaudio/commit
svolume: Fix ARM alignment issues
authorArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 30 Oct 2012 06:34:42 +0000 (12:04 +0530)
committerArun Raghavan <arun.raghavan@collabora.co.uk>
Tue, 30 Oct 2012 15:04:21 +0000 (20:34 +0530)
commit94039790f8cd05542a6651f924fa1818ea1af605
tree51e8c214a78e8e730e5efc84e87a83cdbf24910d
parent96fa87086dc5624eb4646ba126152c2e9e5b1257
svolume: Fix ARM alignment issues

As Peter Meerwald <p.meerwald@bct-electronic.com> discovered, our ARM
svolume code performance is quite terrible when the incoming samples are
not word-aligned. This can very easily be the case, since the
architecture only requires that the samples be 16-bit aligned, and we
might end up running the innermost loop after processing modulo-4
samples. The performance degradation was ~50x on a Cortex A9
(Pandaboard).

This reworks the svolume logic to first consume enough samples to make
sure the rest is word aligned, and reordering the processing to work
with 4 samples at a time first, and then finally deal with the
remainder.

With this, performance is comparable for arbitrary alignments (~3x
faster than the C code).
src/pulsecore/svolume_arm.c