From 3df8e38af6da6c0699da8ef040ffc80cf7dab810 Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 1 Sep 2006 02:49:49 -0700 Subject: 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. --- src/libFLAC/cpu.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/libFLAC/cpu.c') 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 -- cgit v1.2.3-24-ge0c7