[xiph-cvs] cvs commit: speex/libspeex ltp.c

Jean-Marc Valin jm at xiph.org
Mon Oct 27 16:57:52 PST 2003



jm          03/10/27 19:57:51

  Modified:    libspeex ltp.c
  Log:
  fixed-point: pitch decoder (mostly) converted

Revision  Changes    Path
1.90      +13 -1     speex/libspeex/ltp.c

Index: ltp.c
===================================================================
RCS file: /usr/local/cvsroot/speex/libspeex/ltp.c,v
retrieving revision 1.89
retrieving revision 1.90
diff -u -r1.89 -r1.90
--- ltp.c	27 Oct 2003 22:53:15 -0000	1.89
+++ ltp.c	28 Oct 2003 00:57:51 -0000	1.90
@@ -612,8 +612,20 @@
          }
 #endif
       }
+
+#ifndef FIXED_POINT
+      {
+         spx_word16_t sgain[3];
+         sgain[0] = 64*gain[0];
+         sgain[1] = 64*gain[1];
+         sgain[2] = 64*gain[2];
+         for (i=0;i<nsf;i++)
+            exc[i]=MULT16_16(sgain[0],SHR(e[2][i],6))+MULT16_16(sgain[1],SHR(e[1][i],6))+MULT16_16(sgain[2],SHR(e[0][i],6));
+      }
+#else
       for (i=0;i<nsf;i++)
-           exc[i]=gain[0]*e[2][i]+gain[1]*e[1][i]+gain[2]*e[0][i];
+         exc[i]=gain[0]*e[2][i]+gain[1]*e[1][i]+gain[2]*e[0][i];
+#endif
    }
 }
 

<p><p>--- >8 ----
List archives:  http://www.xiph.org/archives/
Ogg project homepage: http://www.xiph.org/ogg/
To unsubscribe from this list, send a message to 'cvs-request at xiph.org'
containing only the word 'unsubscribe' in the body.  No subject is needed.
Unsubscribe messages sent to the list will be ignored/filtered.



More information about the commits mailing list