16-bit cleanliness
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 21 Apr 2006 13:06:02 +0000 (13:06 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Fri, 21 Apr 2006 13:06:02 +0000 (13:06 +0000)
git-svn-id: http://svn.xiph.org/trunk/speex@11200 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/nb_celp.c

index 1ec6137..bd8886c 100644 (file)
@@ -748,7 +748,7 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
          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(st->interp_qlpc[i+1],st->interp_qlpc[i]));
+            pi_g = ADD32(pi_g, SUB32(EXTEND32(st->interp_qlpc[i+1]),EXTEND32(st->interp_qlpc[i])));
          }
          st->pi_gain[sub] = pi_g;
       }
@@ -1779,7 +1779,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(st->interp_qlpc[i+1],st->interp_qlpc[i]));
+            pi_g = ADD32(pi_g, SUB32(EXTEND32(st->interp_qlpc[i+1]),EXTEND32(st->interp_qlpc[i])));
          }
          st->pi_gain[sub] = pi_g;
       }