diff options
Diffstat (limited to 'apps/codecs/lib/codeclib_misc.h')
-rw-r--r-- | apps/codecs/lib/codeclib_misc.h | 29 |
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 | */ | |
223 | static inline int32_t VFLOAT_MULT(int32_t a,int32_t ap, | 224 | static 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 | */ |
246 | static inline int32_t VFLOAT_ADD(int32_t a,int32_t ap, | 247 | static 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; |