diff options
Diffstat (limited to 'apps/codecs/Tremor/misc.h')
-rw-r--r-- | apps/codecs/Tremor/misc.h | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/apps/codecs/Tremor/misc.h b/apps/codecs/Tremor/misc.h index 81903e1b95..a6eb0fa04a 100644 --- a/apps/codecs/Tremor/misc.h +++ b/apps/codecs/Tremor/misc.h | |||
@@ -151,6 +151,51 @@ static inline void XNPROD31(ogg_int32_t a, ogg_int32_t b, | |||
151 | *y = MULT31(b, t) + MULT31(a, v); | 151 | *y = MULT31(b, t) + MULT31(a, v); |
152 | } | 152 | } |
153 | #endif | 153 | #endif |
154 | |||
155 | #ifndef _V_VECT_OPS | ||
156 | #define _V_VECT_OPS | ||
157 | |||
158 | static inline | ||
159 | void vect_add(ogg_int32_t *x, ogg_int32_t *y, int n) | ||
160 | { | ||
161 | while (n>0) { | ||
162 | *x++ += *y++; | ||
163 | n--; | ||
164 | } | ||
165 | } | ||
166 | |||
167 | static inline | ||
168 | void vect_copy(ogg_int32_t *x, ogg_int32_t *y, int n) | ||
169 | { | ||
170 | while (n>0) { | ||
171 | *x++ = *y++; | ||
172 | n--; | ||
173 | } | ||
174 | } | ||
175 | |||
176 | static inline | ||
177 | void vect_mult_fw(ogg_int32_t *data, LOOKUP_T *window, int n) | ||
178 | { | ||
179 | while(n>0) { | ||
180 | *data = MULT31(*data, *window); | ||
181 | data++; | ||
182 | window++; | ||
183 | n--; | ||
184 | } | ||
185 | } | ||
186 | |||
187 | static inline | ||
188 | void vect_mult_bw(ogg_int32_t *data, LOOKUP_T *window, int n) | ||
189 | { | ||
190 | while(n>0) { | ||
191 | *data = MULT31(*data, *window); | ||
192 | data++; | ||
193 | window--; | ||
194 | n--; | ||
195 | } | ||
196 | } | ||
197 | #endif | ||
198 | |||
154 | #endif | 199 | #endif |
155 | 200 | ||
156 | #ifndef _V_CLIP_MATH | 201 | #ifndef _V_CLIP_MATH |