volume: Add Orc-based optimised volume scaling

This adds volume scaling for 1- and 2-channel software volume scaling
using Orc. While testing the MMX and SSE backends on a Core2, I see an
~2x performance benefit over the hand-rolled MMX and SSE code. Since I
haven't been able to test on other architectures, the Orc code is only
used when MMX/SSE* is present. This can be changed in the future after
testing on AMD and ARM machines.
This commit is contained in:
Arun Raghavan 2010-10-25 17:59:08 +01:00
parent 516dd169b4
commit 4cd90d9e32
6 changed files with 282 additions and 0 deletions

View file

@ -850,6 +850,7 @@ libpulsecore_@PA_MAJORMINOR@_la_SOURCES = \
pulsecore/cpu.h \
pulsecore/cpu-arm.c pulsecore/cpu-arm.h \
pulsecore/cpu-x86.c pulsecore/cpu-x86.h \
pulsecore/cpu-orc.c pulsecore/cpu-orc.h \
pulsecore/svolume_c.c pulsecore/svolume_arm.c \
pulsecore/svolume_mmx.c pulsecore/svolume_sse.c \
pulsecore/sconv-s16be.c pulsecore/sconv-s16be.h \
@ -874,6 +875,14 @@ libpulsecore_@PA_MAJORMINOR@_la_CFLAGS = $(AM_CFLAGS) $(LIBSAMPLERATE_CFLAGS) $(
libpulsecore_@PA_MAJORMINOR@_la_LDFLAGS = $(AM_LDFLAGS) -avoid-version
libpulsecore_@PA_MAJORMINOR@_la_LIBADD = $(AM_LIBADD) $(LIBLTDL) $(LIBSAMPLERATE_LIBS) $(LIBSPEEX_LIBS) $(LIBSNDFILE_LIBS) $(WINSOCK_LIBS) $(LTLIBICONV) libpulsecommon-@PA_MAJORMINOR@.la libpulse.la libpulsecore-foreign.la
if HAVE_ORC
ORC_SOURCE += pulsecore/svolume
libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/svolume_orc.c
nodist_libpulsecore_@PA_MAJORMINOR@_la_SOURCES = pulsecore/svolume-orc-gen.c pulsecore/svolume-orc-gen.h
libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(ORC_CFLAGS)
libpulsecore_@PA_MAJORMINOR@_la_LIBADD += $(ORC_LIBS)
endif
if HAVE_X11
libpulsecore_@PA_MAJORMINOR@_la_SOURCES += pulsecore/x11wrap.c pulsecore/x11wrap.h
libpulsecore_@PA_MAJORMINOR@_la_CFLAGS += $(X11_CFLAGS)