cnst.h 3.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  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 : cnst.h
  11. * Purpose : Speech codec constant parameters
  12. * : (encoder, decoder, and postfilter)
  13. *
  14. *****************************************************************************
  15. */
  16. #ifndef cnst_h
  17. #define cnst_h "$Id $"
  18. #define L_TOTAL 320 /* Total size of speech buffer. */
  19. #define L_WINDOW 240 /* Window size in LP analysis */
  20. #define L_FRAME 160 /* Frame size */
  21. #define L_FRAME_BY2 80 /* Frame size divided by 2 */
  22. #define L_SUBFR 40 /* Subframe size */
  23. #define L_CODE 40 /* codevector length */
  24. #define NB_TRACK 5 /* number of tracks */
  25. #define STEP 5 /* codebook step size */
  26. #define NB_TRACK_MR102 4 /* number of tracks mode mr102 */
  27. #define STEP_MR102 4 /* codebook step size mode mr102 */
  28. #define M 10 /* Order of LP filter */
  29. #define MP1 (M+1) /* Order of LP filter + 1 */
  30. #define LSF_GAP 205 /* Minimum distance between LSF after quan-
  31. tization; 50 Hz = 205 */
  32. #define LSP_PRED_FAC_MR122 21299 /* MR122 LSP prediction factor (0.65 Q15) */
  33. #define AZ_SIZE (4*M+4) /* Size of array of LP filters in 4 subfr.s */
  34. #define PIT_MIN_MR122 18 /* Minimum pitch lag (MR122 mode) */
  35. #define PIT_MIN 20 /* Minimum pitch lag (all other modes) */
  36. #define PIT_MAX 143 /* Maximum pitch lag */
  37. #define L_INTERPOL (10+1) /* Length of filter for interpolation */
  38. #define L_INTER_SRCH 4 /* Length of filter for CL LTP search
  39. interpolation */
  40. #define MU 26214 /* Factor for tilt compensation filter 0.8 */
  41. #define AGC_FAC 29491 /* Factor for automatic gain control 0.9 */
  42. #define L_NEXT 40 /* Overhead in LP analysis */
  43. #define SHARPMAX 13017 /* Maximum value of pitch sharpening */
  44. #define SHARPMIN 0 /* Minimum value of pitch sharpening */
  45. #define MAX_PRM_SIZE 57 /* max. num. of params */
  46. #define MAX_SERIAL_SIZE 244 /* max. num. of serial bits */
  47. #define GP_CLIP 15565 /* Pitch gain clipping = 0.95 */
  48. #define N_FRAME 7 /* old pitch gains in average calculation */
  49. #define EHF_MASK 0x0008 /* encoder homing frame pattern */
  50. #endif