summaryrefslogtreecommitdiff
path: root/libavcodec/mdct_template.c
diff options
context:
space:
mode:
authorDjordje Pesut <djordje.pesut@imgtec.com>2015-06-30 11:53:05 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-07-09 14:41:31 +0200
commitb04f46cb4bc07e41345f360e184ea4b3eab6e43f (patch)
treef39eb060d72fe39219b2dcbc7d7a51b7a35c7570 /libavcodec/mdct_template.c
parent08be74ac8154e4a8936b7023cc3a7f5396fb182c (diff)
downloadffmpeg-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.c5
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: