Git init
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_wb / dec / src / pv_amr_wb_type_defs.h
1 /* ------------------------------------------------------------------
2  * Copyright (C) 1998-2009 PacketVideo
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  *      http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
13  * express or implied.
14  * See the License for the specific language governing permissions
15  * and limitations under the License.
16  * -------------------------------------------------------------------
17  */
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
20
21     3GPP TS 26.173
22     ANSI-C code for the Adaptive Multi-Rate - Wideband (AMR-WB) speech codec
23     Available from http://www.3gpp.org
24
25 (C) 2007, 3GPP Organizational Partners (ARIB, ATIS, CCSA, ETSI, TTA, TTC)
26 Permission to distribute, modify and use this file under the standard license
27 terms listed above has been obtained from the copyright holder.
28 ****************************************************************************************/
29 /*
30 ------------------------------------------------------------------------------
31
32
33
34  Pathname: ./cpp/include/pv_amr_wb_type_defs.h
35
36 ------------------------------------------------------------------------------
37  INCLUDE DESCRIPTION
38
39  This file was derived from a number of standards bodies. The type
40  definitions below were created from some of the best practices observed
41  in the standards bodies.
42
43  This file is dependent on limits.h for defining the bit widths. In an
44  ANSI C environment limits.h is expected to always be present and contain
45  the following definitions:
46
47      SCHAR_MIN
48      SCHAR_MAX
49      UCHAR_MAX
50
51      INT_MAX
52      INT_MIN
53      UINT_MAX
54
55      SHRT_MIN
56      SHRT_MAX
57      USHRT_MAX
58
59      LONG_MIN
60      LONG_MAX
61      ULONG_MAX
62
63 ------------------------------------------------------------------------------
64 */
65
66 #ifndef PV_AMR_WB_TYPE_DEFS_H
67 #define PV_AMR_WB_TYPE_DEFS_H
68
69 #include    "oscl_base.h"
70
71
72 #ifndef Word8
73 typedef int8        Word8;
74 #endif
75
76 #ifndef UWord8
77 typedef uint8       UWord8;
78 #endif
79
80 /*----------------------------------------------------------------------------
81 ; Define generic signed and unsigned int
82 ----------------------------------------------------------------------------*/
83 #ifndef Int
84 typedef signed int  Int;
85 #endif
86
87 #ifndef UInt
88 typedef unsigned int    UInt;
89 #endif
90
91
92 /*----------------------------------------------------------------------------
93 ; Define 16 bit signed and unsigned words
94 ----------------------------------------------------------------------------*/
95
96 #ifndef INT16_MIN
97 #define INT16_MIN   (-32768)
98 #endif
99
100 #ifndef INT16_MAX
101 #define INT16_MAX   32767
102 #endif
103
104 /*----------------------------------------------------------------------------
105 ; Define 32 bit signed and unsigned words
106 ----------------------------------------------------------------------------*/
107
108
109
110 #ifndef INT32_MIN
111 #define INT32_MIN   (-2147483647 - 1)
112 #endif
113 #ifndef INT32_MAX
114 #define INT32_MAX   2147483647
115 #endif
116
117
118 #ifndef UINT32_MIN
119 #define UINT32_MIN  0
120 #endif
121 #ifndef UINT32_MAX
122 #define UINT32_MAX  0xffffffff
123 #endif
124
125
126 #ifndef INT_MAX
127 #define INT_MAX  INT32_MAX      /*  for 32 bit  */
128 #endif
129
130 /*----------------------------------------------------------------------------
131 ; Define 64 bit signed and unsigned words
132 ----------------------------------------------------------------------------*/
133
134
135 /*----------------------------------------------------------------------------
136 ; Define boolean type
137 ----------------------------------------------------------------------------*/
138
139 #ifndef Flag
140 typedef Int Flag;
141 #endif
142
143 #ifndef Bool
144 typedef Int     Bool;
145 #endif
146 #ifndef FALSE
147 #define FALSE       0
148 #endif
149
150 #ifndef TRUE
151 #define TRUE        1
152 #endif
153
154 #ifndef OFF
155 #define OFF     0
156 #endif
157 #ifndef ON
158 #define ON      1
159 #endif
160
161 #ifndef NO
162 #define NO      0
163 #endif
164 #ifndef YES
165 #define YES     1
166 #endif
167
168 #ifndef SUCCESS
169 #define SUCCESS     0
170 #endif
171
172 #ifndef  NULL
173 #define  NULL       0
174 #endif
175
176
177 #endif  /* PV_AMR_WB_TYPE_DEFS_H */