added explicit errors for those compiling with stupid option combinations.
authorjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Tue, 11 Apr 2006 12:09:44 +0000 (12:09 +0000)
committerjm <jm@0101bb08-14d6-0310-b084-bc0e0c8e3800>
Tue, 11 Apr 2006 12:09:44 +0000 (12:09 +0000)
Bit of cleaning up too.

git-svn-id: http://svn.xiph.org/trunk/speex@11120 0101bb08-14d6-0310-b084-bc0e0c8e3800

libspeex/filters.c
libspeex/misc.h
libspeex/nb_celp.c

index 65772d6..7f7d78e 100644 (file)
@@ -617,7 +617,7 @@ int len
       
 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*/
index 2e69b20..1142191 100644 (file)
 #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
index 4b3acce..b530f9c 100644 (file)
@@ -765,8 +765,6 @@ int nb_encode(void *state, void *vin, SpeexBits *bits)
       /*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 @@ int nb_decode(void *state, SpeexBits *bits, void *vout)
    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++)