Git init
[external/opencore-amr.git] / opencore / codecs_v2 / audio / gsm_amr / amr_wb / dec / src / pvamrwbdecoder.h
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 ------------------------------------------------------------------------------
35  INCLUDE DESCRIPTION
36
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
41  purposely hidden.
42
43  ---* Need description of the input buffering. *-------
44
45  ---* Need an example of calling the library here *----
46
47 ------------------------------------------------------------------------------
48  REFERENCES
49
50   (Normally header files do not have a reference section)
51
52 ------------------------------------------------------------------------------
53 */
54
55 /*----------------------------------------------------------------------------
56 ; CONTINUE ONLY IF NOT ALREADY DEFINED
57 ----------------------------------------------------------------------------*/
58 #ifndef _PVAMRWBDECODER_H
59 #define _PVAMRWBDECODER_H
60
61 #include    "oscl_base.h"    /* Basic data types used within the lib */
62 #include    "pvamrwbdecoder_api.h"
63 #include    "pvgsmamrdecoderinterface.h"
64
65 /*----------------------------------------------------------------------------
66 ; INCLUDES
67 ----------------------------------------------------------------------------*/
68 #ifdef __cplusplus
69 extern "C"
70 {
71 #endif
72
73     /*----------------------------------------------------------------------------
74     ; MACROS
75     ; Define module specific macros here
76     ----------------------------------------------------------------------------*/
77
78     /*----------------------------------------------------------------------------
79     ; DEFINES
80     ; Include all pre-processor statements here.
81     ----------------------------------------------------------------------------*/
82
83
84
85     /*----------------------------------------------------------------------------
86     ; EXTERNAL VARIABLES REFERENCES
87     ; Declare variables used in this module but defined elsewhere
88     ----------------------------------------------------------------------------*/
89
90     /*----------------------------------------------------------------------------
91     ; SIMPLE TYPEDEF'S
92     ----------------------------------------------------------------------------*/
93
94     /*----------------------------------------------------------------------------
95     ; ENUMERATED TYPEDEF'S
96     ----------------------------------------------------------------------------*/
97
98     /*----------------------------------------------------------------------------
99     ; STRUCTURES TYPEDEF'S
100     ----------------------------------------------------------------------------*/
101
102     /*----------------------------------------------------------------------------
103     ; GLOBAL FUNCTION DEFINITIONS
104     ; Function Prototype declaration
105     ----------------------------------------------------------------------------*/
106
107     void pvDecoder_AmrWb_Init(void **spd_state, void *st, int16 ** ScratchMem);
108
109     int32 pvDecoder_AmrWb(
110         int16 mode,                          /* input : used mode             */
111         int16 prms[],                        /* input : parameter vector      */
112         int16 synth16k[],                    /* output: synthesis speech      */
113         int16 * frame_length,                /* output:  lenght of the frame  */
114         void *spd_state,                     /* i/o   : State structure       */
115         int16 frame_type,                    /* input : received frame type   */
116         int16 ScratchMem[]
117     );
118
119     void pvDecoder_AmrWb_Reset(void *st, int16 reset_all);
120
121     int16 pvDecoder_AmrWb_homing_frame_test(int16 input_frame[], int16 mode);
122
123     int16 pvDecoder_AmrWb_homing_frame_test_first(int16 input_frame[], int16 mode);
124
125     int32 pvDecoder_AmrWbMemRequirements();
126
127     void mime_unsorting(uint8 packet[],
128                         int16 compressed_data[],
129                         int16 *frame_type,
130                         int16 *mode,
131                         uint8 q,
132                         RX_State *st);
133
134
135     /*----------------------------------------------------------------------------
136     ; END
137     ----------------------------------------------------------------------------*/
138
139 #ifdef __cplusplus
140 }
141 #endif
142
143
144 #endif  /* PVMP4AUDIODECODER_API_H */
145
146