aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/aacenc.c
diff options
context:
space:
mode:
authorNathan Caldwell <saintdev@gmail.com>2012-01-06 14:24:37 -0700
committerAlex Converse <alex.converse@gmail.com>2012-01-23 11:40:46 -0800
commit80d44277e6ae6291a1ddba476939bb394a2ed822 (patch)
treebcc4b85abcf2bf33f2abfe5f3588afb1334db234 /libavcodec/aacenc.c
parent025ccf1f8bd669f45b628acf51e7febcb1fddd3b (diff)
downloadffmpeg-80d44277e6ae6291a1ddba476939bb394a2ed822.tar.gz
aacenc: Move Q^3/4 calculation to it's own table
This should be moved to tablegen at some point. Signed-off-by: Alex Converse <alex.converse@gmail.com>
Diffstat (limited to 'libavcodec/aacenc.c')
-rw-r--r--libavcodec/aacenc.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
index 3bd04bffe1..8356ca8db3 100644
--- a/libavcodec/aacenc.c
+++ b/libavcodec/aacenc.c
@@ -52,6 +52,8 @@
return AVERROR(EINVAL); \
}
+float ff_aac_pow34sf_tab[428];
+
static const uint8_t swb_size_1024_96[] = {
4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 4, 8, 8, 8, 8, 8,
12, 12, 12, 12, 12, 16, 16, 24, 28, 36, 44,
@@ -691,6 +693,9 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
ff_aac_tableinit();
+ for (i = 0; i < 428; i++)
+ ff_aac_pow34sf_tab[i] = sqrt(ff_aac_pow2sf_tab[i] * sqrt(ff_aac_pow2sf_tab[i]));
+
return 0;
fail:
aac_encode_end(avctx);