patch from Bertrik, thanks
authordrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 4 Feb 2014 03:29:00 +0000 (03:29 +0000)
committerdrowe67 <drowe67@01035d8c-6547-0410-b346-abe4f91aad63>
Tue, 4 Feb 2014 03:29:00 +0000 (03:29 +0000)
git-svn-id: https://svn.code.sf.net/p/freetel/code@1395 01035d8c-6547-0410-b346-abe4f91aad63

codec2-dev/src/ampexp.c
codec2-dev/src/quantise.c

index 4d3b70a854f469c9285f643a6960597f19c0ef5b..0119160a3736b1e5bb7773970e138717f55a546b 100644 (file)
@@ -719,7 +719,7 @@ static void gain_shape_sparse_vq_amp(struct AEXP *aexp, MODEL *model)
 
     /* vector quantise */
         
-    for(m=0; m<=MAX_AMP; m++) {
+    for(m=0; m<MAX_AMP; m++) {
        sparse_pe_out[m] = sparse_pe_in[m];
     }
 
index 088070cfecb5636e3e54627dce581acafcfc9be7..bc4cdddb537532ffec33f586d880ffe7fb0be9cf 100644 (file)
@@ -1946,7 +1946,6 @@ int encode_WoE(MODEL *model, float e, float xq[])
 void decode_WoE(MODEL *model, float *e, float xq[], int n1)
 {
   int          i;
-  float        err[2];
   const float *codebook1 = ge_cb[0].cb;
   int          ndim = ge_cb[0].k;
   float Wo_min = TWO_PI/P_MAX;
@@ -1955,7 +1954,6 @@ void decode_WoE(MODEL *model, float *e, float xq[], int n1)
   for (i=0;i<ndim;i++)
   {
     xq[i] = ge_coeff[i]*xq[i] + codebook1[ndim*n1+i];
-    err[i] -= codebook1[ndim*n1+i];
   }
 
   //printf("dec: %f %f\n", xq[0], xq[1]);