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

jm at svn.xiph.org jm at svn.xiph.org
Sat Apr 8 08:35:09 PDT 2006


Author: jm
Date: 2006-04-08 08:35:07 -0700 (Sat, 08 Apr 2006)
New Revision: 11110

Modified:
   trunk/speex/libspeex/ltp.c
Log:
minor RAM tweak: delayed stack allocation to reduce max scratch memory use


Modified: trunk/speex/libspeex/ltp.c
===================================================================
--- trunk/speex/libspeex/ltp.c	2006-04-08 15:12:45 UTC (rev 11109)
+++ trunk/speex/libspeex/ltp.c	2006-04-08 15:35:07 UTC (rev 11110)
@@ -622,16 +622,17 @@
       return start;
    }
    
-   ALLOC(best_exc, nsf, spx_sig_t);
-   ALLOC(new_target, nsf, spx_sig_t);
-   ALLOC(best_target, nsf, spx_sig_t);
-   
    if (N>end-start+1)
       N=end-start+1;
    if (end != start)
       open_loop_nbest_pitch(sw, start, end, nsf, nbest, NULL, N, stack);
    else
       nbest[0] = start;
+   
+   ALLOC(best_exc, nsf, spx_sig_t);
+   ALLOC(new_target, nsf, spx_sig_t);
+   ALLOC(best_target, nsf, spx_sig_t);
+   
    for (i=0;i<N;i++)
    {
       pitch=nbest[i];



More information about the commits mailing list