about summary refs log tree commit
path: root/src/libFLAC/include/private/fixed.h
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2006-09-01 02:49:49 -0700
committerEric Wong <normalperson@yhbt.net>2006-09-09 18:57:40 -0700
commit3df8e38af6da6c0699da8ef040ffc80cf7dab810 (patch)
treef931e7aa499850db2992262f38aa3c1ccbd9d332 /src/libFLAC/include/private/fixed.h
parentf345a3435dde249874fde205ef4b793184e1e7c4 (diff)
downloadflac-arm-1.1.3-3df8e38af6da6c0699da8ef040ffc80cf7dab810.tar.gz
Add ARM assembly optimizations
This was my first time writing ARM assembly, so it may not be the
best; but they're still significantly faster than the optimized
C versions[1] of the functions replace.

An knowledgable ARM coder should be able to make better
optimizations, but nobody has done so for FLAC yet (at least not
publicly, to my knowledge), so I decided to take a stab at it.

Also tweaked configure.in a bit to better support
cross-compilation.  no longer enable 3dnow, sse, or altivec
optimizations unless our CPU supports them.  (note: sse and
3dnow are supported by 64-bit chips, but the code is currently
only optimized for 32-bit sse and 3dnow).

FLAC__fixed_restore_signal_asm_arm and
FLAC__lpc_restore_signal_asm_arm are pretty well-tested from
tracks in my music collection.  I do not think I have any music
that can exersises FLAC__lpc_restore_signal_asm_arm_wide
(especially the 64-bit ASR macro).

These optimizations changes result in an approximately 20%
reduction in decoding time on my 3rd generation ipod (running
ipodlinux).

[1] - I still have them at hand, but they're not probably not
worth it for the non-ASM optimized architectures.
Diffstat (limited to 'src/libFLAC/include/private/fixed.h')
-rw-r--r--src/libFLAC/include/private/fixed.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/libFLAC/include/private/fixed.h b/src/libFLAC/include/private/fixed.h
index bb71b202..7dd40c9b 100644
--- a/src/libFLAC/include/private/fixed.h
+++ b/src/libFLAC/include/private/fixed.h
@@ -92,6 +92,10 @@ void FLAC__fixed_compute_residual(const FLAC__int32 data[], unsigned data_len, u
  *        IN  data[-order,-1]               previously-reconstructed historical samples
  *        OUT data[0,data_len-1]            original signal
  */
+#if (!defined(FLAC__NO_ASM) && defined(FLAC__CPU_ARM))
+void FLAC__fixed_restore_signal_asm_arm(const FLAC__int32 residual[], unsigned data_len, unsigned order, FLAC__int32 data[]);
+#else
 void FLAC__fixed_restore_signal(const FLAC__int32 residual[], unsigned data_len, unsigned order, FLAC__int32 data[]);
+#endif
 
 #endif