diff options
author | Mans Rullgard <mans@mansr.com> | 2011-03-21 17:52:34 +0000 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-04-02 21:06:07 +0100 |
commit | bc154882e11f4a218cc8cfb10ae0b4cbc83b5f9f (patch) | |
tree | 906260b2356f1c6bad4740ed21d8330806e195fb /libavcodec/fft-internal.h | |
parent | ed5fcd60b2d1d4993e2094c9836dedb8ef9b2ed3 (diff) | |
download | ffmpeg-bc154882e11f4a218cc8cfb10ae0b4cbc83b5f9f.tar.gz |
Fixed-point MDCT with 32-bit unscaled output
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/fft-internal.h')
-rw-r--r-- | libavcodec/fft-internal.h | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/libavcodec/fft-internal.h b/libavcodec/fft-internal.h index 1f240dbd18..d30571b733 100644 --- a/libavcodec/fft-internal.h +++ b/libavcodec/fft-internal.h @@ -39,6 +39,8 @@ #include "libavutil/intmath.h" #include "mathops.h" +void ff_mdct_calcw_c(FFTContext *s, FFTDouble *output, const FFTSample *input); + #define SCALE_FLOAT(a, bits) lrint((a) * (double)(1 << (bits))) #define FIX15(a) av_clip(SCALE_FLOAT(a, 15), -32767, 32767) @@ -49,11 +51,17 @@ y = (a + b) >> 1; \ } while (0) -#define CMUL(dre, dim, are, aim, bre, bim) do { \ - (dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> 15; \ - (dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> 15; \ +#define CMULS(dre, dim, are, aim, bre, bim, sh) do { \ + (dre) = (MUL16(are, bre) - MUL16(aim, bim)) >> sh; \ + (dim) = (MUL16(are, bim) + MUL16(aim, bre)) >> sh; \ } while (0) +#define CMUL(dre, dim, are, aim, bre, bim) \ + CMULS(dre, dim, are, aim, bre, bim, 15) + +#define CMULL(dre, dim, are, aim, bre, bim) \ + CMULS(dre, dim, are, aim, bre, bim, 0) + #endif /* CONFIG_FFT_FLOAT */ #define ff_imdct_calc_c FFT_NAME(ff_imdct_calc_c) |