summaryrefslogtreecommitdiff
path: root/apps/codecs/libcook/cook_fixpoint.h
diff options
context:
space:
mode:
Diffstat (limited to 'apps/codecs/libcook/cook_fixpoint.h')
-rw-r--r--apps/codecs/libcook/cook_fixpoint.h36
1 files changed, 3 insertions, 33 deletions
diff --git a/apps/codecs/libcook/cook_fixpoint.h b/apps/codecs/libcook/cook_fixpoint.h
index 8848d89af7..33646125dd 100644
--- a/apps/codecs/libcook/cook_fixpoint.h
+++ b/apps/codecs/libcook/cook_fixpoint.h
@@ -21,7 +21,7 @@
21 */ 21 */
22 22
23/** 23/**
24 * @file cook_float.h 24 * @file cook_fixpoint.h
25 * 25 *
26 * Cook AKA RealAudio G2 fixed point functions. 26 * Cook AKA RealAudio G2 fixed point functions.
27 * 27 *
@@ -183,7 +183,6 @@ static void scalar_dequant_math(COOKContext *q, int index,
183 } 183 }
184} 184}
185 185
186#ifdef TEST
187/** 186/**
188 * The modulated lapped transform, this takes transform coefficients 187 * The modulated lapped transform, this takes transform coefficients
189 * and transforms them into timedomain samples. 188 * and transforms them into timedomain samples.
@@ -194,36 +193,8 @@ static void scalar_dequant_math(COOKContext *q, int index,
194 * @param outbuffer pointer to the timedomain buffer 193 * @param outbuffer pointer to the timedomain buffer
195 * @param mlt_tmp pointer to temporary storage space 194 * @param mlt_tmp pointer to temporary storage space
196 */ 195 */
197#include "cook_fixp_mdct.h" 196#include "../lib/mdct_lookup.h"
198 197#include "../lib/mdct2.h"
199static inline void imlt_math(COOKContext *q, FIXP *in)
200{
201 const int n = q->samples_per_channel;
202 const int step = 4 << (10 - av_log2(n));
203 int i = 0, j = step>>1;
204
205 cook_mdct_backward(2 * n, in, q->mono_mdct_output);
206
207 do {
208 FIXP tmp = q->mono_mdct_output[i];
209
210 q->mono_mdct_output[i] =
211 fixp_mult_su(-q->mono_mdct_output[n + i], sincos_lookup[j]);
212 q->mono_mdct_output[n + i] = fixp_mult_su(tmp, sincos_lookup[j+1]);
213 j += step;
214 } while (++i < n/2);
215 do {
216 FIXP tmp = q->mono_mdct_output[i];
217
218 j -= step;
219 q->mono_mdct_output[i] =
220 fixp_mult_su(-q->mono_mdct_output[n + i], sincos_lookup[j+1]);
221 q->mono_mdct_output[n + i] = fixp_mult_su(tmp, sincos_lookup[j]);
222 } while (++i < n);
223}
224#else
225#include <codecs/lib/codeclib.h>
226#include <codecs/lib/mdct_lookup.h>
227 198
228static inline void imlt_math(COOKContext *q, FIXP *in) 199static inline void imlt_math(COOKContext *q, FIXP *in)
229{ 200{
@@ -254,7 +225,6 @@ static inline void imlt_math(COOKContext *q, FIXP *in)
254 q->mono_mdct_output[n + i] = fixmul31(tmp, (sincos_lookup0[j]) ); 225 q->mono_mdct_output[n + i] = fixmul31(tmp, (sincos_lookup0[j]) );
255 } while (++i < n); 226 } while (++i < n);
256} 227}
257#endif
258 228
259/** 229/**
260 * Perform buffer overlapping. 230 * Perform buffer overlapping.