From bc154882e11f4a218cc8cfb10ae0b4cbc83b5f9f Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Mon, 21 Mar 2011 17:52:34 +0000 Subject: Fixed-point MDCT with 32-bit unscaled output Signed-off-by: Mans Rullgard --- libavcodec/mdct_fixed.c | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'libavcodec/mdct_fixed.c') diff --git a/libavcodec/mdct_fixed.c b/libavcodec/mdct_fixed.c index 19c8039..94527f9 100644 --- a/libavcodec/mdct_fixed.c +++ b/libavcodec/mdct_fixed.c @@ -18,3 +18,47 @@ #define CONFIG_FFT_FLOAT 0 #include "mdct.c" + +/* same as ff_mdct_calcw_c with double-width unscaled output */ +void ff_mdct_calcw_c(FFTContext *s, FFTDouble *out, const FFTSample *input) +{ + int i, j, n, n8, n4, n2, n3; + FFTDouble re, im; + const uint16_t *revtab = s->revtab; + const FFTSample *tcos = s->tcos; + const FFTSample *tsin = s->tsin; + FFTComplex *x = s->tmp_buf; + FFTDComplex *o = (FFTDComplex *)out; + + n = 1 << s->mdct_bits; + n2 = n >> 1; + n4 = n >> 2; + n8 = n >> 3; + n3 = 3 * n4; + + /* pre rotation */ + for(i=0;ifft_calc(s, x); + + /* post rotation */ + for(i=0;i