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

jm at svn.xiph.org jm at svn.xiph.org
Thu Nov 8 05:57:28 PST 2007


Author: jm
Date: 2007-11-08 05:57:27 -0800 (Thu, 08 Nov 2007)
New Revision: 14113

Removed:
   trunk/speex/libspeex/misc.h
Modified:
   trunk/speex/libspeex/Makefile.am
   trunk/speex/libspeex/_kiss_fft_guts.h
   trunk/speex/libspeex/arch.h
   trunk/speex/libspeex/bits.c
   trunk/speex/libspeex/buffer.c
   trunk/speex/libspeex/cb_search.c
   trunk/speex/libspeex/cb_search.h
   trunk/speex/libspeex/fftwrap.c
   trunk/speex/libspeex/fftwrap.h
   trunk/speex/libspeex/filterbank.c
   trunk/speex/libspeex/filterbank.h
   trunk/speex/libspeex/filters.c
   trunk/speex/libspeex/filters.h
   trunk/speex/libspeex/jitter.c
   trunk/speex/libspeex/kiss_fft.c
   trunk/speex/libspeex/kiss_fft.h
   trunk/speex/libspeex/lpc.h
   trunk/speex/libspeex/lsp.h
   trunk/speex/libspeex/ltp.h
   trunk/speex/libspeex/math_approx.h
   trunk/speex/libspeex/mdf.c
   trunk/speex/libspeex/medfilter.c
   trunk/speex/libspeex/modes.c
   trunk/speex/libspeex/modes.h
   trunk/speex/libspeex/modes_wb.c
   trunk/speex/libspeex/nb_celp.c
   trunk/speex/libspeex/preprocess.c
   trunk/speex/libspeex/pseudofloat.h
   trunk/speex/libspeex/quant_lsp.c
   trunk/speex/libspeex/quant_lsp.h
   trunk/speex/libspeex/resample.c
   trunk/speex/libspeex/sb_celp.c
   trunk/speex/libspeex/smallft.c
   trunk/speex/libspeex/speex_callbacks.c
   trunk/speex/libspeex/speex_header.c
   trunk/speex/libspeex/vbr.h
   trunk/speex/libspeex/vorbis_psy.c
   trunk/speex/libspeex/vq.c
   trunk/speex/libspeex/vq.h
   trunk/speex/libspeex/window.c
Log:
Moved the remaining of misc.h into arch.h


Modified: trunk/speex/libspeex/Makefile.am
===================================================================
--- trunk/speex/libspeex/Makefile.am	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/Makefile.am	2007-11-08 13:57:27 UTC (rev 14113)
@@ -23,7 +23,7 @@
 noinst_HEADERS = 	arch.h 	cb_search_arm4.h 	cb_search_bfin.h 	cb_search_sse.h \
 		filters.h 	filters_arm4.h 	filters_bfin.h 	filters_sse.h 	fixed_arm4.h \
 		fixed_arm5e.h 	fixed_bfin.h 	fixed_debug.h 	lpc.h 	lpc_bfin.h 	ltp.h 	ltp_arm4.h \
-		ltp_sse.h 	math_approx.h 	misc.h 	misc_bfin.h 	nb_celp.h 	quant_lsp.h 	sb_celp.h \
+		ltp_sse.h 	math_approx.h 		misc_bfin.h 	nb_celp.h 	quant_lsp.h 	sb_celp.h \
 		stack_alloc.h 	vbr.h 	vq.h 	vq_arm4.h 	vq_bfin.h 	vq_sse.h cb_search.h fftwrap.h \
 	filterbank.h fixed_generic.h lsp.h lsp_bfin.h ltp_bfin.h modes.h os_support.h \
 	pseudofloat.h quant_lsp_bfin.h smallft.h vorbis_psy.h

Modified: trunk/speex/libspeex/_kiss_fft_guts.h
===================================================================
--- trunk/speex/libspeex/_kiss_fft_guts.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/_kiss_fft_guts.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -45,7 +45,7 @@
    C_ADDTO( res , a)    : res += a
  * */
 #ifdef FIXED_POINT
-#include "misc.h"
+#include "arch.h"
 # define FRACBITS 15
 # define SAMPPROD spx_int32_t 
 #define SAMP_MAX 32767

Modified: trunk/speex/libspeex/arch.h
===================================================================
--- trunk/speex/libspeex/arch.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/arch.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,6 +35,39 @@
 #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 _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 thing to do if you want to debug that?"
+#endif
+
+
+#endif
+
 #ifndef OUTSIDE_SPEEX
 #include "speex/speex_types.h"
 #endif
@@ -192,4 +225,11 @@
 
 #endif
 
+
+
+#ifdef FIXED_DEBUG
+long long spx_mips=0;
 #endif
+
+
+#endif

Modified: trunk/speex/libspeex/bits.c
===================================================================
--- trunk/speex/libspeex/bits.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/bits.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 #endif
 
 #include <speex/speex_bits.h>
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 
 /* Maximum size of the bit-stream (for fixed-size allocation) */

Modified: trunk/speex/libspeex/buffer.c
===================================================================
--- trunk/speex/libspeex/buffer.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/buffer.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 
 
 #include "os_support.h"
-#include "misc.h"
+#include "arch.h"
 #include <speex/speex_buffer.h>
 
 struct SpeexBuffer_ {

Modified: trunk/speex/libspeex/cb_search.c
===================================================================
--- trunk/speex/libspeex/cb_search.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/cb_search.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 #include "filters.h"
 #include "stack_alloc.h"
 #include "vq.h"
-#include "misc.h"
+#include "arch.h"
 #include "math_approx.h"
 #include "os_support.h"
 

Modified: trunk/speex/libspeex/cb_search.h
===================================================================
--- trunk/speex/libspeex/cb_search.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/cb_search.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -36,7 +36,7 @@
 #define CB_SEARCH_H
 
 #include <speex/speex_bits.h>
-#include "misc.h"
+#include "arch.h"
 
 /** Split codebook parameters. */
 typedef struct split_cb_params {

Modified: trunk/speex/libspeex/fftwrap.c
===================================================================
--- trunk/speex/libspeex/fftwrap.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/fftwrap.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -40,7 +40,7 @@
 #define USE_KISS_FFT
 
 
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 
 #define MAX_FFT_SIZE 2048

Modified: trunk/speex/libspeex/fftwrap.h
===================================================================
--- trunk/speex/libspeex/fftwrap.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/fftwrap.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #ifndef FFTWRAP_H
 #define FFTWRAP_H
 
-#include "misc.h"
+#include "arch.h"
 
 /** Compute tables for an FFT */
 void *spx_fft_init(int size);

Modified: trunk/speex/libspeex/filterbank.c
===================================================================
--- trunk/speex/libspeex/filterbank.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/filterbank.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -36,7 +36,7 @@
 #endif
 
 #include "filterbank.h"
-#include "misc.h"
+#include "arch.h"
 #include <math.h>
 #include "math_approx.h"
 #include "os_support.h"

Modified: trunk/speex/libspeex/filterbank.h
===================================================================
--- trunk/speex/libspeex/filterbank.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/filterbank.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -34,7 +34,7 @@
 #ifndef FILTERBANK_H
 #define FILTERBANK_H
 
-#include "misc.h"
+#include "arch.h"
 
 typedef struct {
    int *bank_left;

Modified: trunk/speex/libspeex/filters.c
===================================================================
--- trunk/speex/libspeex/filters.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/filters.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -36,7 +36,7 @@
 
 #include "filters.h"
 #include "stack_alloc.h"
-#include "misc.h"
+#include "arch.h"
 #include "math_approx.h"
 #include "ltp.h"
 #include <math.h>

Modified: trunk/speex/libspeex/filters.h
===================================================================
--- trunk/speex/libspeex/filters.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/filters.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #ifndef FILTERS_H
 #define FILTERS_H
 
-#include "misc.h"
+#include "arch.h"
 
 spx_word16_t compute_rms(const spx_sig_t *x, int len);
 spx_word16_t compute_rms16(const spx_word16_t *x, int len);

Modified: trunk/speex/libspeex/jitter.c
===================================================================
--- trunk/speex/libspeex/jitter.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/jitter.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -52,7 +52,7 @@
 #endif
 
 
-#include "misc.h"
+#include "arch.h"
 #include <speex/speex.h>
 #include <speex/speex_bits.h>
 #include <speex/speex_jitter.h>

Modified: trunk/speex/libspeex/kiss_fft.c
===================================================================
--- trunk/speex/libspeex/kiss_fft.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/kiss_fft.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -19,7 +19,7 @@
 #endif
 
 #include "_kiss_fft_guts.h"
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 
 /* The guts header contains all the multiplication and addition macros that are defined for

Modified: trunk/speex/libspeex/kiss_fft.h
===================================================================
--- trunk/speex/libspeex/kiss_fft.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/kiss_fft.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -3,7 +3,7 @@
 
 #include <stdlib.h>
 #include <math.h>
-#include "misc.h"
+#include "arch.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -32,7 +32,7 @@
 
 
 #ifdef FIXED_POINT
-#include "misc.h"	
+#include "arch.h"	
 #  define kiss_fft_scalar spx_int16_t
 #else
 # ifndef kiss_fft_scalar

Modified: trunk/speex/libspeex/lpc.h
===================================================================
--- trunk/speex/libspeex/lpc.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/lpc.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #ifndef LPC_H
 #define LPC_H
 
-#include "misc.h"
+#include "arch.h"
 
 void _spx_autocorr(
               const spx_word16_t * x,   /*  in: [0...n-1] samples x   */

Modified: trunk/speex/libspeex/lsp.h
===================================================================
--- trunk/speex/libspeex/lsp.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/lsp.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -51,7 +51,7 @@
 #ifndef __AK2LSPD__
 #define __AK2LSPD__
 
-#include "misc.h"
+#include "arch.h"
 
 int lpc_to_lsp (spx_coef_t *a, int lpcrdr, spx_lsp_t *freq, int nb, spx_word16_t delta, char *stack);
 void lsp_to_lpc(spx_lsp_t *freq, spx_coef_t *ak, int lpcrdr, char *stack);

Modified: trunk/speex/libspeex/ltp.h
===================================================================
--- trunk/speex/libspeex/ltp.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/ltp.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -33,7 +33,7 @@
 */
 
 #include <speex/speex_bits.h>
-#include "misc.h"
+#include "arch.h"
 
 /** LTP parameters. */
 typedef struct {

Modified: trunk/speex/libspeex/math_approx.h
===================================================================
--- trunk/speex/libspeex/math_approx.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/math_approx.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #ifndef MATH_APPROX_H
 #define MATH_APPROX_H
 
-#include "misc.h"
+#include "arch.h"
 
 #ifndef FIXED_POINT
 

Modified: trunk/speex/libspeex/mdf.c
===================================================================
--- trunk/speex/libspeex/mdf.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/mdf.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -69,7 +69,7 @@
 #include "config.h"
 #endif
 
-#include "misc.h"
+#include "arch.h"
 #include "speex/speex_echo.h"
 #include "fftwrap.h"
 #include "pseudofloat.h"

Modified: trunk/speex/libspeex/medfilter.c
===================================================================
--- trunk/speex/libspeex/medfilter.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/medfilter.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 #endif
 
 #include "medfilter.h"
-#include "misc.h"
+#include "arch.h"
 
 MedianFilter *median_filter_new(int N)
 {

Deleted: trunk/speex/libspeex/misc.h
===================================================================
--- trunk/speex/libspeex/misc.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/misc.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -1,95 +0,0 @@
-/* Copyright (C) 2002 Jean-Marc Valin */
-/**
-   @file misc.h
-   @brief Various compatibility routines for Speex
-*/
-/*
-   Redistribution and use in source and binary forms, with or without
-   modification, are permitted provided that the following conditions
-   are met:
-   
-   - Redistributions of source code must retain the above copyright
-   notice, this list of conditions and the following disclaimer.
-   
-   - Redistributions in binary form must reproduce the above copyright
-   notice, this list of conditions and the following disclaimer in the
-   documentation and/or other materials provided with the distribution.
-   
-   - Neither the name of the Xiph.org Foundation nor the names of its
-   contributors may be used to endorse or promote products derived from
-   this software without specific prior written permission.
-   
-   THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
-   ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
-   LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
-   A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR
-   CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
-   EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
-   PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
-   PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF
-   LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
-   NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
-   SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-*/
-
-#ifndef MISC_H
-#define MISC_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 _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 thing to do if you want to debug that?"
-#endif
-
-
-#endif
-
-#include "arch.h"
-
-/** Convert little endian */
-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
-}
-
-
-#ifdef FIXED_DEBUG
-long long spx_mips=0;
-#endif
-
-
-#endif

Modified: trunk/speex/libspeex/modes.c
===================================================================
--- trunk/speex/libspeex/modes.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/modes.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -43,7 +43,7 @@
 #include "sb_celp.h"
 #include "nb_celp.h"
 #include "vbr.h"
-#include "misc.h"
+#include "arch.h"
 #include <math.h>
 
 #ifndef NULL

Modified: trunk/speex/libspeex/modes.h
===================================================================
--- trunk/speex/libspeex/modes.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/modes.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -38,7 +38,7 @@
 
 #include <speex/speex.h>
 #include <speex/speex_bits.h>
-#include "misc.h"
+#include "arch.h"
 
 #define NB_SUBMODES 16
 #define NB_SUBMODE_BITS 4

Modified: trunk/speex/libspeex/modes_wb.c
===================================================================
--- trunk/speex/libspeex/modes_wb.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/modes_wb.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -43,7 +43,7 @@
 #include "sb_celp.h"
 #include "nb_celp.h"
 #include "vbr.h"
-#include "misc.h"
+#include "arch.h"
 #include <math.h>
 #include "os_support.h"
 

Modified: trunk/speex/libspeex/nb_celp.c
===================================================================
--- trunk/speex/libspeex/nb_celp.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/nb_celp.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -45,7 +45,7 @@
 #include "vq.h"
 #include <speex/speex_bits.h>
 #include "vbr.h"
-#include "misc.h"
+#include "arch.h"
 #include "math_approx.h"
 #include "os_support.h"
 #include <speex/speex_callbacks.h>

Modified: trunk/speex/libspeex/preprocess.c
===================================================================
--- trunk/speex/libspeex/preprocess.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/preprocess.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -62,7 +62,7 @@
 #include <math.h>
 #include "speex/speex_preprocess.h"
 #include "speex/speex_echo.h"
-#include "misc.h"
+#include "arch.h"
 #include "fftwrap.h"
 #include "filterbank.h"
 #include "math_approx.h"

Modified: trunk/speex/libspeex/pseudofloat.h
===================================================================
--- trunk/speex/libspeex/pseudofloat.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/pseudofloat.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -44,7 +44,7 @@
 #ifndef PSEUDOFLOAT_H
 #define PSEUDOFLOAT_H
 
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 #include "math_approx.h"
 #include <math.h>

Modified: trunk/speex/libspeex/quant_lsp.c
===================================================================
--- trunk/speex/libspeex/quant_lsp.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/quant_lsp.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -41,7 +41,7 @@
 #define M_PI 3.14159265358979323846
 #endif
 
-#include "misc.h"
+#include "arch.h"
 
 #ifdef BFIN_ASM
 #include "quant_lsp_bfin.h"

Modified: trunk/speex/libspeex/quant_lsp.h
===================================================================
--- trunk/speex/libspeex/quant_lsp.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/quant_lsp.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -36,7 +36,7 @@
 #define QUANT_LSP_H
 
 #include <speex/speex_bits.h>
-#include "misc.h"
+#include "arch.h"
 
 #define MAX_LSP_SIZE 20
 

Modified: trunk/speex/libspeex/resample.c
===================================================================
--- trunk/speex/libspeex/resample.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/resample.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -70,7 +70,7 @@
 #else /* OUTSIDE_SPEEX */
                
 #include "speex/speex_resampler.h"
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 #endif /* OUTSIDE_SPEEX */
 

Modified: trunk/speex/libspeex/sb_celp.c
===================================================================
--- trunk/speex/libspeex/sb_celp.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/sb_celp.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -43,7 +43,7 @@
 #include "quant_lsp.h"
 #include "vq.h"
 #include "ltp.h"
-#include "misc.h"
+#include "arch.h"
 #include "math_approx.h"
 #include "os_support.h"
 

Modified: trunk/speex/libspeex/smallft.c
===================================================================
--- trunk/speex/libspeex/smallft.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/smallft.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -34,7 +34,7 @@
 
 #include <math.h>
 #include "smallft.h"
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 
 static void drfti1(int n, float *wa, int *ifac){

Modified: trunk/speex/libspeex/speex_callbacks.c
===================================================================
--- trunk/speex/libspeex/speex_callbacks.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/speex_callbacks.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 #endif
 
 #include <speex/speex_callbacks.h>
-#include "misc.h"
+#include "arch.h"
 #include "os_support.h"
 
 int speex_inband_handler(SpeexBits *bits, SpeexCallback *callback_list, void *state)

Modified: trunk/speex/libspeex/speex_header.c
===================================================================
--- trunk/speex/libspeex/speex_header.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/speex_header.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #include "config.h"
 #endif
 
-#include "misc.h"
+#include "arch.h"
 #include <speex/speex_header.h>
 #include <speex/speex.h>
 #include "os_support.h"
@@ -44,6 +44,22 @@
 #define NULL 0
 #endif
 
+/** Convert little endian */
+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
+}
+
 #define ENDIAN_SWITCH(x) {x=le_int(x);}
 
 

Modified: trunk/speex/libspeex/vbr.h
===================================================================
--- trunk/speex/libspeex/vbr.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/vbr.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -37,7 +37,7 @@
 #ifndef VBR_H
 #define VBR_H
 
-#include "misc.h"
+#include "arch.h"
 
 #define VBR_MEMORY_SIZE 5
 

Modified: trunk/speex/libspeex/vorbis_psy.c
===================================================================
--- trunk/speex/libspeex/vorbis_psy.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/vorbis_psy.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 
 #ifdef VORBIS_PSYCHO
 
-#include "misc.h"
+#include "arch.h"
 #include "smallft.h"
 #include "lpc.h"
 #include "vorbis_psy.h"

Modified: trunk/speex/libspeex/vq.c
===================================================================
--- trunk/speex/libspeex/vq.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/vq.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -36,7 +36,7 @@
 
 #include "vq.h"
 #include "stack_alloc.h"
-#include "misc.h"
+#include "arch.h"
 
 #ifdef _USE_SSE
 #include <xmmintrin.h>

Modified: trunk/speex/libspeex/vq.h
===================================================================
--- trunk/speex/libspeex/vq.h	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/vq.h	2007-11-08 13:57:27 UTC (rev 14113)
@@ -35,7 +35,7 @@
 #ifndef VQ_H
 #define VQ_H
 
-#include "misc.h"
+#include "arch.h"
 
 int scal_quant(spx_word16_t in, const spx_word16_t *boundary, int entries);
 int scal_quant32(spx_word32_t in, const spx_word32_t *boundary, int entries);

Modified: trunk/speex/libspeex/window.c
===================================================================
--- trunk/speex/libspeex/window.c	2007-11-08 12:58:25 UTC (rev 14112)
+++ trunk/speex/libspeex/window.c	2007-11-08 13:57:27 UTC (rev 14113)
@@ -33,7 +33,7 @@
 #include "config.h"
 #endif
 
-#include "misc.h"
+#include "arch.h"
 
 #ifdef FIXED_POINT
 const spx_word16_t lpc_window[200] = {



More information about the commits mailing list