Initialize Tizen 2.3
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_nb / enc / src / enc_output_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: enc_output_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 output 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 "amrencode.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     /* Number of data bytes in an encoder frame for each codec mode */
112     /* for WMF output format.                                       */
113     /* Each entry is the sum of the 3GPP frame type byte and the    */
114     /* number of packed core AMR data bytes                         */
115     const Word16 WmfEncBytesPerFrame[16] =
116     {
117         13, /* 4.75 */
118         14, /* 5.15 */
119         16, /* 5.90 */
120         18, /* 6.70 */
121         20, /* 7.40 */
122         21, /* 7.95 */
123         27, /* 10.2 */
124         32, /* 12.2 */
125         6,  /* GsmAmr comfort noise */
126         7,  /* Gsm-Efr comfort noise */
127         6,  /* IS-641 comfort noise */
128         6,  /* Pdc-Efr comfort noise */
129         0,  /* future use */
130         0,  /* future use */
131         0,  /* future use */
132         1   /* No transmission */
133     };
134
135
136     /* Number of data bytes in an encoder frame for each codec mode */
137     /* for IF2 output format                                        */
138     const Word16 If2EncBytesPerFrame[16] =
139     {
140         13, /* 4.75 */
141         14, /* 5.15 */
142         16, /* 5.90 */
143         18, /* 6.70 */
144         19, /* 7.40 */
145         21, /* 7.95 */
146         26, /* 10.2 */
147         31, /* 12.2 */
148         6, /* GsmAmr comfort noise */
149         6, /* Gsm-Efr comfort noise */
150         6, /* IS-641 comfort noise */
151         6, /* Pdc-Efr comfort noise */
152         0, /* future use */
153         0, /* future use */
154         0, /* future use */
155         1  /* No transmission */
156     };
157
158     /*----------------------------------------------------------------------------
159     ; EXTERNAL FUNCTION REFERENCES
160     ; Declare functions defined elsewhere and referenced in this module
161     ----------------------------------------------------------------------------*/
162
163
164     /*----------------------------------------------------------------------------
165     ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
166     ; Declare variables used in this module but defined elsewhere
167     ----------------------------------------------------------------------------*/
168
169
170     /*--------------------------------------------------------------------------*/
171 #ifdef __cplusplus
172 }
173 #endif
174
175 /*----------------------------------------------------------------------------
176 ; FUNCTION CODE
177 ----------------------------------------------------------------------------*/
178
179 /*----------------------------------------------------------------------------
180 ; Define all local variables
181 ----------------------------------------------------------------------------*/
182
183
184 /*----------------------------------------------------------------------------
185 ; Function body here
186 ----------------------------------------------------------------------------*/
187
188
189 /*----------------------------------------------------------------------------
190 ; Return nothing or data or data pointer
191 ----------------------------------------------------------------------------*/
192
193