gains.tab 3.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  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 : gains.tab
  11. * Purpose : Scalar quantization tables of the pitch gain and
  12. * : the codebook gain.
  13. * $Id $
  14. *
  15. ********************************************************************************
  16. */
  17. #define NB_QUA_PITCH 16
  18. static const Word16 qua_gain_pitch[NB_QUA_PITCH] =
  19. {
  20. 0, 3277, 6556, 8192, 9830, 11469, 12288, 13107,
  21. 13926, 14746, 15565, 16384, 17203, 18022, 18842, 19661
  22. };
  23. #define NB_QUA_CODE 32
  24. static const Word16 qua_gain_code[NB_QUA_CODE*3] =
  25. {
  26. /* gain factor (g_fac) and quantized energy error (qua_ener_MR122, qua_ener)
  27. * are stored:
  28. *
  29. * qua_ener_MR122 = log2(g_fac) (not the rounded floating point value, but
  30. * the value the original EFR algorithm
  31. * calculates from g_fac [using Log2])
  32. * qua_ener = 20*log10(g_fac); (rounded floating point value)
  33. *
  34. *
  35. * g_fac (Q11), qua_ener_MR122 (Q10), qua_ener (Q10)
  36. */
  37. 159, -3776, -22731,
  38. 206, -3394, -20428,
  39. 268, -3005, -18088,
  40. 349, -2615, -15739,
  41. 419, -2345, -14113,
  42. 482, -2138, -12867,
  43. 554, -1932, -11629,
  44. 637, -1726, -10387,
  45. 733, -1518, -9139,
  46. 842, -1314, -7906,
  47. 969, -1106, -6656,
  48. 1114, -900, -5416,
  49. 1281, -694, -4173,
  50. 1473, -487, -2931,
  51. 1694, -281, -1688,
  52. 1948, -75, -445,
  53. 2241, 133, 801,
  54. 2577, 339, 2044,
  55. 2963, 545, 3285,
  56. 3408, 752, 4530,
  57. 3919, 958, 5772,
  58. 4507, 1165, 7016,
  59. 5183, 1371, 8259,
  60. 5960, 1577, 9501,
  61. 6855, 1784, 10745,
  62. 7883, 1991, 11988,
  63. 9065, 2197, 13231,
  64. 10425, 2404, 14474,
  65. 12510, 2673, 16096,
  66. 16263, 3060, 18429,
  67. 21142, 3448, 20763,
  68. 27485, 3836, 23097
  69. };