From df6f2f9a3c88a7a4a8ad0382ee4ee7c9a3ee3256 Mon Sep 17 00:00:00 2001 From: Dan Everton Date: Tue, 22 May 2007 09:50:31 +0000 Subject: Upgrade to libspeex 1.2beta2. Very minor performance increase (0.6% on coldfire). git-svn-id: svn://svn.rockbox.org/rockbox/trunk@13461 a1c6a512-1295-4272-9138-f99709370657 --- apps/codecs/libspeex/misc.h | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) (limited to 'apps/codecs/libspeex/misc.h') diff --git a/apps/codecs/libspeex/misc.h b/apps/codecs/libspeex/misc.h index 1d6c6cb49f..1664aaed9d 100644 --- a/apps/codecs/libspeex/misc.h +++ b/apps/codecs/libspeex/misc.h @@ -38,9 +38,9 @@ #ifndef SPEEX_VERSION #define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */ #define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */ -#define SPEEX_MICRO_VERSION 13 /**< Micro Speex version. */ +#define SPEEX_MICRO_VERSION 14 /**< Micro Speex version. */ #define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */ -#define SPEEX_VERSION "speex-1.2beta1" /**< Speex version string. */ +#define SPEEX_VERSION "speex-1.2beta2" /**< Speex version string. */ #endif /* A couple test to catch stupid option combinations */ @@ -75,10 +75,21 @@ void print_vec(float *vec, int len, char *name); #endif -/** Convert big endian */ -spx_uint32_t be_int(spx_uint32_t i); /** Convert little endian */ -spx_uint32_t le_int(spx_uint32_t i); +static inline spx_int32_t le_int(spx_int32_t i) +{ +#if !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) ) + spx_uint32_t ui, ret; + ui = i; + ret = ui>>24; + ret |= (ui>>8)&0x0000ff00; + ret |= (ui<<8)&0x00ff0000; + ret |= (ui<<24); + return ret; +#else + return i; +#endif +} /** Speex wrapper for calloc. To do your own dynamic allocation, all you need to do is replace this function, speex_realloc and speex_free */ void *speex_alloc (int size); @@ -98,15 +109,18 @@ void speex_free_scratch (void *ptr); /** Speex wrapper for mem_move */ void *speex_move (void *dest, void *src, int n); -/** Print error message to stderr */ +/** Abort with an error message to stderr (internal Speex error) */ void speex_error(const char *str); -/** Print warning message to stderr */ +/** Print warning message to stderr (programming error) */ void speex_warning(const char *str); /** Print warning message with integer argument to stderr */ void speex_warning_int(const char *str, int val); +/** Print notification message to stderr */ +void speex_notify(const char *str); + /** Generate a random number */ spx_word16_t speex_rand(spx_word16_t std, spx_int32_t *seed); -- cgit v1.2.3