summaryrefslogtreecommitdiff
path: root/apps/codecs/lib/asm_arm.h
diff options
context:
space:
mode:
authorDave Hooper <dave@beermex.com>2010-02-21 21:14:40 +0000
committerDave Hooper <dave@beermex.com>2010-02-21 21:14:40 +0000
commit3c52395b570d5abc394b5a1320d642057e6f4174 (patch)
treee23bd14af0f37a591fa960a60b436fa3f0a8c1fa /apps/codecs/lib/asm_arm.h
parent8aae18b3cce0412c4beeae6fdf95fe190df6ea25 (diff)
downloadrockbox-3c52395b570d5abc394b5a1320d642057e6f4174.tar.gz
rockbox-3c52395b570d5abc394b5a1320d642057e6f4174.zip
Get a few more % speedup on ARM (measured on ipod video) - improve imdct full final symmetries using ldm/stm and simple register swapping. Also, add more comments (and improve/update some of the existing ones) regarding the layout of the imdct_half and the imdct_full
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24819 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/asm_arm.h')
-rw-r--r--apps/codecs/lib/asm_arm.h13
1 files changed, 5 insertions, 8 deletions
diff --git a/apps/codecs/lib/asm_arm.h b/apps/codecs/lib/asm_arm.h
index 4f31f80c3e..9dcbcef755 100644
--- a/apps/codecs/lib/asm_arm.h
+++ b/apps/codecs/lib/asm_arm.h
@@ -226,14 +226,11 @@ void vect_mult_bw(int32_t *data, int32_t *window, int n)
226#define _V_CLIP_MATH 226#define _V_CLIP_MATH
227 227
228static inline int32_t CLIP_TO_15(int32_t x) { 228static inline int32_t CLIP_TO_15(int32_t x) {
229 int tmp; 229 const int32_t mask = 0xffff7fff;
230 asm volatile("subs %1, %0, #32768\n\t" 230 asm volatile("teq %0,%0,asr #31\n\t"
231 "movpl %0, #0x7f00\n\t" 231 "eorne %0,%1,%0,asr #31\n\t"
232 "orrpl %0, %0, #0xff\n" 232 : "+r"(x)
233 "adds %1, %0, #32768\n\t" 233 : "r" (mask)
234 "movmi %0, #0x8000"
235 : "+r"(x),"=r"(tmp)
236 :
237 : "cc"); 234 : "cc");
238 return(x); 235 return(x);
239} 236}