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

jm at svn.xiph.org jm at svn.xiph.org
Tue Apr 11 05:09:50 PDT 2006


Author: jm
Date: 2006-04-11 05:09:44 -0700 (Tue, 11 Apr 2006)
New Revision: 11120

Modified:
   trunk/speex/libspeex/filters.c
   trunk/speex/libspeex/misc.h
   trunk/speex/libspeex/nb_celp.c
Log:
added explicit errors for those compiling with stupid option combinations.
Bit of cleaning up too.


Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2006-04-10 22:46:19 UTC (rev 11119)
+++ trunk/speex/libspeex/filters.c	2006-04-11 12:09:44 UTC (rev 11120)
@@ -617,7 +617,7 @@
       
 void multicomb(
 spx_sig_t *exc,          /*decoded excitation*/
-spx_sig_t *new_exc,      /*enhanced excitation*/
+spx_word16_t *new_exc,      /*enhanced excitation*/
 spx_coef_t *ak,           /*LPC filter coefs*/
 int p,               /*LPC order*/
 int nsf,             /*sub-frame size*/

Modified: trunk/speex/libspeex/misc.h
===================================================================
--- trunk/speex/libspeex/misc.h	2006-04-10 22:46:19 UTC (rev 11119)
+++ trunk/speex/libspeex/misc.h	2006-04-11 12:09:44 UTC (rev 11120)
@@ -43,6 +43,30 @@
 #define SPEEX_VERSION "speex-1.1.12"  /**< Speex version string. */
 #endif
 
+/* A couple test to catch stupid option combinations */
+#ifdef FIXED_POINT
+
+#ifdef _USE_SSE
+#error SSE is only for floating-point
+#endif
+#if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM))
+#error Make up your mind. What CPU do you have?
+#endif
+#ifdef VORBIS_PSYCHO
+#error Vorbis-psy model currently not implemented in fixed-point
+#endif
+#else
+
+#if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM)
+#error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions?
+#endif
+#ifdef FIXED_POINT_DEBUG
+#error Don't you think enabling fixed-point is a good this to do if you want to debug that?
+#endif
+
+
+#endif
+
 #include "arch.h"
 
 #ifndef RELEASE

Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2006-04-10 22:46:19 UTC (rev 11119)
+++ trunk/speex/libspeex/nb_celp.c	2006-04-11 12:09:44 UTC (rev 11120)
@@ -765,8 +765,6 @@
       /*print_vec(st->bw_lpc1, 10, "bw_lpc");*/
 #endif
 
-      for (i=0;i<st->subframeSize;i++)
-         real_exc[i] = exc[i];
       {
          /*FIXME: This is a kludge that will break if we change the window size */
          if (sub==0)
@@ -1725,8 +1723,8 @@
    ALLOC(interp_qlsp, st->lpcSize, spx_lsp_t);
 
 #ifdef NEW_ENHANCER
-   multicomb(st->exc-40, st->frame, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, pitch, pitch_gain, SUBMODE(comb_gain), stack);
-   multicomb(st->exc+40, st->frame+80, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, pitch, pitch_gain, SUBMODE(comb_gain), stack);
+   multicomb(st->exc-40, out, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, pitch, pitch_gain, SUBMODE(comb_gain), stack);
+   multicomb(st->exc+40, out+80, st->interp_qlpc, st->lpcSize, 2*st->subframeSize, pitch, pitch_gain, SUBMODE(comb_gain), stack);
 #endif
    /*Loop on subframes */
    for (sub=0;sub<st->nbSubframes;sub++)



More information about the commits mailing list