diff options
author | Justin Ruggles <justin.ruggles@gmail.com> | 2012-10-14 00:12:55 -0400 |
---|---|---|
committer | Justin Ruggles <justin.ruggles@gmail.com> | 2012-11-25 19:06:36 -0500 |
commit | 3d3cf6745e2a5dc9c377244454c3186d75b177fa (patch) | |
tree | a33f4cb631565ca8d94d9a81fd6240cf9eeaef2b /libavcodec/aacsbr.c | |
parent | 8e134e5104e99a69cd4cea10540a7ce9c3682a2c (diff) | |
download | ffmpeg-3d3cf6745e2a5dc9c377244454c3186d75b177fa.tar.gz |
aacdec: use float planar sample format for output
Diffstat (limited to 'libavcodec/aacsbr.c')
-rw-r--r-- | libavcodec/aacsbr.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index b1c4e73ffc..df5d9279bf 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -140,7 +140,6 @@ static void sbr_turnoff(SpectralBandReplication *sbr) { av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr) { - float mdct_scale; sbr->kx[0] = sbr->kx[1]; sbr_turnoff(sbr); sbr->data[0].synthesis_filterbank_samples_offset = SBR_SYNTHESIS_BUF_SIZE - (1280 - 128); @@ -148,9 +147,8 @@ av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr) /* SBR requires samples to be scaled to +/-32768.0 to work correctly. * mdct scale factors are adjusted to scale up from +/-1.0 at analysis * and scale back down at synthesis. */ - mdct_scale = ac->avctx->sample_fmt == AV_SAMPLE_FMT_FLT ? 32768.0f : 1.0f; - ff_mdct_init(&sbr->mdct, 7, 1, 1.0 / (64 * mdct_scale)); - ff_mdct_init(&sbr->mdct_ana, 7, 1, -2.0 * mdct_scale); + ff_mdct_init(&sbr->mdct, 7, 1, 1.0 / (64 * 32768.0)); + ff_mdct_init(&sbr->mdct_ana, 7, 1, -2.0 * 32768.0); ff_ps_ctx_init(&sbr->ps); ff_sbrdsp_init(&sbr->dsp); } |