about summary refs log tree commit
path: root/src/libFLAC/cpu.c
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/cpu.c
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/cpu.c')
-rw-r--r--src/libFLAC/cpu.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/libFLAC/cpu.c b/src/libFLAC/cpu.c
index de2bb2a3..977cb90c 100644
--- a/src/libFLAC/cpu.c
+++ b/src/libFLAC/cpu.c
@@ -125,6 +125,8 @@ void FLAC__cpu_info(FLAC__CPUInfo *info)
 #endif
 #elif defined FLAC__CPU_PPC
         info->type = FLAC__CPUINFO_TYPE_PPC;
+#elif defined FLAC__CPU_ARM
+        info->type = FLAC__CPUINFO_TYPE_ARM;
 #if !defined FLAC__NO_ASM
         info->use_asm = true;
 #ifdef FLAC__USE_ALTIVEC