Initialize Tizen 2.3
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_wb / dec / include / pvamrwbdecoder_api.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  Name: pvamrwbdecoder_api.h
33
34 ------------------------------------------------------------------------------
35  INCLUDE DESCRIPTION
36
37  Main header file for the Packet Video AMR Wide  Band  decoder library. The
38  constants, structures, and functions defined within this file, along with
39  a basic data types header file, is all that is needed to use and communicate
40  with the library. The internal data structures within the library are
41  purposely hidden.
42
43  ---* Need description of the input buffering. *-------
44
45  ---* Need an example of calling the library here *----
46
47 ------------------------------------------------------------------------------
48  REFERENCES
49
50   (Normally header files do not have a reference section)
51
52 ------------------------------------------------------------------------------
53 */
54
55 /*----------------------------------------------------------------------------
56 ; CONTINUE ONLY IF NOT ALREADY DEFINED
57 ----------------------------------------------------------------------------*/
58 #ifndef _PVAMRWBDECODER_API_H
59 #define _PVAMRWBDECODER_API_H
60
61 #include    "oscl_base.h"    /* Basic data types used within the lib */
62
63
64 /*----------------------------------------------------------------------------
65 ; INCLUDES
66 ----------------------------------------------------------------------------*/
67 #ifdef __cplusplus
68 extern "C"
69 {
70 #endif
71
72     /*----------------------------------------------------------------------------
73     ; MACROS
74     ; Define module specific macros here
75     ----------------------------------------------------------------------------*/
76
77     /*----------------------------------------------------------------------------
78     ; DEFINES
79     ; Include all pre-processor statements here.
80     ----------------------------------------------------------------------------*/
81
82 #define AMR_WB_PCM_FRAME   320             /* Frame size at 16kHz     */
83
84
85 #define NBBITS_7k     132                  /* 6.60k  */
86 #define NBBITS_9k     177                  /* 8.85k  */
87 #define NBBITS_12k    253                  /* 12.65k */
88 #define NBBITS_14k    285                  /* 14.25k */
89 #define NBBITS_16k    317                  /* 15.85k */
90 #define NBBITS_18k    365                  /* 18.25k */
91 #define NBBITS_20k    397                  /* 19.85k */
92 #define NBBITS_23k    461                  /* 23.05k */
93 #define NBBITS_24k    477                  /* 23.85k */
94
95 #define NBBITS_SID    35
96
97 #define KAMRWB_NB_BITS_MAX   NBBITS_24k
98 #define KAMRWB_NB_BYTES_MAX  ((KAMRWB_NB_BITS_MAX>>3)+1)
99
100 #define NUM_OF_MODES  10
101
102
103     static const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
104     {
105         NBBITS_7k,
106         NBBITS_9k,
107         NBBITS_12k,
108         NBBITS_14k,
109         NBBITS_16k,
110         NBBITS_18k,
111         NBBITS_20k,
112         NBBITS_23k,
113         NBBITS_24k,
114         NBBITS_SID
115     };
116
117     /*----------------------------------------------------------------------------
118     ; EXTERNAL VARIABLES REFERENCES
119     ; Declare variables used in this module but defined elsewhere
120     ----------------------------------------------------------------------------*/
121
122     /*----------------------------------------------------------------------------
123     ; SIMPLE TYPEDEF'S
124     ----------------------------------------------------------------------------*/
125
126     /*----------------------------------------------------------------------------
127     ; ENUMERATED TYPEDEF'S
128     ----------------------------------------------------------------------------*/
129
130
131     /*----------------------------------------------------------------------------
132     ; GLOBAL FUNCTION DEFINITIONS
133     ; Function Prototype declaration
134     ----------------------------------------------------------------------------*/
135
136
137     /*----------------------------------------------------------------------------
138     ; END
139     ----------------------------------------------------------------------------*/
140
141 #ifdef __cplusplus
142 }
143 #endif
144
145
146 #endif  /* PVMP4AUDIODECODER_API_H */
147
148