diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-11-26 15:15:02 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-11-26 15:15:02 +0100 |
commit | 59b68ee8870ad7b831321ff39638660ac59e4a18 (patch) | |
tree | e7d148ab5589e5869ed46914773ba5f140915ba1 /libavcodec/aacsbr.c | |
parent | a13148f63351db5f8283a23de9a22e940d29d8cd (diff) | |
parent | 3d3cf6745e2a5dc9c377244454c3186d75b177fa (diff) | |
download | ffmpeg-59b68ee8870ad7b831321ff39638660ac59e4a18.tar.gz |
Merge commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa'
* commit '3d3cf6745e2a5dc9c377244454c3186d75b177fa':
aacdec: use float planar sample format for output
Conflicts:
libavcodec/aacdec.c
libavcodec/aacsbr.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
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 8c67a75c89..5bae921e18 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -142,7 +142,6 @@ static void sbr_turnoff(SpectralBandReplication *sbr) { av_cold void ff_aac_sbr_ctx_init(AACContext *ac, SpectralBandReplication *sbr) { - float mdct_scale; if(sbr->mdct.mdct_bits) return; sbr->kx[0] = sbr->kx[1]; @@ -152,9 +151,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); } |