[xiph-commits] r12781 - in trunk/speex: include/speex libspeex

jm at svn.xiph.org jm at svn.xiph.org
Tue Mar 20 06:14:49 PDT 2007


Author: jm
Date: 2007-03-20 06:14:44 -0700 (Tue, 20 Mar 2007)
New Revision: 12781

Modified:
   trunk/speex/include/speex/speex_resampler.h
   trunk/speex/libspeex/arch.h
   trunk/speex/libspeex/resample.c
Log:
Resampler can now compile outside of Speex in fixed-point too.


Modified: trunk/speex/include/speex/speex_resampler.h
===================================================================
--- trunk/speex/include/speex/speex_resampler.h	2007-03-20 12:37:13 UTC (rev 12780)
+++ trunk/speex/include/speex/speex_resampler.h	2007-03-20 13:14:44 UTC (rev 12781)
@@ -78,20 +78,7 @@
 #define spx_int32_t int
 #define spx_uint16_t unsigned short
 #define spx_uint32_t unsigned int
-
-#ifdef FIXED_POINT
-#define spx_word16_t spx_int16_t
-#define spx_word32_t spx_int32_t
-
-#else /* FIXED_POINT */
-
-#define spx_word16_t float
-#define spx_word32_t float
-#define MULT16_16(a,b) ((a)*(b))
-#define MULT16_32_Q15(a,b) ((a)*(b))
-#define PSHR32(a,b) (a)
-#endif /* FIXED_POINT */
-
+      
 #else /* OUTSIDE_SPEEX */
 
 #include "speex/speex_types.h"

Modified: trunk/speex/libspeex/arch.h
===================================================================
--- trunk/speex/libspeex/arch.h	2007-03-20 12:37:13 UTC (rev 12780)
+++ trunk/speex/libspeex/arch.h	2007-03-20 13:14:44 UTC (rev 12781)
@@ -35,7 +35,9 @@
 #ifndef ARCH_H
 #define ARCH_H
 
+#ifndef OUTSIDE_SPEEX
 #include "speex/speex_types.h"
+#endif
 
 #define ABS(x) ((x) < 0 ? (-(x)) : (x))      /**< Absolute integer value. */
 #define ABS16(x) ((x) < 0 ? (-(x)) : (x))    /**< Absolute 16-bit value.  */

Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c	2007-03-20 12:37:13 UTC (rev 12780)
+++ trunk/speex/libspeex/resample.c	2007-03-20 13:14:44 UTC (rev 12781)
@@ -60,10 +60,12 @@
 void *speex_realloc (void *ptr, int size) {return realloc(ptr, size);}
 void speex_free (void *ptr) {free(ptr);}
 #include "speex_resampler.h"
-#else
+#include "arch.h"
+#else /* OUTSIDE_SPEEX */
+               
 #include "speex/speex_resampler.h"
 #include "misc.h"
-#endif
+#endif /* OUTSIDE_SPEEX */
 
 #include <math.h>
 



More information about the commits mailing list