summaryrefslogtreecommitdiff
path: root/apps/codecs/lib/codeclib_misc.h
diff options
context:
space:
mode:
authorAndree Buschmann <AndreeBuschmann@t-online.de>2010-02-21 22:05:48 +0000
committerAndree Buschmann <AndreeBuschmann@t-online.de>2010-02-21 22:05:48 +0000
commit28bc321dbb20bc061c4e39b4eccce4c80fcac4a1 (patch)
tree2c60b2ca5d5ad4563da8b44cdd0949e4ba1eff49 /apps/codecs/lib/codeclib_misc.h
parent84a4a1d5cc214e7450b60c006bef24ae550a76f3 (diff)
downloadrockbox-28bc321dbb20bc061c4e39b4eccce4c80fcac4a1.tar.gz
rockbox-28bc321dbb20bc061c4e39b4eccce4c80fcac4a1.zip
Remove CLIP_TO_15 from codeclib. Remove tabs.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@24834 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/codecs/lib/codeclib_misc.h')
-rw-r--r--apps/codecs/lib/codeclib_misc.h29
1 files changed, 15 insertions, 14 deletions
diff --git a/apps/codecs/lib/codeclib_misc.h b/apps/codecs/lib/codeclib_misc.h
index 6749231ebb..0d560755d7 100644
--- a/apps/codecs/lib/codeclib_misc.h
+++ b/apps/codecs/lib/codeclib_misc.h
@@ -116,18 +116,18 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) {
116 116
117/* replaced XPROD32 with a macro to avoid memory reference 117/* replaced XPROD32 with a macro to avoid memory reference
118 _x, _y are the results (must be l-values) */ 118 _x, _y are the results (must be l-values) */
119#define XPROD32(_a, _b, _t, _v, _x, _y) \ 119#define XPROD32(_a, _b, _t, _v, _x, _y) \
120 { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \ 120 { (_x)=MULT32(_a,_t)+MULT32(_b,_v); \
121 (_y)=MULT32(_b,_t)-MULT32(_a,_v); } 121 (_y)=MULT32(_b,_t)-MULT32(_a,_v); }
122 122
123 123
124#ifdef __i386__ 124#ifdef __i386__
125 125
126#define XPROD31(_a, _b, _t, _v, _x, _y) \ 126#define XPROD31(_a, _b, _t, _v, _x, _y) \
127 { *(_x)=MULT31(_a,_t)+MULT31(_b,_v); \ 127 { *(_x)=MULT31(_a,_t)+MULT31(_b,_v); \
128 *(_y)=MULT31(_b,_t)-MULT31(_a,_v); } 128 *(_y)=MULT31(_b,_t)-MULT31(_a,_v); }
129#define XNPROD31(_a, _b, _t, _v, _x, _y) \ 129#define XNPROD31(_a, _b, _t, _v, _x, _y) \
130 { *(_x)=MULT31(_a,_t)-MULT31(_b,_v); \ 130 { *(_x)=MULT31(_a,_t)-MULT31(_b,_v); \
131 *(_y)=MULT31(_b,_t)+MULT31(_a,_v); } 131 *(_y)=MULT31(_b,_t)+MULT31(_a,_v); }
132 132
133#else 133#else
@@ -207,7 +207,8 @@ void vect_mult_bw(int32_t *data, int32_t *window, int n)
207#endif 207#endif
208 208
209#endif 209#endif
210 210/* not used anymore */
211/*
211#ifndef _V_CLIP_MATH 212#ifndef _V_CLIP_MATH
212#define _V_CLIP_MATH 213#define _V_CLIP_MATH
213 214
@@ -219,10 +220,10 @@ static inline int32_t CLIP_TO_15(int32_t x) {
219} 220}
220 221
221#endif 222#endif
222 223*/
223static inline int32_t VFLOAT_MULT(int32_t a,int32_t ap, 224static inline int32_t VFLOAT_MULT(int32_t a,int32_t ap,
224 int32_t b,int32_t bp, 225 int32_t b,int32_t bp,
225 int32_t *p){ 226 int32_t *p){
226 if(a && b){ 227 if(a && b){
227#ifndef _LOW_ACCURACY_ 228#ifndef _LOW_ACCURACY_
228 *p=ap+bp+32; 229 *p=ap+bp+32;
@@ -236,16 +237,16 @@ static inline int32_t VFLOAT_MULT(int32_t a,int32_t ap,
236} 237}
237 238
238/*static inline int32_t VFLOAT_MULTI(int32_t a,int32_t ap, 239/*static inline int32_t VFLOAT_MULTI(int32_t a,int32_t ap,
239 int32_t i, 240 int32_t i,
240 int32_t *p){ 241 int32_t *p){
241 242
242 int ip=_ilog(abs(i))-31; 243 int ip=_ilog(abs(i))-31;
243 return VFLOAT_MULT(a,ap,i<<-ip,ip,p); 244 return VFLOAT_MULT(a,ap,i<<-ip,ip,p);
244} 245}
245*/ 246*/
246static inline int32_t VFLOAT_ADD(int32_t a,int32_t ap, 247static inline int32_t VFLOAT_ADD(int32_t a,int32_t ap,
247 int32_t b,int32_t bp, 248 int32_t b,int32_t bp,
248 int32_t *p){ 249 int32_t *p){
249 250
250 if(!a){ 251 if(!a){
251 *p=bp; 252 *p=bp;