[FFmpeg-soc] [soc]: r4943 - amr/amrnbdec.c
cmcq
subversion at mplayerhq.hu
Wed Aug 5 14:24:18 CEST 2009
Author: cmcq
Date: Wed Aug 5 14:24:18 2009
New Revision: 4943
Log:
Prevent feedback during silent periods by applying the ref decoder's precision
Modified:
amr/amrnbdec.c
Modified: amr/amrnbdec.c
==============================================================================
--- amr/amrnbdec.c Wed Aug 5 14:03:39 2009 (r4942)
+++ amr/amrnbdec.c Wed Aug 5 14:24:18 2009 (r4943)
@@ -1131,6 +1131,14 @@ static int amrnb_decode_frame(AVCodecCon
p->pitch_gain[4], p->fixed_gain[4],
AMR_SUBFRAME_SIZE);
+ // In the ref decoder, excitation is stored with no fractional bits.
+ // This step prevents buzz in silent periods. The ref encoder can
+ // emit long sequences with pitch factor greater than one. This
+ // creates unwanted feedback if the excitation vector is nonzero.
+ // (e.g. test sequence T19_795.COD in 3GPP TS 26.074)
+ for (i = 0; i < AMR_SUBFRAME_SIZE; i++)
+ exc_feedback[i] = truncf(exc_feedback[i]);
+
// Smooth fixed gain.
// The specification is ambiguous, but in the reference source, the
// smoothed value is NOT fed back into later fixed gain smoothing.
More information about the FFmpeg-soc
mailing list