[FFmpeg-soc] [soc]: r2771 - amr/amrnbfloatdec.c

superdump subversion at mplayerhq.hu
Sat Jul 12 22:30:18 CEST 2008


Author: superdump
Date: Sat Jul 12 22:30:18 2008
New Revision: 2771

Log:
Multiply samples by mul_bias before converting to 16-bit int to bring them to
the correct range


Modified:
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	(original)
+++ amr/amrnbfloatdec.c	Sat Jul 12 22:30:18 2008
@@ -1297,7 +1297,7 @@ static int amrnb_decode_frame(AVCodecCon
 
         // convert float samples to 16-bit integer
         for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
-            p->samples_in[i] += p->add_bias;
+            p->samples_in[i] = p->samples_in[i] * p->mul_bias + p->add_bias;
         }
         p->dsp.float_to_int16(p->samples_out, p->samples_in, AMR_SUBFRAME_SIZE);
         memcpy(&buf_out[subframe*AMR_SUBFRAME_SIZE], p->samples_out, AMR_SUBFRAME_SIZE*sizeof(int16_t));



More information about the FFmpeg-soc mailing list