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

jm at svn.xiph.org jm at svn.xiph.org
Wed Apr 19 06:57:00 PDT 2006


Author: jm
Date: 2006-04-19 06:56:55 -0700 (Wed, 19 Apr 2006)
New Revision: 11165

Modified:
   trunk/speex/libspeex/nb_celp.c
Log:
Added some EXTEND32 for 16-bit machines


Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2006-04-18 15:58:42 UTC (rev 11164)
+++ trunk/speex/libspeex/nb_celp.c	2006-04-19 13:56:55 UTC (rev 11165)
@@ -774,12 +774,12 @@
          if (sub==0)
          {
             for (i=0;i<st->subframeSize;i++)
-               real_exc[i] = SHL32(st->winBuf[i],SIG_SHIFT);
+               real_exc[i] = SHL32(EXTEND32(st->winBuf[i]),SIG_SHIFT);
             for (i=0;i<st->subframeSize;i++)
                sw[i] = st->winBuf[i];
          } else {
             for (i=0;i<st->subframeSize;i++)
-               real_exc[i] = SHL32(in[i+((sub-1)*st->subframeSize)],SIG_SHIFT);
+               real_exc[i] = SHL32(EXTEND32(in[i+((sub-1)*st->subframeSize)]),SIG_SHIFT);
             for (i=0;i<st->subframeSize;i++)
                sw[i] = in[i+((sub-1)*st->subframeSize)];
          }
@@ -822,7 +822,7 @@
       
       /* Compute target signal */
       for (i=0;i<st->subframeSize;i++)
-         target[i]=SHL32(sw[i]-PSHR32(ringing[i],1),SIG_SHIFT);
+         target[i]=SHL32(EXTEND32(SUB16(sw[i],PSHR32(ringing[i],1))),SIG_SHIFT);
 
       /* Reset excitation */
       for (i=0;i<st->subframeSize;i++)



More information about the commits mailing list