Commit graph

20 commits

Author SHA1 Message Date
Arun Raghavan
94039790f8 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).
2012-10-30 20:34:21 +05:30
Peter Meerwald
baa15bd17b svolume_arm: Fix a const warning.
CC       libpulsecore_2.98_la-svolume_arm.lo
pulsecore/svolume_arm.c: In function 'pa_volume_s16ne_arm':
pulsecore/svolume_arm.c:50:8: warning: assignment discards 'const' qualifier from pointer target type [enabled by default]

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2012-10-23 10:59:44 +03:00
Arun Raghavan
97f2d6b347 core: Fix a litte-endian bug in ARM svolume code
The old code seems to be written for big-endian code.
2012-10-19 19:44:10 +05:30
Arun Raghavan
600e3daa56 core: Document ARM-optimised svolume code a bit 2012-10-19 19:44:10 +05:30
Arun Raghavan
f8017bb19d tests: Factor out ARM svolume test into cpu-test
This allows us to run the testing code separately from the PulseAudio
daemon, which makes developing / regression testing this code a lot
easier.
2012-10-19 19:43:30 +05:30
Peter Meerwald
503de445a6 core: Set volumes const in pa_do_volume_func_t
volumes do not change, the samples get scaled

Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com>
2012-07-17 11:22:09 +05:30
Peter Meerwald
d103f3a97a core: svolume tests should generate realistic random volume data
assuming RAND_MAX is around 1<<31, rand() >> 1 generates large numbers as
random volume data; these likely causes saturated sample values after
applying the volume function -- not a good test
2012-02-10 17:21:31 +05:30
Tanu Kaskinen
0636f4e685 svolume: Make log messages more precise.
I was looking at a log, and noticed the following lines:

I  [pulseaudio] svolume_mmx.c: Initialising MMX optimized functions.
I  [pulseaudio] remap_mmx.c: Initialising MMX optimized remappers.
I  [pulseaudio] svolume_sse.c: Initialising SSE2 optimized functions.
I  [pulseaudio] remap_sse.c: Initialising SSE2 optimized remappers.
I  [pulseaudio] sconv_sse.c: Initialising SSE2 optimized conversions.

It seemed odd that some messages were somewhat precise in
what functionality was initialized, while the svolume
messages told me that they had initialized just "functions".
So I made the svolume log messages more precise to match the
sconv and remap messages.
2011-08-15 09:41:56 +01:00
Maarten Bosmans
dd9265ac78 Remove unnecessary #includes 2011-06-22 23:12:20 +01:00
Arun Raghavan
0b2457432a volume: Get more data from volume tests
This makes the volume tests run in two loops and print the minimum,
maximum and standard deviation of readings from the inner loop. This
makes it easier to reason out performance drops (i.e. algorithmic
problems vs. other system issues such as processor contention).
2011-04-18 10:31:51 +02:00
Maarten Bosmans
b3721a12c5 Fixup #include directives according to Coding Style
Use #include "header.h" if functionality of header.h is implemented
and #include <header.h> if functionality of header.h is used.
2011-03-11 11:49:39 +00:00
Maarten Bosmans
ecf09f2cd6 Fix up according to Coding Style
Only whitespace changes in here
2011-03-11 11:49:35 +00:00
Arun Raghavan
516dd169b4 volume: Fix sample array size for tests
Somewhere in the history of the MMX tests, the number of channels was
changed from 1 to 2, but the number of samples was not increased to make
it even (multiple of the frame size).
2011-03-05 13:18:01 +05:30
Arun Raghavan
50448e1130 volume: Make tests use only valid volumes 2011-03-05 13:18:01 +05:30
Kurt Taylor
b7779ecce0 PulseAudio: added IT block to fix thumb conditional instruction build error messages
See: http://pulseaudio.org/ticket/914

Tweaked-By: Arun Raghavan <arun.raghavan@collabora.co.uk>
2011-02-21 10:15:41 +00:00
Arun Raghavan
12b900858a volume: Add explicit checks for ARMv6 instructions
This ensures that the build does not fail if the ssat and pkhbt
instructions are not available (armv5te and below).

Fixes: http://www.pulseaudio.org/ticket/790
2010-11-28 16:23:18 +00:00
David Henningsson
4d84a00b49 SSE/MMX/ARM: Fix high frequency noise with unusual number of channels
In the assembly optimized versions of SSE, a noise could occur when the
number of channels were 3,5,6 or 7. For MMX and ARM, this could occur
when the number of channels were 3.

Signed-off-by: David Henningsson <david.henningsson@canonical.com>
2010-10-13 14:52:03 +01:00
Wim Taymans
f8ffe0dabc svolume: cleanups
Use PA_MAX
Use pa_rtclock_now() for benchmarks
2009-08-20 12:30:48 +02:00
Wim Taymans
f09b51198f whitespace fixes 2009-08-20 11:31:04 +02:00
Wim Taymans
951bf1b28d svolume: add ARM optimized volume scaling 2009-08-20 11:31:03 +02:00