Git init
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_nb / dec / src / dec_input_format_tab.cpp
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.073
22     ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23     Available from http://www.3gpp.org
24
25 (C) 2004, 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  Filename: dec_input_format_tab.cpp
34
35 ------------------------------------------------------------------------------
36  INPUT AND OUTPUT DEFINITIONS
37
38  Inputs:
39     None
40
41  Outputs:
42     None
43
44  Returns:
45     None
46
47  Global Variables Used:
48     None
49
50  Local Variables Needed:
51     None
52
53 ------------------------------------------------------------------------------
54  FUNCTION DESCRIPTION
55
56  This file contains the tables of the number of data bytes per codec mode in
57  both WMF and IF2 input formats.
58
59 ------------------------------------------------------------------------------
60  REQUIREMENTS
61
62  None
63
64 ------------------------------------------------------------------------------
65  REFERENCES
66
67  [1] AMR Speech Codec Frame Structure, 3GPP TS 26.101 version 4.1.0 Release 4,
68      June 2001
69
70 ------------------------------------------------------------------------------
71  PSEUDO-CODE
72
73
74 ------------------------------------------------------------------------------
75 */
76
77
78 /*----------------------------------------------------------------------------
79 ; INCLUDES
80 ----------------------------------------------------------------------------*/
81 #include "amrdecode.h"
82
83 /*--------------------------------------------------------------------------*/
84 #ifdef __cplusplus
85 extern "C"
86 {
87 #endif
88
89     /*----------------------------------------------------------------------------
90     ; MACROS
91     ; Define module specific macros here
92     ----------------------------------------------------------------------------*/
93
94
95     /*----------------------------------------------------------------------------
96     ; DEFINES
97     ; Include all pre-processor statements here. Include conditional
98     ; compile variables also.
99     ----------------------------------------------------------------------------*/
100
101     /*----------------------------------------------------------------------------
102     ; LOCAL FUNCTION DEFINITIONS
103     ; Function Prototype declaration
104     ----------------------------------------------------------------------------*/
105
106
107     /*----------------------------------------------------------------------------
108     ; LOCAL STORE/BUFFER/POINTER DEFINITIONS
109     ; Variable declaration - defined here and used outside this module
110     ----------------------------------------------------------------------------*/
111     /* Table containing the number of core AMR data bytes for                */
112     /* each codec mode for WMF input format(number excludes frame type byte) */
113     const Word16 WmfDecBytesPerFrame[16] =
114     {
115         12, /* 4.75 */
116         13, /* 5.15 */
117         15, /* 5.90 */
118         17, /* 6.70 */
119         19, /* 7.40 */
120         20, /* 7.95 */
121         26, /* 10.2 */
122         31, /* 12.2 */
123         5, /* GsmAmr comfort noise */
124         6, /* Gsm-Efr comfort noise */
125         5, /* IS-641 comfort noise */
126         5, /* Pdc-Efr comfort noise */
127         0, /* future use */
128         0, /* future use */
129         0, /* future use */
130         0 /* No transmission */
131     };
132
133     /* Table containing the number of core AMR data bytes for   */
134     /* each codec mode for IF2 input format.                    */
135     const Word16 If2DecBytesPerFrame[16] =
136     {
137         13, /* 4.75 */
138         14, /* 5.15 */
139         16, /* 5.90 */
140         18, /* 6.70 */
141         19, /* 7.40 */
142         21, /* 7.95 */
143         26, /* 10.2 */
144         31, /* 12.2 */
145         6, /* GsmAmr comfort noise */
146         6, /* Gsm-Efr comfort noise */
147         6, /* IS-641 comfort noise */
148         6, /* Pdc-Efr comfort noise */
149         0, /* future use */
150         0, /* future use */
151         0, /* future use */
152         1 /* No transmission */
153     };
154
155     /*----------------------------------------------------------------------------
156     ; EXTERNAL FUNCTION REFERENCES
157     ; Declare functions defined elsewhere and referenced in this module
158     ----------------------------------------------------------------------------*/
159
160
161     /*----------------------------------------------------------------------------
162     ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
163     ; Declare variables used in this module but defined elsewhere
164     ----------------------------------------------------------------------------*/
165
166
167     /*--------------------------------------------------------------------------*/
168 #ifdef __cplusplus
169 }
170 #endif
171
172 /*----------------------------------------------------------------------------
173 ; FUNCTION CODE
174 ----------------------------------------------------------------------------*/
175
176 /*----------------------------------------------------------------------------
177 ; Define all local variables
178 ----------------------------------------------------------------------------*/
179
180
181 /*----------------------------------------------------------------------------
182 ; Function body here
183 ----------------------------------------------------------------------------*/
184
185
186 /*----------------------------------------------------------------------------
187 ; Return nothing or data or data pointer
188 ----------------------------------------------------------------------------*/
189
190