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

cmcq subversion at mplayerhq.hu
Tue Jul 21 17:01:36 CEST 2009


Author: cmcq
Date: Tue Jul 21 17:01:36 2009
New Revision: 4739

Log:
lsp_avg should not incorporate the current frame's LSPs for fixed_gain_smooth
This change makes the smoothing factor larger. The spec is wrong; the ref
source effectively uses qbar(n-1) rather than qbar(n) in section 6.1.4, eqn 71.

Modified:
   amr/amrnbfloatdec.c

Modified: amr/amrnbfloatdec.c
==============================================================================
--- amr/amrnbfloatdec.c	Tue Jul 21 14:22:19 2009	(r4738)
+++ amr/amrnbfloatdec.c	Tue Jul 21 17:01:36 2009	(r4739)
@@ -1083,10 +1083,6 @@ int amrnb_decode_frame(AVCodecContext *a
     for (i = 0; i < 4; i++)
         lsp2lpc(p->lsp[i], p->lpc[i]);
 
-    // update averaged lsp vector (used for fixed gain smoothing)
-    ff_weighted_vector_sumf(p->lsp_avg, p->lsp_avg, p->prev_lsp_sub4,
-                            0.84, 0.16, LP_FILTER_ORDER);
-
 /*** end of LPC coefficient decoding ***/
 
     for (subframe = 0; subframe < 4; subframe++) {
@@ -1138,6 +1134,10 @@ int amrnb_decode_frame(AVCodecContext *a
         update_state(p);
     }
 
+    // update averaged lsp vector (used for fixed gain smoothing)
+    ff_weighted_vector_sumf(p->lsp_avg, p->lsp_avg, p->prev_lsp_sub4,
+                            0.84, 0.16, LP_FILTER_ORDER);
+
     /* report how many samples we got */
     *data_size = AMR_BLOCK_SIZE * sizeof(float);
 


More information about the FFmpeg-soc mailing list