From 3e4f820f22b2fb587f48a37dfe0fa2c4dbe4a451 Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 22 Nov 2007 14:47:28 +0000 Subject: update speex resampler with newer snapshot from Speex SVN git-svn-id: file:///home/lennart/svn/public/pulseaudio/trunk@2073 fefdeb5f-60dc-0310-8127-8f9354f1896f --- src/pulsecore/speex/arch.h | 50 +++++++++++++++++++++++++++++++++++++++++++--- 1 file changed, 47 insertions(+), 3 deletions(-) (limited to 'src/pulsecore/speex/arch.h') diff --git a/src/pulsecore/speex/arch.h b/src/pulsecore/speex/arch.h index 4be693c3..9987c8fb 100644 --- a/src/pulsecore/speex/arch.h +++ b/src/pulsecore/speex/arch.h @@ -35,6 +35,45 @@ #ifndef ARCH_H #define ARCH_H +#ifndef SPEEX_VERSION +#define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */ +#define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */ +#define SPEEX_MICRO_VERSION 15 /**< Micro Speex version. */ +#define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */ +#define SPEEX_VERSION "speex-1.2beta3" /**< Speex version string. */ +#endif + +/* A couple test to catch stupid option combinations */ +#ifdef FIXED_POINT + +#ifdef FLOATING_POINT +#error You cannot compile as floating point and fixed point at the same time +#endif +#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 + +#ifndef FLOATING_POINT +#error You now need to define either FIXED_POINT or FLOATING_POINT +#endif +#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 thing to do if you want to debug that?" +#endif + + +#endif + #ifndef OUTSIDE_SPEEX #include "speex/speex_types.h" #endif @@ -68,6 +107,7 @@ typedef spx_word32_t spx_sig_t; #define LPC_SHIFT 13 #define LSP_SHIFT 13 #define SIG_SHIFT 14 +#define GAIN_SHIFT 6 #define VERY_SMALL 0 #define VERY_LARGE32 ((spx_word32_t)2147483647) @@ -111,9 +151,6 @@ typedef float spx_word32_t; #define GAIN_SCALING 1.f #define GAIN_SCALING_1 1.f -#define LPC_SHIFT 0 -#define LSP_SHIFT 0 -#define SIG_SHIFT 0 #define VERY_SMALL 1e-15f #define VERY_LARGE32 1e15f @@ -194,4 +231,11 @@ typedef float spx_word32_t; #endif + + +#ifdef FIXED_DEBUG +long long spx_mips=0; +#endif + + #endif -- cgit