comparison libtwamr/q_gain_c.h @ 368:3a25bdfad0d8

libtwamr: integrate q_gain_c.c
author Mychaela Falconia <falcon@freecalypso.org>
date Mon, 06 May 2024 03:18:47 +0000
parents
children
comparison
equal deleted inserted replaced
367:bd4f660eb75a 368:3a25bdfad0d8
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 : q_gain_c.h
11 * Purpose : Scalar quantization of the innovative
12 * : codebook gain.
13 *
14 ********************************************************************************
15 */
16 #ifndef q_gain_c_h
17 #define q_gain_c_h "$Id $"
18
19 /*
20 ********************************************************************************
21 * INCLUDE FILES
22 ********************************************************************************
23 */
24 #include "tw_amr.h"
25 #include "typedef.h"
26 #include "gc_pred.h"
27
28 /*
29 ********************************************************************************
30 * DECLARATION OF PROTOTYPES
31 ********************************************************************************
32 */
33
34 /*--------------------------------------------------------------------------*
35 * Function q_gain_code() *
36 * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
37 * Scalar quantization of the innovative codebook gain. *
38 * *
39 * gc_pred() is used for MA prediction of the innovation energy *
40 *--------------------------------------------------------------------------*/
41 Word16 q_gain_code ( /* o : quantization index, Q0 */
42 enum Mode mode, /* i : AMR mode */
43 Word16 exp_gcode0, /* i : predicted CB gain (exponent), Q0 */
44 Word16 frac_gcode0, /* i : predicted CB gain (fraction), Q15 */
45 Word16 *gain, /* i/o: quantized fixed codebook gain, Q1 */
46 Word16 *qua_ener_MR122, /* o : quantized energy error, Q10 */
47 /* (for MR122 MA predictor update) */
48 Word16 *qua_ener /* o : quantized energy error, Q10 */
49 /* (for other MA predictor update) */
50 );
51
52 #endif