1 /* ------------------------------------------------------------------
2 * Copyright (C) 1998-2009 PacketVideo
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
8 * http://www.apache.org/licenses/LICENSE-2.0
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
14 * See the License for the specific language governing permissions
15 * and limitations under the License.
16 * -------------------------------------------------------------------
18 /****************************************************************************************
19 Portions of this file are derived from the following 3GPP standard:
22 ANSI-C code for the Adaptive Multi-Rate (AMR) speech codec
23 Available from http://www.3gpp.org
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 ****************************************************************************************/
30 ------------------------------------------------------------------------------
33 Filename: enc_output_format_tab.cpp
35 ------------------------------------------------------------------------------
36 INPUT AND OUTPUT DEFINITIONS
47 Global Variables Used:
50 Local Variables Needed:
53 ------------------------------------------------------------------------------
56 This file contains the tables of the number of data bytes per codec mode in
57 both WMF and IF2 output formats.
59 ------------------------------------------------------------------------------
64 ------------------------------------------------------------------------------
67 [1] AMR Speech Codec Frame Structure, 3GPP TS 26.101 version 4.1.0 Release 4,
70 ------------------------------------------------------------------------------
74 ------------------------------------------------------------------------------
78 /*----------------------------------------------------------------------------
80 ----------------------------------------------------------------------------*/
81 #include "amrencode.h"
83 /*--------------------------------------------------------------------------*/
89 /*----------------------------------------------------------------------------
91 ; Define module specific macros here
92 ----------------------------------------------------------------------------*/
95 /*----------------------------------------------------------------------------
97 ; Include all pre-processor statements here. Include conditional
98 ; compile variables also.
99 ----------------------------------------------------------------------------*/
101 /*----------------------------------------------------------------------------
102 ; LOCAL FUNCTION DEFINITIONS
103 ; Function Prototype declaration
104 ----------------------------------------------------------------------------*/
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] =
125 6, /* GsmAmr comfort noise */
126 7, /* Gsm-Efr comfort noise */
127 6, /* IS-641 comfort noise */
128 6, /* Pdc-Efr comfort noise */
132 1 /* No transmission */
136 /* Number of data bytes in an encoder frame for each codec mode */
137 /* for IF2 output format */
138 const Word16 If2EncBytesPerFrame[16] =
148 6, /* GsmAmr comfort noise */
149 6, /* Gsm-Efr comfort noise */
150 6, /* IS-641 comfort noise */
151 6, /* Pdc-Efr comfort noise */
155 1 /* No transmission */
158 /*----------------------------------------------------------------------------
159 ; EXTERNAL FUNCTION REFERENCES
160 ; Declare functions defined elsewhere and referenced in this module
161 ----------------------------------------------------------------------------*/
164 /*----------------------------------------------------------------------------
165 ; EXTERNAL GLOBAL STORE/BUFFER/POINTER REFERENCES
166 ; Declare variables used in this module but defined elsewhere
167 ----------------------------------------------------------------------------*/
170 /*--------------------------------------------------------------------------*/
175 /*----------------------------------------------------------------------------
177 ----------------------------------------------------------------------------*/
179 /*----------------------------------------------------------------------------
180 ; Define all local variables
181 ----------------------------------------------------------------------------*/
184 /*----------------------------------------------------------------------------
186 ----------------------------------------------------------------------------*/
189 /*----------------------------------------------------------------------------
190 ; Return nothing or data or data pointer
191 ----------------------------------------------------------------------------*/