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.

56 lines
2.4 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
  3. *
  4. * Use of this source code is governed by a BSD-style license
  5. * that can be found in the LICENSE file in the root of the source
  6. * tree. An additional intellectual property rights grant can be found
  7. * in the file PATENTS. All contributing project authors may
  8. * be found in the AUTHORS file in the root of the source tree.
  9. */
  10. #ifndef MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
  11. #define MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_
  12. #define BLOCKL_MAX 160 // max processing block length: 160
  13. #define ANAL_BLOCKL_MAX 256 // max analysis block length: 256
  14. #define HALF_ANAL_BLOCKL 129 // half max analysis block length + 1
  15. #define NUM_HIGH_BANDS_MAX 2 // max number of high bands: 2
  16. #define QUANTILE (float)0.25
  17. #define SIMULT 3
  18. #define END_STARTUP_LONG 200
  19. #define END_STARTUP_SHORT 50
  20. #define FACTOR (float)40.0
  21. #define WIDTH (float)0.01
  22. // Length of fft work arrays.
  23. #define IP_LENGTH \
  24. (ANAL_BLOCKL_MAX >> 1) // must be at least ceil(2 + sqrt(ANAL_BLOCKL_MAX/2))
  25. #define W_LENGTH (ANAL_BLOCKL_MAX >> 1)
  26. // PARAMETERS FOR NEW METHOD
  27. #define DD_PR_SNR (float)0.98 // DD update of prior SNR
  28. #define LRT_TAVG (float)0.50 // tavg parameter for LRT (previously 0.90)
  29. #define SPECT_FL_TAVG \
  30. (float)0.30 // tavg parameter for spectral flatness measure
  31. #define SPECT_DIFF_TAVG \
  32. (float)0.30 // tavg parameter for spectral difference measure
  33. #define PRIOR_UPDATE (float)0.10 // update parameter of prior model
  34. #define NOISE_UPDATE (float)0.90 // update parameter for noise
  35. #define SPEECH_UPDATE (float)0.99 // update parameter when likely speech
  36. #define WIDTH_PR_MAP \
  37. (float)4.0 // width parameter in sigmoid map for prior model
  38. #define LRT_FEATURE_THR (float)0.5 // default threshold for LRT feature
  39. #define SF_FEATURE_THR \
  40. (float)0.5 // default threshold for Spectral Flatness feature
  41. #define SD_FEATURE_THR \
  42. (float)0.5 // default threshold for Spectral Difference feature
  43. #define PROB_RANGE \
  44. (float)0.20 // probability threshold for noise state in
  45. // speech/noise likelihood
  46. #define HIST_PAR_EST 1000 // histogram size for estimation of parameters
  47. #define GAMMA_PAUSE (float)0.05 // update for conservative noise estimate
  48. //
  49. #define B_LIM (float)0.5 // threshold in final energy gain factor calculation
  50. #endif // MODULES_AUDIO_PROCESSING_NS_MAIN_SOURCE_DEFINES_H_