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

superdump subversion at mplayerhq.hu
Mon Jul 14 00:46:25 CEST 2008


Author: superdump
Date: Mon Jul 14 00:46:25 2008
New Revision: 2781

Log:
Use the correct set of samples from samples_in[]


Modified:
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	(original)
+++ amr/amrnbfloatdec.c	Mon Jul 14 00:46:25 2008
@@ -1294,10 +1294,10 @@ static int amrnb_decode_frame(AVCodecCon
         update_state(p);
 
         // convert float samples to 16-bit integer
-        for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
+        for(i=LP_FILTER_ORDER; i<LP_FILTER_ORDER+AMR_SUBFRAME_SIZE; i++) {
             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);
+        p->dsp.float_to_int16(p->samples_out, &p->samples_in[LP_FILTER_ORDER], 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