q_gain_c.h 2.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. * INCLUDE FILES
  21. ********************************************************************************
  22. */
  23. #include "typedef.h"
  24. #include "mode.h"
  25. #include "gc_pred.h"
  26. /*
  27. ********************************************************************************
  28. * DECLARATION OF PROTOTYPES
  29. ********************************************************************************
  30. */
  31. /*--------------------------------------------------------------------------*
  32. * Function q_gain_code() *
  33. * ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ *
  34. * Scalar quantization of the innovative codebook gain. *
  35. * *
  36. * gc_pred() is used for MA prediction of the innovation energy *
  37. *--------------------------------------------------------------------------*/
  38. Word16 q_gain_code ( /* o : quantization index, Q0 */
  39. enum Mode mode, /* i : AMR mode */
  40. Word16 exp_gcode0, /* i : predicted CB gain (exponent), Q0 */
  41. Word16 frac_gcode0, /* i : predicted CB gain (fraction), Q15 */
  42. Word16 *gain, /* i/o: quantized fixed codebook gain, Q1 */
  43. Word16 *qua_ener_MR122, /* o : quantized energy error, Q10 */
  44. /* (for MR122 MA predictor update) */
  45. Word16 *qua_ener /* o : quantized energy error, Q10 */
  46. /* (for other MA predictor update) */
  47. );
  48. #endif