From 46751a65e384248631aa000f8d5e04e695db612a Mon Sep 17 00:00:00 2001 From: Alex Converse Date: Tue, 9 Mar 2010 20:16:14 +0000 Subject: [PATCH] aacsbr: Initialize e_a[1] to -1. This triggers lAPrev (e_a[0]) on the first SBR frame to be -1. The spec is somewhat ambiguous to what this value should be but this increases the accuracy of al_sbr_e_44_1 and similar streams from 14 bits to 15 bits. Originally committed as revision 22408 to svn://svn.ffmpeg.org/ffmpeg/trunk --- libavcodec/aacsbr.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libavcodec/aacsbr.c b/libavcodec/aacsbr.c index a1e57ee31c..ac86a8d750 100644 --- a/libavcodec/aacsbr.c +++ b/libavcodec/aacsbr.c @@ -138,6 +138,7 @@ av_cold void ff_aac_sbr_init(void) av_cold void ff_aac_sbr_ctx_init(SpectralBandReplication *sbr) { sbr->kx[0] = sbr->kx[1] = 32; //Typo in spec, kx' inits to 32 + sbr->data[0].e_a[1] = sbr->data[1].e_a[1] = -1; sbr->data[0].synthesis_filterbank_samples_offset = SBR_SYNTHESIS_BUF_SIZE - (1280 - 128); sbr->data[1].synthesis_filterbank_samples_offset = SBR_SYNTHESIS_BUF_SIZE - (1280 - 128); ff_mdct_init(&sbr->mdct, 7, 1, 1.0/64);