From 4cd90d9e32ca9a23e3c0f7615974ea0c55ff3e49 Mon Sep 17 00:00:00 2001 From: Arun Raghavan Date: Mon, 25 Oct 2010 17:59:08 +0100 Subject: 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. --- src/Makefile.am | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Makefile.am') diff --git a/src/Makefile.am b/src/Makefile.am index 24e2f825..68eabd29 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -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) -- cgit