[FFmpeg-devel] [PATCH] QCELP no decode_gain_and_index for SILENCE frame

Kenan Gillet kenan.gillet
Sat Apr 25 00:09:37 CEST 2009


Hi,

According to TIA/EIA/IS-733 2.4.8.7.2,the scaled codebook vector
cd(n) is set equal to zero for the entire SILENCE frame.

So decode_gain_and_index should do nothing.
Right now it does fail on the assert(q->bitrate == I_F_Q);

here is a patch to fix it.

Kenan
-------------- next part --------------
Index: libavcodec/qcelpdec.c
===================================================================
--- libavcodec/qcelpdec.c	(revision 18599)
+++ libavcodec/qcelpdec.c	(working copy)
@@ -249,7 +249,7 @@
             gain[2] =     gain[1];
             gain[1] = 0.6*gain[0] + 0.4*gain[1];
         }
-    }else
+    }else if (q->bitrate != SILENCE)
     {
         if(q->bitrate == RATE_OCTAVE)
         {



More information about the ffmpeg-devel mailing list