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