diff options
author | Djordje Pesut <djordje.pesut@imgtec.com> | 2015-06-30 11:53:05 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2015-07-09 14:41:31 +0200 |
commit | b04f46cb4bc07e41345f360e184ea4b3eab6e43f (patch) | |
tree | f39eb060d72fe39219b2dcbc7d7a51b7a35c7570 /libavcodec/mdct_template.c | |
parent | 08be74ac8154e4a8936b7023cc3a7f5396fb182c (diff) | |
download | ffmpeg-b04f46cb4bc07e41345f360e184ea4b3eab6e43f.tar.gz |
libavcodec: Implementation of AAC_fixed_decoder (LC-module) [3/4]
Add fixed point implementation
Signed-off-by: Nedeljko Babic <nedeljko.babic@imgtec.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/mdct_template.c')
-rw-r--r-- | libavcodec/mdct_template.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/mdct_template.c b/libavcodec/mdct_template.c index 7fa8bcce56..e7e5f622f1 100644 --- a/libavcodec/mdct_template.c +++ b/libavcodec/mdct_template.c @@ -81,8 +81,13 @@ av_cold int ff_mdct_init(FFTContext *s, int nbits, int inverse, double scale) scale = sqrt(fabs(scale)); for(i=0;i<n4;i++) { alpha = 2 * M_PI * (i + theta) / n; +#if FFT_FIXED_32 + s->tcos[i*tstep] = (FFTSample)floor(-cos(alpha) * 2147483648.0 + 0.5); + s->tsin[i*tstep] = (FFTSample)floor(-sin(alpha) * 2147483648.0 + 0.5); +#else s->tcos[i*tstep] = FIX15(-cos(alpha) * scale); s->tsin[i*tstep] = FIX15(-sin(alpha) * scale); +#endif } return 0; fail: |