diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-11-19 21:31:33 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-11-19 21:31:33 +0000 |
commit | 2a5053f58c1a33334776cc90264c67dde815cef3 (patch) | |
tree | 7acc0727874ff6b307eff293a18172a3239cd895 /apps/codecs/demac/libdemac/vector_math_generic.h | |
parent | 14d37cb4555703d216e954db15ccca2c34642dc3 (diff) | |
download | rockbox-2a5053f58c1a33334776cc90264c67dde815cef3.tar.gz rockbox-2a5053f58c1a33334776cc90264c67dde815cef3.zip |
Several tweaks and cleanups: * Use .rept instead of repeated macros for repeating blocks. * Use MUL (variant) instead of MLA (variant) in the first step of the ARM scalarproduct() if there's no loop. * Unroll ARM assembler functions to 32 where not already done, plus the generic scalarproduct().
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19144 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/demac/libdemac/vector_math_generic.h')
-rw-r--r-- | apps/codecs/demac/libdemac/vector_math_generic.h | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/apps/codecs/demac/libdemac/vector_math_generic.h b/apps/codecs/demac/libdemac/vector_math_generic.h index 7b61db77be..00bf07a007 100644 --- a/apps/codecs/demac/libdemac/vector_math_generic.h +++ b/apps/codecs/demac/libdemac/vector_math_generic.h | |||
@@ -116,8 +116,8 @@ static inline int32_t scalarproduct(filter_int* v1, filter_int* v2) | |||
116 | { | 116 | { |
117 | int res = 0; | 117 | int res = 0; |
118 | 118 | ||
119 | #if ORDER > 16 | 119 | #if ORDER > 32 |
120 | int order = (ORDER >> 4); | 120 | int order = (ORDER >> 5); |
121 | while (order--) | 121 | while (order--) |
122 | #endif | 122 | #endif |
123 | { | 123 | { |
@@ -137,6 +137,24 @@ static inline int32_t scalarproduct(filter_int* v1, filter_int* v2) | |||
137 | res += *v1++ * *v2++; | 137 | res += *v1++ * *v2++; |
138 | res += *v1++ * *v2++; | 138 | res += *v1++ * *v2++; |
139 | res += *v1++ * *v2++; | 139 | res += *v1++ * *v2++; |
140 | #if ORDER > 16 | ||
141 | res += *v1++ * *v2++; | ||
142 | res += *v1++ * *v2++; | ||
143 | res += *v1++ * *v2++; | ||
144 | res += *v1++ * *v2++; | ||
145 | res += *v1++ * *v2++; | ||
146 | res += *v1++ * *v2++; | ||
147 | res += *v1++ * *v2++; | ||
148 | res += *v1++ * *v2++; | ||
149 | res += *v1++ * *v2++; | ||
150 | res += *v1++ * *v2++; | ||
151 | res += *v1++ * *v2++; | ||
152 | res += *v1++ * *v2++; | ||
153 | res += *v1++ * *v2++; | ||
154 | res += *v1++ * *v2++; | ||
155 | res += *v1++ * *v2++; | ||
156 | res += *v1++ * *v2++; | ||
157 | #endif | ||
140 | } | 158 | } |
141 | return res; | 159 | return res; |
142 | } | 160 | } |