FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/qgain795.h @ 376:2aa98051d445
libtwamr: integrate qgain795.c
author | Mychaela Falconia <falcon@freecalypso.org> |
---|---|
date | Mon, 06 May 2024 04:20:11 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
375:1d2b39027b70 | 376:2aa98051d445 |
---|---|
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 : qgain795.h | |
11 * Purpose : (pre-) quantization of pitch gain for MR795 | |
12 * | |
13 ******************************************************************************** | |
14 */ | |
15 #ifndef qgain795_h | |
16 #define qgain795_h "$Id $" | |
17 | |
18 /* | |
19 ******************************************************************************** | |
20 * INCLUDE FILES | |
21 ******************************************************************************** | |
22 */ | |
23 #include "typedef.h" | |
24 #include "g_adapt.h" | |
25 | |
26 /* | |
27 ******************************************************************************** | |
28 * DECLARATION OF PROTOTYPES | |
29 ******************************************************************************** | |
30 */ | |
31 | |
32 /************************************************************************* | |
33 * | |
34 * FUNCTION: MR795_gain_quant | |
35 * | |
36 * PURPOSE: pitch and codebook quantization for MR795 | |
37 * | |
38 *************************************************************************/ | |
39 void | |
40 MR795_gain_quant( | |
41 GainAdaptState *adapt_st, /* i/o: gain adapter state structure */ | |
42 Word16 res[], /* i : LP residual, Q0 */ | |
43 Word16 exc[], /* i : LTP excitation (unfiltered), Q0 */ | |
44 Word16 code[], /* i : CB innovation (unfiltered), Q13 */ | |
45 Word16 frac_coeff[], /* i : coefficients (5), Q15 */ | |
46 Word16 exp_coeff[], /* i : energy coefficients (5), Q0 */ | |
47 /* coefficients from calc_filt_ener() */ | |
48 Word16 exp_code_en, /* i : innovation energy (exponent), Q0 */ | |
49 Word16 frac_code_en, /* i : innovation energy (fraction), Q15 */ | |
50 Word16 exp_gcode0, /* i : predicted CB gain (exponent), Q0 */ | |
51 Word16 frac_gcode0, /* i : predicted CB gain (fraction), Q15 */ | |
52 Word16 L_subfr, /* i : Subframe length */ | |
53 Word16 cod_gain_frac, /* i : opt. codebook gain (fraction),Q15 */ | |
54 Word16 cod_gain_exp, /* i : opt. codebook gain (exponent), Q0 */ | |
55 Word16 gp_limit, /* i : pitch gain limit */ | |
56 Word16 *gain_pit, /* i/o: Pitch gain (unquant/quant), Q14 */ | |
57 Word16 *gain_cod, /* o : Code gain, Q1 */ | |
58 Word16 *qua_ener_MR122, /* o : quantized energy error, Q10 */ | |
59 /* (for MR122 MA predictor update) */ | |
60 Word16 *qua_ener, /* o : quantized energy error, Q10 */ | |
61 /* (for other MA predictor update) */ | |
62 Word16 **anap /* o : Index of quantization */ | |
63 /* (first gain pitch, then code pitch)*/ | |
64 ); | |
65 | |
66 #endif |