d_gain_c.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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. * INCLUDE FILES
  20. ********************************************************************************
  21. */
  22. #include "typedef.h"
  23. #include "mode.h"
  24. #include "gc_pred.h"
  25. /*
  26. ********************************************************************************
  27. * DECLARATION OF PROTOTYPES
  28. ********************************************************************************
  29. */
  30. /*
  31. **************************************************************************
  32. *
  33. * Function : d_gain_code
  34. * Purpose : Decode the fixed codebook gain using the received index.
  35. * Description : The received index gives the gain correction factor
  36. * gamma. The quantized gain is given by g_q = g0 * gamma
  37. * where g0 is the predicted gain. To find g0, 4th order
  38. * MA prediction is applied to the mean-removed innovation
  39. * energy in dB.
  40. * Returns : void
  41. *
  42. **************************************************************************
  43. */
  44. void d_gain_code (
  45. gc_predState *pred_state, /* i/o : MA predictor state */
  46. enum Mode mode, /* i : AMR mode */
  47. Word16 index, /* i : received quantization index */
  48. Word16 code[], /* i : innovation codevector */
  49. Word16 *gain_code /* o : decoded innovation gain */
  50. );
  51. #endif