Fixed minor pi_gain synchronisation problem in the wideband decoder. Should
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 14 Mar 2007 09:31:06 +0000 (09:31 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Wed, 14 Mar 2007 09:31:06 +0000 (09:31 +0000)
increase quality slightly.

git-svn-id: http://svn.xiph.org/trunk/speex@12755 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/nb_celp.c
libspeex/sb_celp.c

index 5befb3b..55bba6e 100644 (file)
@@ -1698,7 +1698,7 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
          for (i=0;i<st->lpcSize;i+=2)
          {
             /*pi_g += -st->interp_qlpc[i] +  st->interp_qlpc[i+1];*/
-            pi_g = ADD32(pi_g, SUB32(EXTEND32(st->interp_qlpc[i+1]),EXTEND32(st->interp_qlpc[i])));
+            pi_g = ADD32(pi_g, SUB32(EXTEND32(ak[i+1]),EXTEND32(ak[i])));
          }
          st->pi_gain[sub] = pi_g;
       }
index b1159cd..ac0f5e8 100644 (file)
@@ -1006,8 +1006,8 @@ int sb_decode(void *state, SpeexBits *bits, void *vout)
          rh = LPC_SCALING;
          for (i=0;i<st->lpcSize;i+=2)
          {
-            rh += st->interp_qlpc[i+1] - st->interp_qlpc[i];
-            st->pi_gain[sub] += st->interp_qlpc[i] + st->interp_qlpc[i+1];
+            rh += ak[i+1] - ak[i];
+            st->pi_gain[sub] += ak[i] + ak[i+1];
          }
 
          rl = low_pi_gain[sub];