diff options
Diffstat (limited to 'apps/codecs/libspeex/misc.h')
-rw-r--r-- | apps/codecs/libspeex/misc.h | 99 |
1 files changed, 0 insertions, 99 deletions
diff --git a/apps/codecs/libspeex/misc.h b/apps/codecs/libspeex/misc.h deleted file mode 100644 index 7dcc4f25f9..0000000000 --- a/apps/codecs/libspeex/misc.h +++ /dev/null | |||
@@ -1,99 +0,0 @@ | |||
1 | /* Copyright (C) 2002 Jean-Marc Valin */ | ||
2 | /** | ||
3 | @file misc.h | ||
4 | @brief Various compatibility routines for Speex | ||
5 | */ | ||
6 | /* | ||
7 | Redistribution and use in source and binary forms, with or without | ||
8 | modification, are permitted provided that the following conditions | ||
9 | are met: | ||
10 | |||
11 | - Redistributions of source code must retain the above copyright | ||
12 | notice, this list of conditions and the following disclaimer. | ||
13 | |||
14 | - Redistributions in binary form must reproduce the above copyright | ||
15 | notice, this list of conditions and the following disclaimer in the | ||
16 | documentation and/or other materials provided with the distribution. | ||
17 | |||
18 | - Neither the name of the Xiph.org Foundation nor the names of its | ||
19 | contributors may be used to endorse or promote products derived from | ||
20 | this software without specific prior written permission. | ||
21 | |||
22 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
23 | ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
24 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR | ||
25 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR | ||
26 | CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, | ||
27 | EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, | ||
28 | PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR | ||
29 | PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF | ||
30 | LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING | ||
31 | NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS | ||
32 | SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. | ||
33 | */ | ||
34 | |||
35 | #ifndef MISC_H | ||
36 | #define MISC_H | ||
37 | |||
38 | #include "config-speex.h" | ||
39 | |||
40 | #ifndef SPEEX_VERSION | ||
41 | #define SPEEX_MAJOR_VERSION 1 /**< Major Speex version. */ | ||
42 | #define SPEEX_MINOR_VERSION 1 /**< Minor Speex version. */ | ||
43 | #define SPEEX_MICRO_VERSION 15 /**< Micro Speex version. */ | ||
44 | #define SPEEX_EXTRA_VERSION "" /**< Extra Speex version. */ | ||
45 | #define SPEEX_VERSION "speex-1.2beta3" /**< Speex version string. */ | ||
46 | #endif | ||
47 | |||
48 | /* A couple test to catch stupid option combinations */ | ||
49 | #ifdef FIXED_POINT | ||
50 | |||
51 | #ifdef _USE_SSE | ||
52 | #error SSE is only for floating-point | ||
53 | #endif | ||
54 | #if ((defined (ARM4_ASM)||defined (ARM4_ASM)) && defined(BFIN_ASM)) || (defined (ARM4_ASM)&&defined(ARM5E_ASM)) | ||
55 | #error Make up your mind. What CPU do you have? | ||
56 | #endif | ||
57 | #ifdef VORBIS_PSYCHO | ||
58 | #error Vorbis-psy model currently not implemented in fixed-point | ||
59 | #endif | ||
60 | |||
61 | #else | ||
62 | |||
63 | #if defined (ARM4_ASM) || defined(ARM5E_ASM) || defined(BFIN_ASM) | ||
64 | #error I suppose you can have a [ARM4/ARM5E/Blackfin] that has float instructions? | ||
65 | #endif | ||
66 | #ifdef FIXED_POINT_DEBUG | ||
67 | #error "Don't you think enabling fixed-point is a good thing to do if you want to debug that?" | ||
68 | #endif | ||
69 | |||
70 | |||
71 | #endif | ||
72 | |||
73 | #include "arch.h" | ||
74 | |||
75 | /** Convert little endian */ | ||
76 | static inline spx_int32_t le_int(spx_int32_t i) | ||
77 | { | ||
78 | #if 1 | ||
79 | return letoh32(i); | ||
80 | #elif !defined(__LITTLE_ENDIAN__) && ( defined(WORDS_BIGENDIAN) || defined(__BIG_ENDIAN__) ) | ||
81 | spx_uint32_t ui, ret; | ||
82 | ui = i; | ||
83 | ret = ui>>24; | ||
84 | ret |= (ui>>8)&0x0000ff00; | ||
85 | ret |= (ui<<8)&0x00ff0000; | ||
86 | ret |= (ui<<24); | ||
87 | return ret; | ||
88 | #else | ||
89 | return i; | ||
90 | #endif | ||
91 | } | ||
92 | |||
93 | |||
94 | #ifdef FIXED_DEBUG | ||
95 | long long spx_mips=0; | ||
96 | #endif | ||
97 | |||
98 | |||
99 | #endif | ||