[xiph-commits] r11529 - trunk/speex/libspeex
jm at svn.xiph.org
jm at svn.xiph.org
Mon Jun 5 16:51:08 PDT 2006
Author: jm
Date: 2006-06-05 16:51:06 -0700 (Mon, 05 Jun 2006)
New Revision: 11529
Modified:
trunk/speex/libspeex/ltp.c
Log:
Minor optimisation -- should help the open loop pitch search for N=1
Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c 2006-06-05 21:02:10 UTC (rev 11528)
+++ trunk/speex/libspeex/ltp.c 2006-06-05 23:51:06 UTC (rev 11529)
@@ -218,7 +218,12 @@
/* Instead of dividing the tmp by the energy, we multiply on the other side */
if (MULT16_16(tmp,best_ener[N-1])>MULT16_16(best_score[N-1],ADD16(1,ener16[i-start])))
{
- for (j=0;j<N;j++)
+ /* We can safely put it last and then check */
+ best_score[N-1]=tmp;
+ best_ener[N-1]=ener16[i-start]+1;
+ pitch[N-1]=i;
+ /* Check if it comes in front of others */
+ for (j=0;j<N-1;j++)
{
if (MULT16_16(tmp,best_ener[j])>MULT16_16(best_score[j],ADD16(1,ener16[i-start])))
{
More information about the commits
mailing list