comparison libtwamr/d_gain_c.h @ 339:a723d9f9f697

libtwamr: integrate d_gain_c.c
author Mychaela Falconia <falcon@freecalypso.org>
date Thu, 18 Apr 2024 23:33:00 +0000
parents
children
comparison
equal deleted inserted replaced
338:5db2c920fc23 339:a723d9f9f697
1 /*
2 ********************************************************************************
3 *
4 * GSM AMR-NB speech codec R98 Version 7.6.0 December 12, 2001
5 * R99 Version 3.3.0
6 * REL-4 Version 4.1.0
7 *
8 ********************************************************************************
9 *
10 * File : d_gain_c.h
11 * Purpose : Decode the fixed codebook gain using the received index.
12 *
13 ********************************************************************************
14 */
15 #ifndef d_gain_c_h
16 #define d_gain_c_h "$Id $"
17
18 /*
19 ********************************************************************************
20 * INCLUDE FILES
21 ********************************************************************************
22 */
23 #include "tw_amr.h"
24 #include "typedef.h"
25 #include "gc_pred.h"
26
27 /*
28 ********************************************************************************
29 * DECLARATION OF PROTOTYPES
30 ********************************************************************************
31 */
32 /*
33 **************************************************************************
34 *
35 * Function : d_gain_code
36 * Purpose : Decode the fixed codebook gain using the received index.
37 * Description : The received index gives the gain correction factor
38 * gamma. The quantized gain is given by g_q = g0 * gamma
39 * where g0 is the predicted gain. To find g0, 4th order
40 * MA prediction is applied to the mean-removed innovation
41 * energy in dB.
42 * Returns : void
43 *
44 **************************************************************************
45 */
46 void d_gain_code (
47 gc_predState *pred_state, /* i/o : MA predictor state */
48 enum Mode mode, /* i : AMR mode */
49 Word16 index, /* i : received quantization index */
50 Word16 code[], /* i : innovation codevector */
51 Word16 *gain_code /* o : decoded innovation gain */
52 );
53
54 #endif