summaryrefslogtreecommitdiff
path: root/apps/codecs/lib/codeclib_misc.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/lib/codeclib_misc.h')
-rw-r--r--apps/codecs/lib/codeclib_misc.h25
1 files changed, 19 insertions, 6 deletions
diff --git a/apps/codecs/lib/codeclib_misc.h b/apps/codecs/lib/codeclib_misc.h
index 015a15ece3..6749231ebb 100644
--- a/apps/codecs/lib/codeclib_misc.h
+++ b/apps/codecs/lib/codeclib_misc.h
@@ -132,23 +132,36 @@ static inline int32_t MULT31_SHIFT15(int32_t x, int32_t y) {
132 132
133#else 133#else
134 134
135static inline void XPROD31(int32_t a, int32_t b, 135static inline void XPROD31(int32_t a, int32_t b,
136 int32_t t, int32_t v, 136 int32_t t, int32_t v,
137 int32_t *x, int32_t *y) 137 int32_t *x, int32_t *y)
138{ 138{
139 *x = MULT31(a, t) + MULT31(b, v); 139 *x = MULT31(a, t) + MULT31(b, v);
140 *y = MULT31(b, t) - MULT31(a, v); 140 *y = MULT31(b, t) - MULT31(a, v);
141} 141}
142 142
143static inline void XNPROD31(int32_t a, int32_t b, 143static inline void XNPROD31(int32_t a, int32_t b,
144 int32_t t, int32_t v, 144 int32_t t, int32_t v,
145 int32_t *x, int32_t *y) 145 int32_t *x, int32_t *y)
146{ 146{
147 *x = MULT31(a, t) - MULT31(b, v); 147 *x = MULT31(a, t) - MULT31(b, v);
148 *y = MULT31(b, t) + MULT31(a, v); 148 *y = MULT31(b, t) + MULT31(a, v);
149} 149}
150#endif 150#endif
151 151
152#define XPROD31_R(_a, _b, _t, _v, _x, _y)\
153{\
154 _x = MULT31(_a, _t) + MULT31(_b, _v);\
155 _y = MULT31(_b, _t) - MULT31(_a, _v);\
156}
157
158#define XNPROD31_R(_a, _b, _t, _v, _x, _y)\
159{\
160 _x = MULT31(_a, _t) - MULT31(_b, _v);\
161 _y = MULT31(_b, _t) + MULT31(_a, _v);\
162}
163
164
152#ifndef _V_VECT_OPS 165#ifndef _V_VECT_OPS
153#define _V_VECT_OPS 166#define _V_VECT_OPS
154 167