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/****************************************************************************************
19Portions 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)
26Permission to distribute, modify and use this file under the standard license
27terms 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     Date: 12/12/2006
37
38------------------------------------------------------------------------------
39 REVISION HISTORY
40
41
42 Description:
43------------------------------------------------------------------------------
44 INCLUDE DESCRIPTION
45
46 This file was derived from a number of standards bodies. The type
47 definitions below were created from some of the best practices observed
48 in the standards bodies.
49
50 This file is dependent on limits.h for defining the bit widths. In an
51 ANSI C environment limits.h is expected to always be present and contain
52 the following definitions:
53
54     SCHAR_MIN
55     SCHAR_MAX
56     UCHAR_MAX
57
58     INT_MAX
59     INT_MIN
60     UINT_MAX
61
62     SHRT_MIN
63     SHRT_MAX
64     USHRT_MAX
65
66     LONG_MIN
67     LONG_MAX
68     ULONG_MAX
69
70------------------------------------------------------------------------------
71*/
72
73#ifndef PV_AMR_WB_TYPE_DEFS_H
74#define PV_AMR_WB_TYPE_DEFS_H
75
76#include <stdint.h>
77
78typedef int8_t        Word8;
79typedef uint8_t       UWord8;
80
81/*----------------------------------------------------------------------------
82; Define generic signed and unsigned int
83----------------------------------------------------------------------------*/
84typedef signed int  Int;
85
86typedef unsigned int    UInt;
87
88/*----------------------------------------------------------------------------
89; Define 16 bit signed and unsigned words
90----------------------------------------------------------------------------*/
91
92#ifndef INT16_MIN
93#define INT16_MIN   (-32768)
94#endif
95
96#ifndef INT16_MAX
97#define INT16_MAX   32767
98#endif
99
100/*----------------------------------------------------------------------------
101; Define 32 bit signed and unsigned words
102----------------------------------------------------------------------------*/
103
104
105
106#ifndef INT32_MIN
107#define INT32_MIN   (-2147483647 - 1)
108#endif
109#ifndef INT32_MAX
110#define INT32_MAX   2147483647
111#endif
112
113
114#ifndef UINT32_MIN
115#define UINT32_MIN  0
116#endif
117#ifndef UINT32_MAX
118#define UINT32_MAX  0xffffffff
119#endif
120
121
122/*----------------------------------------------------------------------------
123; Define 64 bit signed and unsigned words
124----------------------------------------------------------------------------*/
125
126
127/*----------------------------------------------------------------------------
128; Define boolean type
129----------------------------------------------------------------------------*/
130
131#ifndef Flag
132typedef Int Flag;
133#endif
134
135#ifndef Bool
136typedef Int     Bool;
137#endif
138#ifndef FALSE
139#define FALSE       0
140#endif
141
142#ifndef TRUE
143#define TRUE        1
144#endif
145
146#ifndef OFF
147#define OFF     0
148#endif
149#ifndef ON
150#define ON      1
151#endif
152
153#ifndef NO
154#define NO      0
155#endif
156#ifndef YES
157#define YES     1
158#endif
159
160#ifndef SUCCESS
161#define SUCCESS     0
162#endif
163
164#ifndef  NULL
165#define  NULL       0
166#endif
167
168typedef int16_t int16;
169typedef int32_t int32;
170typedef int64_t int64;
171typedef uint8_t uint8;
172
173#endif  /* PV_AMR_WB_TYPE_DEFS_H */
174