Commit graph

27 commits

Author SHA1 Message Date
Maarten Bosmans
1afd233630 Make pulse compile with clang
This fixes the checking of supported compiler flags and the following error message for svolume_mmx:

pulsecore/svolume_mmx.c:157:76: error: invalid use of a cast in a inline asm context requiring an l-value:
  remove the cast or build with -fheinous-gnu-extensions
        : "+r" (samples), "+r" (volumes), "+r" (length), "=D" ((pa_reg_x86)channel), "=&r" (temp)
                                                               ~~~~~~~~~~~~^~~~~~~
2011-03-18 09:22:07 +00: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
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
Lennart Poettering
54025c96a7 cpu: check for CMOV flag before using this intsruction in assembly
http://pulseaudio.org/ticket/776
2010-02-09 22:32:39 +00:00
Wim Taymans
056930cbcd svolume: fix MMX error
We need to sign extend the lower part of the multiplication before adding it to
the higher part. Makes -1 * 0xffff work again.
2009-10-30 05:09:15 +01:00
Lennart Poettering
e7e4e4459e simd: update test cases 2009-10-29 01:52:39 +01:00
Diego Elio 'Flameeyes' Pettenò
8ec304d2d1 Fix build when using -fweb, accept both register and memory constraints.
This was reported as Gentoo bug #287391 by Torsten Kaiser, and the fix was
suggested by Mike Frysinger.
2009-10-07 19:31:11 +02:00
Wim Taymans
5eecd8ea7d svolume: tweak constraints for 32 bits
Tweak the constraints a little so that register starved 32bit systems
can select a stack variable for the channel paramter instead of reusing one of
the registers we're using in the code.
2009-09-23 17:18:20 +02:00
Lennart Poettering
231c17be03 svolume_mmx: disable test accidentaly left on 2009-09-17 01:34:02 +02:00
Wim Taymans
3d5a572694 svolume_mmx: optimize some more
We can reorder the algortihm a bit like we do for sse so that we
don't need the contants and masking instructions. Saves 2 instructions
for the mmx code.
2009-09-16 17:14:12 +02:00
Lennart Poettering
71e066c873 simd: be more precise which SIMD optimizations we activate 2009-09-09 04:28:22 +02: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
370016c0e7 svolume: fix compilation in 32bits 2009-08-20 11:31:04 +02:00
Wim Taymans
bd49d43bd3 svolume: add CPU guards around code
Mark code that should only be compiled on x86 CPUs with proper defines.
2009-08-20 11:31:03 +02:00
Wim Taymans
a98fa950d2 svolume: remove unneeded compare
We don't need the compare because the sub operation already set the right flags
for us.
2009-08-20 11:31:03 +02:00
Wim Taymans
591baacba5 volume: remove ref functions 2009-08-20 11:31:03 +02:00
Wim Taymans
f24c24c14b volume: improved comments 2009-08-20 11:31:03 +02:00
Wim Taymans
a1235446a7 volume: make the benchmark more meaningfull
MMX is about 6x faster, SSE around 15x on my machine.
2009-08-20 11:31:03 +02:00
Wim Taymans
dcae9a3113 svolume: add some comments 2009-08-20 11:31:03 +02:00
Wim Taymans
563cb2dea9 main: hook up cpu detection code
Add CPU detection code to activate the various optimisations.
Move some method definitions around.
Use compatibility macros when we can.
2009-08-20 11:31:03 +02:00
Wim Taymans
5998cf99b0 svolume: improve SSE and MMX code 2009-08-20 11:31:02 +02:00
Wim Taymans
08f3e16c84 volume_mmx: fix mmx code a bit 2009-08-20 11:31:02 +02:00
Wim Taymans
3a0b012ee0 volume: add first mmx optimized function
Add code for an mmx optimized version of s16ne volume scaling. Install the
custom function.
2009-08-20 11:31:02 +02:00