FreeCalypso > hg > gsm-codec-lib
comparison libtwamr/qua_gain.h @ 377:b02e043dcba0
libtwamr: integrate qua_gain.c
| author | Mychaela Falconia <falcon@freecalypso.org> |
|---|---|
| date | Mon, 06 May 2024 04:24:17 +0000 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 376:2aa98051d445 | 377:b02e043dcba0 |
|---|---|
| 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 : qua_gain.h | |
| 11 * Purpose : Quantization of pitch and codebook gains. | |
| 12 * | |
| 13 ******************************************************************************** | |
| 14 */ | |
| 15 #ifndef qua_gain_h | |
| 16 #define qua_gain_h "$Id $" | |
| 17 | |
| 18 /* | |
| 19 ******************************************************************************** | |
| 20 * INCLUDE FILES | |
| 21 ******************************************************************************** | |
| 22 */ | |
| 23 #include "tw_amr.h" | |
| 24 #include "typedef.h" | |
| 25 | |
| 26 /* | |
| 27 ******************************************************************************** | |
| 28 * DECLARATION OF PROTOTYPES | |
| 29 ******************************************************************************** | |
| 30 */ | |
| 31 /************************************************************************* | |
| 32 * | |
| 33 * FUNCTION: Qua_gain() | |
| 34 * | |
| 35 * PURPOSE: Quantization of pitch and codebook gains. | |
| 36 * (using predicted codebook gain) | |
| 37 * | |
| 38 *************************************************************************/ | |
| 39 Word16 | |
| 40 Qua_gain( /* o : index of quantization. */ | |
| 41 enum Mode mode, /* i : AMR mode */ | |
| 42 Word16 exp_gcode0, /* i : predicted CB gain (exponent), Q0 */ | |
| 43 Word16 frac_gcode0, /* i : predicted CB gain (fraction), Q15 */ | |
| 44 Word16 frac_coeff[], /* i : energy coeff. (5), fraction part, Q15 */ | |
| 45 Word16 exp_coeff[], /* i : energy coeff. (5), exponent part, Q0 */ | |
| 46 /* (frac_coeff and exp_coeff computed in */ | |
| 47 /* calc_filt_energies()) */ | |
| 48 Word16 gp_limit, /* i : pitch gain limit */ | |
| 49 Word16 *gain_pit, /* o : Pitch gain, Q14 */ | |
| 50 Word16 *gain_cod, /* o : Code gain, Q1 */ | |
| 51 Word16 *qua_ener_MR122, /* o : quantized energy error, Q10 */ | |
| 52 /* (for MR122 MA predictor update) */ | |
| 53 Word16 *qua_ener /* o : quantized energy error, Q10 */ | |
| 54 /* (for other MA predictor update) */ | |
| 55 ); | |
| 56 #endif |
