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 (AMR) speech codec
23 Available from http://www.3gpp.org
25 (C) 2004, 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 * GSM AMR speech codec Version 2.0.0 February 8, 1999
34 *****************************************************************************
37 * Purpose : Decoding and post filtering of one speech frame.
40 Description: Replaced "int" and/or "char" with OSCL defined types.
42 *****************************************************************************
45 #define sp_dec_h "$Id $"
48 *****************************************************************************
50 *****************************************************************************
60 *****************************************************************************
61 * DEFINITION OF DATA TYPES
62 *****************************************************************************
66 Decoder_amrState decoder_amrState;
67 Post_FilterState post_state;
68 Post_ProcessState postHP_state;
70 } Speech_Decode_FrameState;
73 *****************************************************************************
74 * DECLARATION OF PROTOTYPES
75 *****************************************************************************
78 #if defined(__cplusplus)
82 Word16 GSMInitDecode(void **state_data,
84 /* initialize one instance of the speech decoder
85 Stores pointer to filter status struct in *st. This pointer has to
86 be passed to Speech_Decode_Frame in each call.
90 Word16 Speech_Decode_Frame_reset(void *state_data);
91 /* reset speech decoder (i.e. set state memory to zero)
95 void GSMDecodeFrameExit(void **state_data);
96 /* de-initialize speech decoder (i.e. free status struct)
101 Speech_Decode_FrameState *st, /* io: post filter states */
102 enum Mode mode, /* i : AMR mode */
103 Word16 *serial, /* i : serial bit stream */
104 enum RXFrameType frame_type, /* i : Frame type */
105 Word16 *synth /* o : synthesis speech (postfiltered */
108 /* return 0 on success
110 #if defined(__cplusplus)