Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

76 lines
3.0 KiB

  1. //Use CELP on _x86_ but not Alpha
  2. #ifndef _ALPHA_
  3. #define CELP4800
  4. #endif
  5. #define F_ECH 8000 // Sampling frequency
  6. #define NBSPF_4800_8000 160 // !!! Nbr of sample per recorded speech frame
  7. #define NBSPF_12000_16000 128 // !!! Nbr of sample per recorded speech frame
  8. #define NBFAC 25 // Nbr of speech frame for computing the average br
  9. #define DEGRADE_8000 1
  10. #ifdef DEGRADE_8000
  11. #define MOD_TH1_8000 50 // 1st, 2nd and 3rd thresholds for a 14.4 modem
  12. #define MOD_TH2_8000 100 // (assumed with compression, hence max 19.2)
  13. #define MOD_TH3_8000 150 // the overhead is about 60%, hence max=12000
  14. //#define MOD_TH1_8000 500 // 1st, 2nd and 3rd thresholds for a 14.4 modem
  15. //#define MOD_TH2_8000 1000 // (assumed with compression, hence max 19.2)
  16. //#define MOD_TH3_8000 1500 // the overhead is about 60%, hence max=12000
  17. #else
  18. #define MOD_TH1_8000 5000 // 1st, 2nd and 3rd thresholds for a 14.4 modem
  19. #define MOD_TH2_8000 6500 // (assumed with compression, hence max 19.2)
  20. #define MOD_TH3_8000 8000 // the overhead is about 60%, hence max=12000
  21. #endif
  22. #ifdef DEGRADE_12000_16000
  23. #define MOD_TH1_12000_16000 3000 // 1st, 2nd and 3rd thresholds for a 14.4 modem
  24. #define MOD_TH2_12000 4000 // (assumed with compression, hence max 19.2)
  25. #define MOD_TH2_16000 5000 // (assumed with compression, hence max 19.2)
  26. #define MOD_TH3_12000 5000 // the overhead is about 60%, hence max=12000
  27. #define MOD_TH3_16000 7000 // the overhead is about 60%, hence max=12000
  28. #else
  29. #define MOD_TH1_12000_16000 8000 // 1st, 2nd and 3rd thresholds for a 14.4 modem
  30. #define MOD_TH2_12000 10000 // (assumed with compression, hence max 19.2)
  31. #define MOD_TH2_16000 12000 // (assumed with compression, hence max 19.2)
  32. #define MOD_TH3_12000 12000 // the overhead is about 60%, hence max=12000
  33. #define MOD_TH3_16000 16000 // the overhead is about 60%, hence max=12000
  34. #endif
  35. #define MAX_LEVEL1 40 // input /2 instead of /4 20
  36. #define DIV_MAX1 60
  37. #define NBSB_SP_MAX1_8000_12000 6
  38. #define NBSB_SP_MAX1_16000 5
  39. #define MAX_LEVEL2 80 // input /2 instead of /4 40
  40. #define DIV_MAX2 40
  41. #define NBSB_SP_MAX2_8000_12000 5
  42. #define NBSB_SP_MAX2_16000 4
  43. #define MAX_LEVEL3 120 // input /2 instead of /4 60
  44. #define DIV_MAX3 30
  45. #define NBSB_SP_MAX3_8000_12000 5
  46. #define NBSB_SP_MAX3_16000 4
  47. #define MAX_LEVEL4 150 // input /2 instead of /4 75
  48. #define DIV_MAX4 20
  49. #ifdef DEGRADE_8000
  50. #define NBSB_SP_MAX4_8000_12000 3
  51. #else
  52. #define NBSB_SP_MAX4_8000_12000 4
  53. #endif
  54. #define NBSB_SP_MAX4_16000 3
  55. //#define QUANT_LEVELS_8000_12000 9,9,9,9,5,5,5,5,5,5,5,5
  56. //#define QUANT_LEVELS_16000 9,9,7,7,5,5,5,5,5,5
  57. #define SILENCE_QUANT_LEVEL_16000 3
  58. //#define CODING_BITS_8000_12000 52,52,38,38,38,38
  59. //#define CODING_BITS_16000 52,46,38,38,38
  60. #define SILENCE_CODING_BIT_16000 26
  61. #define MAX_OUTPUT_BYTES_4800 12
  62. #define MAX_OUTPUT_BYTES_8000_12000 37
  63. #define MAX_OUTPUT_BYTES_16000 43