2 ** Copyright 2003-2010, VisualOn, Inc.
\r
4 ** Licensed under the Apache License, Version 2.0 (the "License");
\r
5 ** you may not use this file except in compliance with the License.
\r
6 ** You may obtain a copy of the License at
\r
8 ** http://www.apache.org/licenses/LICENSE-2.0
\r
10 ** Unless required by applicable law or agreed to in writing, software
\r
11 ** distributed under the License is distributed on an "AS IS" BASIS,
\r
12 ** WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 ** See the License for the specific language governing permissions and
\r
14 ** limitations under the License.
\r
20 * Description : Definition of platform independent data
\r
21 * types and constants
\r
24 * The following platform independent data types and corresponding
\r
25 * preprocessor (#define) constants are defined:
\r
27 * defined type meaning corresponding constants
\r
28 * ----------------------------------------------------------
\r
29 * Char character (none)
\r
30 * Bool boolean true, false
\r
31 * Word8 8-bit signed minWord8, maxWord8
\r
32 * UWord8 8-bit unsigned minUWord8, maxUWord8
\r
33 * Word16 16-bit signed minWord16, maxWord16
\r
34 * UWord16 16-bit unsigned minUWord16, maxUWord16
\r
35 * Word32 32-bit signed minWord32, maxWord32
\r
36 * UWord32 32-bit unsigned minUWord32, maxUWord32
\r
37 * Float floating point minFloat, maxFloat
\r
40 * The following compile switches are #defined:
\r
42 * PLATFORM string indicating platform progam is compiled on
\r
43 * possible values: "OSF", "PC", "SUN"
\r
45 * OSF only defined if the current platform is an Alpha
\r
46 * PC only defined if the current platform is a PC
\r
47 * SUN only defined if the current platform is a Sun
\r
49 * LSBFIRST is defined if the byte order on this platform is
\r
50 * "least significant byte first" -> defined on DEC Alpha
\r
51 * and PC, undefined on Sun
\r
53 ********************************************************************************
\r
56 #ifndef __TYPEDEFS_H__
\r
57 #define __TYPEDEFS_H__
\r
60 ********************************************************************************
\r
62 ********************************************************************************
\r
70 ********************************************************************************
\r
71 * DEFINITION OF CONSTANTS
\r
72 ********************************************************************************
\r
75 ********* define char type
\r
80 ********* define 8 bit signed/unsigned types & constants
\r
82 #if SCHAR_MAX == 127
\r
83 typedef signed char Word8;
\r
84 #define minWord8 SCHAR_MIN
\r
85 #define maxWord8 SCHAR_MAX
\r
87 typedef unsigned char UWord8;
\r
89 #define maxUWord8 UCHAR_MAX
\r
91 #error cannot find 8-bit type
\r
96 ********* define 16 bit signed/unsigned types & constants
\r
98 #if INT_MAX == 32767
\r
100 #define minWord16 INT_MIN
\r
101 #define maxWord16 INT_MAX
\r
102 typedef unsigned int UWord16;
\r
103 #define minUWord16 0
\r
104 #define maxUWord16 UINT_MAX
\r
105 #elif SHRT_MAX == 32767
\r
106 typedef short Word16;
\r
107 #define minWord16 SHRT_MIN
\r
108 #define maxWord16 SHRT_MAX
\r
109 typedef unsigned short UWord16;
\r
110 #define minUWord16 0
\r
111 #define maxUWord16 USHRT_MAX
\r
113 #error cannot find 16-bit type
\r
118 ********* define 32 bit signed/unsigned types & constants
\r
120 #if INT_MAX == 2147483647
\r
121 typedef int Word32;
\r
122 #define minWord32 INT_MIN
\r
123 #define maxWord32 INT_MAX
\r
124 typedef unsigned int UWord32;
\r
125 #define minUWord32 0
\r
126 #define maxUWord32 UINT_MAX
\r
127 #elif LONG_MAX == 2147483647
\r
128 typedef long Word32;
\r
129 #define minWord32 LONG_MIN
\r
130 #define maxWord32 LONG_MAX
\r
131 typedef unsigned long UWord32;
\r
132 #define minUWord32 0
\r
133 #define maxUWord32 ULONG_MAX
\r
135 #error cannot find 32-bit type
\r
139 ********* define floating point type & constants
\r
141 /* use "#if 0" below if Float should be double;
\r
142 use "#if 1" below if Float should be float
\r
145 typedef float Float;
\r
146 #define maxFloat FLT_MAX
\r
147 #define minFloat FLT_MIN
\r
149 typedef double Float;
\r
150 #define maxFloat DBL_MAX
\r
151 #define minFloat DBL_MIN
\r
155 ********* define complex type
\r
158 Float r; /* real part */
\r
159 Float i; /* imaginary part */
\r
163 ********* define boolean type
\r
169 /* ******Avoid function multiple definition****** */
\r
170 #define Autocorr voAWB_Autocorr
\r
171 #define Convolve voAWB_Convolve
\r
172 #define cor_h_x voAWB_cor_h_x
\r
173 #define dtx_enc_init voAWB_dtx_enc_init
\r
174 #define dtx_enc_reset voAWB_dtx_enc_reset
\r
175 #define dtx_enc_exit voAWB_dtx_enc_exit
\r
176 #define dtx_enc voAWB_dtx_enc
\r
177 #define dtx_buffer voAWB_dtx_buffer
\r
178 #define tx_dtx_handler voAWB_tx_dtx_handler
\r
179 #define G_pitch voAWB_G_pitch
\r
180 #define Isp_Az voAWB_Isp_Az
\r
181 #define Lag_window voAWB_Lag_window
\r
182 #define Log2_norm voAWB_Log2_norm
\r
183 #define Log2 voAWB_Log2
\r
184 #define Pow2 voAWB_Pow2
\r
185 #define L_Comp voAWB_L_Comp
\r
186 #define Mpy_32 voAWB_Mpy_32
\r
187 #define Mpy_32_16 voAWB_Mpy_32_16
\r
188 #define Div_32 voAWB_Div_32
\r
189 #define Pit_shrp voAWB_Pit_shrp
\r
190 #define Qisf_ns voAWB_Qisf_ns
\r
191 #define Disf_ns voAWB_Disf_ns
\r
192 #define Residu voAWB_Residu
\r
193 #define Syn_filt voAWB_Syn_filt
\r
194 #define Set_zero voAWB_Set_zero
\r
195 #define Copy voAWB_Copy
\r
196 #define voice_factor voAWB_voice_factor
\r
197 #define Syn_filt_32 voAWB_Syn_filt_32
\r
198 #define Isf_isp voAWB_Isf_isp
\r
199 #define Levinson voAWB_Levinson
\r
200 #define median5 voAWB_median5
\r
201 #define Pred_lt4 voAWB_Pred_lt4
\r
202 #define Reorder_isf voAWB_Reorder_isf
\r
203 #define Dpisf_2s_36b voAWB_Dpisf_2s_36b
\r
204 #define Dpisf_2s_46b voAWB_Dpisf_2s_46b
\r
205 #define Dot_product12 voAWB_Dot_product12
\r
206 #define mem_malloc voAWB_mem_malloc
\r
207 #define mem_free voAWB_mem_free
\r
208 /******************************************************/
\r
210 #endif //#define __TYPEDEFS_H__
\r