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 - Wideband (AMR-WB) speech codec
23 Available from http://www.3gpp.org
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 ****************************************************************************************/
30 ------------------------------------------------------------------------------
32 Name: pvamrwbdecoder_api.h
34 ------------------------------------------------------------------------------
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
43 ---* Need description of the input buffering. *-------
45 ---* Need an example of calling the library here *----
47 ------------------------------------------------------------------------------
50 (Normally header files do not have a reference section)
52 ------------------------------------------------------------------------------
55 /*----------------------------------------------------------------------------
56 ; CONTINUE ONLY IF NOT ALREADY DEFINED
57 ----------------------------------------------------------------------------*/
58 #ifndef _PVAMRWBDECODER_API_H
59 #define _PVAMRWBDECODER_API_H
61 #include "oscl_base.h" /* Basic data types used within the lib */
64 /*----------------------------------------------------------------------------
66 ----------------------------------------------------------------------------*/
72 /*----------------------------------------------------------------------------
74 ; Define module specific macros here
75 ----------------------------------------------------------------------------*/
77 /*----------------------------------------------------------------------------
79 ; Include all pre-processor statements here.
80 ----------------------------------------------------------------------------*/
82 #define AMR_WB_PCM_FRAME 320 /* Frame size at 16kHz */
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 */
97 #define KAMRWB_NB_BITS_MAX NBBITS_24k
98 #define KAMRWB_NB_BYTES_MAX ((KAMRWB_NB_BITS_MAX>>3)+1)
100 #define NUM_OF_MODES 10
103 static const int16 AMR_WB_COMPRESSED[NUM_OF_MODES] =
117 /*----------------------------------------------------------------------------
118 ; EXTERNAL VARIABLES REFERENCES
119 ; Declare variables used in this module but defined elsewhere
120 ----------------------------------------------------------------------------*/
122 /*----------------------------------------------------------------------------
124 ----------------------------------------------------------------------------*/
126 /*----------------------------------------------------------------------------
127 ; ENUMERATED TYPEDEF'S
128 ----------------------------------------------------------------------------*/
131 /*----------------------------------------------------------------------------
132 ; GLOBAL FUNCTION DEFINITIONS
133 ; Function Prototype declaration
134 ----------------------------------------------------------------------------*/
137 /*----------------------------------------------------------------------------
139 ----------------------------------------------------------------------------*/
146 #endif /* PVMP4AUDIODECODER_API_H */