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

superdump subversion at mplayerhq.hu
Mon Jul 14 00:35:21 CEST 2008


Author: superdump
Date: Mon Jul 14 00:35:21 2008
New Revision: 2779

Log:
Move update_state() so that the samples_in history is in the correct form for
the calculations conducted in synthesis()


Modified:
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	(original)
+++ amr/amrnbfloatdec.c	Mon Jul 14 00:35:21 2008
@@ -1290,6 +1290,9 @@ static int amrnb_decode_frame(AVCodecCon
 
 /*** end of synthesis ***/
 
+        // update buffers and history
+        update_state(p);
+
         // convert float samples to 16-bit integer
         for(i=0; i<AMR_SUBFRAME_SIZE; i++) {
             p->samples_in[i] = p->samples_in[i] * p->mul_bias + p->add_bias;
@@ -1297,9 +1300,6 @@ static int amrnb_decode_frame(AVCodecCon
         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));
 
-        // update buffers and history
-        update_state(p);
-
     }
 
     /* Report how many samples we got */



More information about the FFmpeg-soc mailing list