[xiph-commits] r11555 - trunk/speex/libspeex

jm at svn.xiph.org jm at svn.xiph.org
Sat Jun 10 06:20:24 PDT 2006


Author: jm
Date: 2006-06-10 06:20:16 -0700 (Sat, 10 Jun 2006)
New Revision: 11555

Modified:
   trunk/speex/libspeex/arch.h
   trunk/speex/libspeex/gain_table.c
   trunk/speex/libspeex/gain_table_lbr.c
   trunk/speex/libspeex/ltp.c
   trunk/speex/libspeex/ltp.h
   trunk/speex/libspeex/modes.h
   trunk/speex/libspeex/nb_celp.c
   trunk/speex/libspeex/nb_celp.h
Log:
Better control of the pitch gain to prevent potential instabilities from
encoder/decoder mismatch


Modified: trunk/speex/libspeex/arch.h
===================================================================
--- trunk/speex/libspeex/arch.h	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/arch.h	2006-06-10 13:20:16 UTC (rev 11555)
@@ -41,6 +41,7 @@
 #define ABS16(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 16-bit value.  */
 #define MAX16(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 16-bit value.   */
 #define ABS32(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 32-bit value.  */
+#define MAX32(a,b) ((a) > (b) ? (a) : (b))   /**< Maximum 32-bit value.   */
 
 #ifdef FIXED_POINT
 

Modified: trunk/speex/libspeex/gain_table.c
===================================================================
--- trunk/speex/libspeex/gain_table.c	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/gain_table.c	2006-06-10 13:20:16 UTC (rev 11555)
@@ -29,132 +29,132 @@
    POSSIBILITY OF SUCH DAMAGE.
 */
 
-const signed char gain_cdbk_nb[384] = {
--32,-32,-32,
--28,-67,-5,
--42,-6,-32,
--57,-10,-54,
--16,27,-41,
-19,-19,-40,
--45,24,-21,
--8,-14,-18,
-1,14,-58,
--18,-88,-39,
--38,21,-18,
--19,20,-43,
-10,17,-48,
--52,-58,-13,
--44,-1,-11,
--12,-11,-34,
-14,0,-46,
--37,-35,-34,
--25,44,-30,
-6,-4,-63,
--31,43,-41,
--23,30,-43,
--43,26,-14,
--33,1,-13,
--13,18,-37,
--46,-73,-45,
--36,24,-25,
--36,-11,-20,
--25,12,-18,
--36,-69,-59,
--45,6,8,
--22,-14,-24,
--1,13,-44,
--39,-48,-26,
--32,31,-37,
--33,15,-46,
--24,30,-36,
--41,31,-23,
--50,22,-4,
--22,2,-21,
--17,30,-34,
--7,-60,-28,
--38,42,-28,
--44,-11,21,
--16,8,-44,
--39,-55,-43,
--11,-35,26,
--9,0,-34,
--8,121,-81,
-7,-16,-22,
--37,33,-31,
--27,-7,-36,
--34,70,-57,
--37,-11,-48,
--40,17,-1,
--33,6,-6,
--9,0,-20,
--21,69,-33,
--29,33,-31,
--55,12,-1,
--33,27,-22,
--50,-33,-47,
--50,54,51,
--1,-5,-44,
--4,22,-40,
--39,-66,-25,
--33,1,-26,
--24,-23,-25,
--11,21,-45,
--25,-45,-19,
--43,105,-16,
-5,-21,1,
--16,11,-33,
--13,-99,-4,
--37,33,-15,
--25,37,-63,
--36,24,-31,
--53,-56,-38,
--41,-4,4,
--33,13,-30,
-49,52,-94,
--5,-30,-15,
-1,38,-40,
--23,12,-36,
--17,40,-47,
--37,-41,-39,
--49,34,0,
--18,-7,-4,
--16,17,-27,
-30,5,-62,
-4,48,-68,
--43,11,-11,
--18,19,-15,
--23,-62,-39,
--42,10,-2,
--21,-13,-13,
--9,13,-47,
--23,-62,-24,
--44,60,-21,
--18,-3,-52,
--22,22,-36,
--75,57,16,
--19,3,10,
--29,23,-38,
--5,-62,-51,
--51,40,-18,
--42,13,-24,
--34,14,-20,
--56,-75,-26,
--26,32,15,
--26,17,-29,
--7,28,-52,
--12,-30,5,
--5,-48,-5,
-2,2,-43,
-21,16,16,
--25,-45,-32,
--43,18,-10,
-9,0,-1,
--1,7,-30,
-19,-48,-4,
--28,25,-29,
--22,0,-31,
--32,17,-10,
--64,-41,-62,
--52,15,16,
--30,-22,-32,
--7,9,-38};
+const signed char gain_cdbk_nb[512] = {
+-32, -32, -32, 0,
+-28, -67, -5, 33,
+-42, -6, -32, 18,
+-57, -10, -54, 35,
+-16, 27, -41, 42,
+19, -19, -40, 36,
+-45, 24, -21, 40,
+-8, -14, -18, 28,
+1, 14, -58, 53,
+-18, -88, -39, 39,
+-38, 21, -18, 37,
+-19, 20, -43, 38,
+10, 17, -48, 54,
+-52, -58, -13, 33,
+-44, -1, -11, 32,
+-12, -11, -34, 22,
+14, 0, -46, 46,
+-37, -35, -34, 5,
+-25, 44, -30, 43,
+6, -4, -63, 49,
+-31, 43, -41, 43,
+-23, 30, -43, 41,
+-43, 26, -14, 44,
+-33, 1, -13, 27,
+-13, 18, -37, 37,
+-46, -73, -45, 34,
+-36, 24, -25, 34,
+-36, -11, -20, 19,
+-25, 12, -18, 33,
+-36, -69, -59, 34,
+-45, 6, 8, 46,
+-22, -14, -24, 18,
+-1, 13, -44, 44,
+-39, -48, -26, 15,
+-32, 31, -37, 34,
+-33, 15, -46, 31,
+-24, 30, -36, 37,
+-41, 31, -23, 41,
+-50, 22, -4, 50,
+-22, 2, -21, 28,
+-17, 30, -34, 40,
+-7, -60, -28, 29,
+-38, 42, -28, 42,
+-44, -11, 21, 43,
+-16, 8, -44, 34,
+-39, -55, -43, 21,
+-11, -35, 26, 41,
+-9, 0, -34, 29,
+-8, 121, -81, 113,
+7, -16, -22, 33,
+-37, 33, -31, 36,
+-27, -7, -36, 17,
+-34, 70, -57, 65,
+-37, -11, -48, 21,
+-40, 17, -1, 44,
+-33, 6, -6, 33,
+-9, 0, -20, 34,
+-21, 69, -33, 57,
+-29, 33, -31, 35,
+-55, 12, -1, 49,
+-33, 27, -22, 35,
+-50, -33, -47, 17,
+-50, 54, 51, 94,
+-1, -5, -44, 35,
+-4, 22, -40, 45,
+-39, -66, -25, 24,
+-33, 1, -26, 20,
+-24, -23, -25, 12,
+-11, 21, -45, 44,
+-25, -45, -19, 17,
+-43, 105, -16, 82,
+5, -21, 1, 41,
+-16, 11, -33, 30,
+-13, -99, -4, 57,
+-37, 33, -15, 44,
+-25, 37, -63, 54,
+-36, 24, -31, 31,
+-53, -56, -38, 26,
+-41, -4, 4, 37,
+-33, 13, -30, 24,
+49, 52, -94, 114,
+-5, -30, -15, 23,
+1, 38, -40, 56,
+-23, 12, -36, 29,
+-17, 40, -47, 51,
+-37, -41, -39, 11,
+-49, 34, 0, 58,
+-18, -7, -4, 34,
+-16, 17, -27, 35,
+30, 5, -62, 65,
+4, 48, -68, 76,
+-43, 11, -11, 38,
+-18, 19, -15, 41,
+-23, -62, -39, 23,
+-42, 10, -2, 41,
+-21, -13, -13, 25,
+-9, 13, -47, 42,
+-23, -62, -24, 24,
+-44, 60, -21, 58,
+-18, -3, -52, 32,
+-22, 22, -36, 34,
+-75, 57, 16, 90,
+-19, 3, 10, 45,
+-29, 23, -38, 32,
+-5, -62, -51, 38,
+-51, 40, -18, 53,
+-42, 13, -24, 32,
+-34, 14, -20, 30,
+-56, -75, -26, 37,
+-26, 32, 15, 59,
+-26, 17, -29, 29,
+-7, 28, -52, 53,
+-12, -30, 5, 30,
+-5, -48, -5, 35,
+2, 2, -43, 40,
+21, 16, 16, 75,
+-25, -45, -32, 10,
+-43, 18, -10, 42,
+9, 0, -1, 52,
+-1, 7, -30, 36,
+19, -48, -4, 48,
+-28, 25, -29, 32,
+-22, 0, -31, 22,
+-32, 17, -10, 36,
+-64, -41, -62, 36,
+-52, 15, 16, 58,
+-30, -22, -32, 6,
+-7, 9, -38, 36};

Modified: trunk/speex/libspeex/gain_table_lbr.c
===================================================================
--- trunk/speex/libspeex/gain_table_lbr.c	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/gain_table_lbr.c	2006-06-10 13:20:16 UTC (rev 11555)
@@ -29,36 +29,36 @@
    POSSIBILITY OF SUCH DAMAGE.
 */
 
-const signed char gain_cdbk_lbr[96] = {
--32,-32,-32,
--31,-58,-16,
--41,-24,-43,
--56,-22,-55,
--13,33,-41,
--4,-39,-9,
--41,15,-12,
--8,-15,-12,
-1,2,-44,
--22,-66,-42,
--38,28,-23,
--21,14,-37,
-0,21,-50,
--53,-71,-27,
--37,-1,-19,
--19,-5,-28,
-6,65,-44,
--33,-48,-33,
--40,57,-14,
--17,4,-45,
--31,38,-33,
--23,28,-40,
--43,29,-12,
--34,13,-23,
--16,15,-27,
--14,-82,-15,
--31,25,-32,
--21,5,-5,
--47,-63,-51,
--46,12,3,
--28,-17,-29,
--10,14,-40};
+const signed char gain_cdbk_lbr[128] = {
+-32, -32, -32, 0,
+-31, -58, -16, 22,
+-41, -24, -43, 14,
+-56, -22, -55, 29,
+-13, 33, -41, 47,
+-4, -39, -9, 29,
+-41, 15, -12, 38,
+-8, -15, -12, 31,
+1, 2, -44, 40,
+-22, -66, -42, 27,
+-38, 28, -23, 38,
+-21, 14, -37, 31,
+0, 21, -50, 52,
+-53, -71, -27, 33,
+-37, -1, -19, 25,
+-19, -5, -28, 22,
+6, 65, -44, 74,
+-33, -48, -33, 9,
+-40, 57, -14, 58,
+-17, 4, -45, 32,
+-31, 38, -33, 36,
+-23, 28, -40, 39,
+-43, 29, -12, 46,
+-34, 13, -23, 28,
+-16, 15, -27, 34,
+-14, -82, -15, 43,
+-31, 25, -32, 29,
+-21, 5, -5, 38,
+-47, -63, -51, 33,
+-46, 12, 3, 47,
+-28, -17, -29, 11,
+-10, 14, -40, 38};

Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/ltp.c	2006-06-10 13:20:16 UTC (rev 11555)
@@ -292,7 +292,8 @@
 const spx_coef_t awk1[],        /* Weighted LPCs #1 for this subframe */
 const spx_coef_t awk2[],        /* Weighted LPCs #2 for this subframe */
 spx_sig_t exc[],                /* Excitation */
-const void *par,
+const signed char *gain_cdbk,
+int gain_cdbk_size,
 int   pitch,                    /* Pitch value */
 int   p,                        /* Number of LPC coeffs */
 int   nsf,                      /* Number of samples in subframe */
@@ -302,8 +303,8 @@
 const spx_word16_t *r,
 spx_word16_t *new_target,
 int  *cdbk_index,
-int cdbk_offset,
-int plc_tuning
+int plc_tuning,
+spx_word32_t cumul_gain
 )
 {
    int i,j;
@@ -312,18 +313,16 @@
    spx_word16_t *x[3];
    spx_word32_t corr[3];
    spx_word32_t A[3][3];
-   int   gain_cdbk_size;
-   const signed char *gain_cdbk;
    spx_word16_t gain[3];
    spx_word32_t err;
+   spx_word16_t max_gain=128;
 
-   const ltp_params *params;
-   params = (const ltp_params*) par;
-   gain_cdbk_size = 1<<params->gain_bits;
-   gain_cdbk = params->gain_cdbk + 3*gain_cdbk_size*cdbk_offset;
    ALLOC(tmp1, 3*nsf, spx_word16_t);
    ALLOC(e, nsf, spx_word16_t);
 
+   if (cumul_gain > 262144)
+      max_gain = 31;
+   
    x[0]=tmp1;
    x[1]=tmp1+nsf;
    x[2]=tmp1+2*nsf;
@@ -368,7 +367,7 @@
       spx_word32_t C[9];
       const signed char *ptr=gain_cdbk;
       int best_cdbk=0;
-      spx_word32_t best_sum=0;
+      spx_word32_t best_sum=-VERY_LARGE32;
 #ifdef FIXED_POINT
       spx_word16_t C16[9];
 #else
@@ -412,39 +411,29 @@
          spx_word16_t pitch_control=64;
          spx_word16_t gain_sum;
          
-         ptr = gain_cdbk+3*i;
+         ptr = gain_cdbk+4*i;
          g[0]=ADD16((spx_word16_t)ptr[0],32);
          g[1]=ADD16((spx_word16_t)ptr[1],32);
          g[2]=ADD16((spx_word16_t)ptr[2],32);
-
-         /* We favor "safe" pitch values to handle packet loss better */
-         gain_sum = ADD16(ADD16(ABS16(g[1]),ABS16(g[0])),ABS16(g[2]));
-         gain_sum = SUB16(gain_sum, 60);
-         if (gain_sum < 0)
-            gain_sum = 0;
-#ifdef FIXED_POINT
-         pitch_control =  SUB16(64,EXTRACT16(PSHR32(gain_sum,3)));
-#else
-         pitch_control = 64*(1.-.002*gain_sum);
-#endif
+         gain_sum = (spx_word16_t)ptr[3];
          
          sum = compute_pitch_error(C16, g, pitch_control);
          
-         if (sum>best_sum || i==0)
+         if (sum>best_sum && gain_sum<=max_gain)
          {
             best_sum=sum;
             best_cdbk=i;
          }
       }
 #ifdef FIXED_POINT
-      gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*3]);
-      gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*3+1]);
-      gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*3+2]);
+      gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4]);
+      gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4+1]);
+      gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[best_cdbk*4+2]);
       /*printf ("%d %d %d %d\n",gain[0],gain[1],gain[2], best_cdbk);*/
 #else
-      gain[0] = 0.015625*gain_cdbk[best_cdbk*3]  + .5;
-      gain[1] = 0.015625*gain_cdbk[best_cdbk*3+1]+ .5;
-      gain[2] = 0.015625*gain_cdbk[best_cdbk*3+2]+ .5;
+      gain[0] = 0.015625*gain_cdbk[best_cdbk*4]  + .5;
+      gain[1] = 0.015625*gain_cdbk[best_cdbk*4+1]+ .5;
+      gain[2] = 0.015625*gain_cdbk[best_cdbk*4+2]+ .5;
 #endif
       *cdbk_index=best_cdbk;
    }
@@ -509,7 +498,8 @@
 spx_word16_t *r,
 int complexity,
 int cdbk_offset,
-int plc_tuning
+int plc_tuning,
+spx_word32_t *cumul_gain
 )
 {
    int i,j;
@@ -521,6 +511,13 @@
    spx_word32_t err, best_err=-1;
    int N;
    const ltp_params *params;
+   const signed char *gain_cdbk;
+   int   gain_cdbk_size;
+   
+   params = (const ltp_params*) par;
+   gain_cdbk_size = 1<<params->gain_bits;
+   gain_cdbk = params->gain_cdbk + 4*gain_cdbk_size*cdbk_offset;
+   
    VARDECL(int *nbest);
    
    N=complexity;
@@ -557,8 +554,8 @@
       pitch=nbest[i];
       for (j=0;j<nsf;j++)
          exc[j]=0;
-      err=pitch_gain_search_3tap(target, ak, awk1, awk2, exc, par, pitch, p, nsf,
-                                 bits, stack, exc2, r, new_target, &cdbk_index, cdbk_offset, plc_tuning);
+      err=pitch_gain_search_3tap(target, ak, awk1, awk2, exc, gain_cdbk, gain_cdbk_size, pitch, p, nsf,
+                                 bits, stack, exc2, r, new_target, &cdbk_index, plc_tuning, *cumul_gain);
       if (err<best_err || best_err<0)
       {
          for (j=0;j<nsf;j++)
@@ -573,6 +570,12 @@
    /*printf ("pitch: %d %d\n", best_pitch, best_gain_index);*/
    speex_bits_pack(bits, best_pitch-start, params->pitch_bits);
    speex_bits_pack(bits, best_gain_index, params->gain_bits);
+#ifdef FIXED_POINT
+   *cumul_gain = MULT16_32_Q13(SHL16(params->gain_cdbk[4*best_gain_index+3],8), MAX32(1024,*cumul_gain));
+#else
+   *cumul_gain = 0.03125*MAX32(1024,*cumul_gain)*params->gain_cdbk[4*best_gain_index+3];
+#endif
+   /*printf ("%f\n", cumul_gain);*/
    /*printf ("encode pitch: %d %d\n", best_pitch, best_gain_index);*/
    for (i=0;i<nsf;i++)
       exc[i]=best_exc[i];
@@ -610,20 +613,20 @@
 
    params = (const ltp_params*) par;
    gain_cdbk_size = 1<<params->gain_bits;
-   gain_cdbk = params->gain_cdbk + 3*gain_cdbk_size*cdbk_offset;
+   gain_cdbk = params->gain_cdbk + 4*gain_cdbk_size*cdbk_offset;
 
    pitch = speex_bits_unpack_unsigned(bits, params->pitch_bits);
    pitch += start;
    gain_index = speex_bits_unpack_unsigned(bits, params->gain_bits);
    /*printf ("decode pitch: %d %d\n", pitch, gain_index);*/
 #ifdef FIXED_POINT
-   gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*3]);
-   gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*3+1]);
-   gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*3+2]);
+   gain[0] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4]);
+   gain[1] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4+1]);
+   gain[2] = ADD16(32,(spx_word16_t)gain_cdbk[gain_index*4+2]);
 #else
-   gain[0] = 0.015625*gain_cdbk[gain_index*3]+.5;
-   gain[1] = 0.015625*gain_cdbk[gain_index*3+1]+.5;
-   gain[2] = 0.015625*gain_cdbk[gain_index*3+2]+.5;
+   gain[0] = 0.015625*gain_cdbk[gain_index*4]+.5;
+   gain[1] = 0.015625*gain_cdbk[gain_index*4+1]+.5;
+   gain[2] = 0.015625*gain_cdbk[gain_index*4+2]+.5;
 #endif
 
    if (count_lost && pitch > subframe_offset)
@@ -702,7 +705,8 @@
 spx_word16_t *r,
 int complexity,
 int cdbk_offset,
-int plc_tuning
+int plc_tuning,
+spx_word32_t *cumul_gain
 )
 {
    int i;

Modified: trunk/speex/libspeex/ltp.h
===================================================================
--- trunk/speex/libspeex/ltp.h	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/ltp.h	2006-06-10 13:20:16 UTC (rev 11555)
@@ -74,7 +74,8 @@
 spx_word16_t *r,
 int   complexity,
 int   cdbk_offset,
-int plc_tuning
+int plc_tuning,
+spx_word32_t *cumul_gain
 );
 
 /*Unquantize adaptive codebook and update pitch contribution*/
@@ -116,7 +117,8 @@
 spx_word16_t *r,
 int complexity,
 int cdbk_offset,
-int plc_tuning
+int plc_tuning,
+spx_word32_t *cumul_gain
 );
 
 /** Unquantize forced pitch delay and gain */

Modified: trunk/speex/libspeex/modes.h
===================================================================
--- trunk/speex/libspeex/modes.h	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/modes.h	2006-06-10 13:20:16 UTC (rev 11555)
@@ -57,7 +57,7 @@
 /** Long-term predictor quantization */
 typedef int (*ltp_quant_func)(spx_word16_t *, spx_word16_t *, spx_coef_t *, spx_coef_t *, 
                               spx_coef_t *, spx_sig_t *, const void *, int, int, spx_word16_t, 
-                              int, int, SpeexBits*, char *, spx_word16_t *, spx_word16_t *, int, int, int);
+                              int, int, SpeexBits*, char *, spx_word16_t *, spx_word16_t *, int, int, int, spx_word32_t *);
 
 /** Long-term un-quantize */
 typedef void (*ltp_unquant_func)(spx_word16_t *, spx_word32_t *, int, int, spx_word16_t, const void *, int, int *,
@@ -84,7 +84,7 @@
    /*Lont-term predictor functions*/
    ltp_quant_func    ltp_quant; /**< Long-term predictor (pitch) quantizer */
    ltp_unquant_func  ltp_unquant; /**< Long-term predictor (pitch) un-quantizer */
-   const void             *ltp_params; /**< Pitch parameters (options) */
+   const void       *ltp_params; /**< Pitch parameters (options) */
 
    /*Quantization of innovation*/
    innovation_quant_func innovation_quant; /**< Innovation quantization */

Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/nb_celp.c	2006-06-10 13:20:16 UTC (rev 11555)
@@ -155,6 +155,8 @@
    st->psy_window = speex_alloc(256*sizeof(float));
 #endif
 
+   st->cumul_gain = 1024;
+
    /* Allocating input buffer */
    st->winBuf = speex_alloc((st->windowSize-st->frameSize)*sizeof(spx_word16_t));
    /* Allocating excitation buffer */
@@ -864,7 +866,7 @@
             pitch = SUBMODE(ltp_quant)(target, sw, interp_qlpc, bw_lpc1, bw_lpc2,
                                        exc32, SUBMODE(ltp_params), pit_min, pit_max, ol_pitch_coef,
                                        st->lpcSize, st->subframeSize, bits, stack, 
-                                       exc, syn_resp, st->complexity, ol_pitch_id, st->plc_tuning);
+                                       exc, syn_resp, st->complexity, ol_pitch_id, st->plc_tuning, &st->cumul_gain);
          } else {
 #endif
 
@@ -872,7 +874,7 @@
          pitch = SUBMODE(ltp_quant)(target, sw, interp_qlpc, bw_lpc1, bw_lpc2,
                                     exc32, SUBMODE(ltp_params), pit_min, pit_max, ol_pitch_coef,
                                     st->lpcSize, st->subframeSize, bits, stack, 
-                                    exc, syn_resp, st->complexity, 0, st->plc_tuning);
+                                    exc, syn_resp, st->complexity, 0, st->plc_tuning, &st->cumul_gain);
 #ifdef EPIC_48K
          }
 #endif

Modified: trunk/speex/libspeex/nb_celp.h
===================================================================
--- trunk/speex/libspeex/nb_celp.h	2006-06-09 23:09:33 UTC (rev 11554)
+++ trunk/speex/libspeex/nb_celp.h	2006-06-10 13:20:16 UTC (rev 11555)
@@ -58,7 +58,7 @@
    int    min_pitch;      /**< Minimum pitch value allowed */
    int    max_pitch;      /**< Maximum pitch value allowed */
 
-   int    safe_pitch;     /**< Don't use too large values for pitch (in case we lose a packet) */
+   spx_word32_t cumul_gain; /**< Product of previously used pitch gains (Q10) */
    int    bounded_pitch;  /**< Next frame should not rely on previous frames for pitch */
    int    ol_pitch;       /**< Open-loop pitch */
    int    ol_voiced;      /**< Open-loop voiced/non-voiced decision */



More information about the commits mailing list