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.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_H 67 #define _PVAMRWBDECODER_H 68 69 #include "oscl_base.h" /* Basic data types used within the lib */ 70 #include "pvamrwbdecoder_api.h" 71 #include "pvgsmamrdecoderinterface.h" 72 73 /*---------------------------------------------------------------------------- 74 ; INCLUDES 75 ----------------------------------------------------------------------------*/ 76 #ifdef __cplusplus 77 extern "C" 78 { 79 #endif 80 81 /*---------------------------------------------------------------------------- 82 ; MACROS 83 ; Define module specific macros here 84 ----------------------------------------------------------------------------*/ 85 86 /*---------------------------------------------------------------------------- 87 ; DEFINES 88 ; Include all pre-processor statements here. 89 ----------------------------------------------------------------------------*/ 90 91 92 93 /*---------------------------------------------------------------------------- 94 ; EXTERNAL VARIABLES REFERENCES 95 ; Declare variables used in this module but defined elsewhere 96 ----------------------------------------------------------------------------*/ 97 98 /*---------------------------------------------------------------------------- 99 ; SIMPLE TYPEDEF'S 100 ----------------------------------------------------------------------------*/ 101 102 /*---------------------------------------------------------------------------- 103 ; ENUMERATED TYPEDEF'S 104 ----------------------------------------------------------------------------*/ 105 106 /*---------------------------------------------------------------------------- 107 ; STRUCTURES TYPEDEF'S 108 ----------------------------------------------------------------------------*/ 109 110 /*---------------------------------------------------------------------------- 111 ; GLOBAL FUNCTION DEFINITIONS 112 ; Function Prototype declaration 113 ----------------------------------------------------------------------------*/ 114 115 void pvDecoder_AmrWb_Init(void **spd_state, void *st, int16 ** ScratchMem); 116 117 int32 pvDecoder_AmrWb( 118 int16 mode, /* input : used mode */ 119 int16 prms[], /* input : parameter vector */ 120 int16 synth16k[], /* output: synthesis speech */ 121 int16 * frame_length, /* output: lenght of the frame */ 122 void *spd_state, /* i/o : State structure */ 123 int16 frame_type, /* input : received frame type */ 124 int16 ScratchMem[] 125 ); 126 127 void pvDecoder_AmrWb_Reset(void *st, int16 reset_all); 128 129 int16 pvDecoder_AmrWb_homing_frame_test(int16 input_frame[], int16 mode); 130 131 int16 pvDecoder_AmrWb_homing_frame_test_first(int16 input_frame[], int16 mode); 132 133 int32 pvDecoder_AmrWbMemRequirements(); 134 135 void mime_unsorting(uint8 packet[], 136 int16 compressed_data[], 137 int16 *frame_type, 138 int16 *mode, 139 uint8 q, 140 RX_State *st); 141 142 143 /*---------------------------------------------------------------------------- 144 ; END 145 ----------------------------------------------------------------------------*/ 146 147 #ifdef __cplusplus 148 } 149 #endif 150 151 152 #endif /* PVMP4AUDIODECODER_API_H */ 153 154 155