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