Per Ã…hgren | 0cbb58e | 2019-10-29 22:59:44 +0100 | [diff] [blame^] | 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 | |
| 11 | #ifndef MODULES_AUDIO_PROCESSING_LEGACY_NS_DEFINES_H_ |
| 12 | #define MODULES_AUDIO_PROCESSING_LEGACY_NS_DEFINES_H_ |
| 13 | |
| 14 | #define BLOCKL_MAX 160 // max processing block length: 160 |
| 15 | #define ANAL_BLOCKL_MAX 256 // max analysis block length: 256 |
| 16 | #define HALF_ANAL_BLOCKL 129 // half max analysis block length + 1 |
| 17 | #define NUM_HIGH_BANDS_MAX 2 // max number of high bands: 2 |
| 18 | |
| 19 | #define QUANTILE 0.25f |
| 20 | |
| 21 | #define SIMULT 3 |
| 22 | #define END_STARTUP_LONG 200 |
| 23 | #define END_STARTUP_SHORT 50 |
| 24 | #define FACTOR 40.f |
| 25 | #define WIDTH 0.01f |
| 26 | |
| 27 | // Length of fft work arrays. |
| 28 | #define IP_LENGTH \ |
| 29 | (ANAL_BLOCKL_MAX >> 1) // must be at least ceil(2 + sqrt(ANAL_BLOCKL_MAX/2)) |
| 30 | #define W_LENGTH (ANAL_BLOCKL_MAX >> 1) |
| 31 | |
| 32 | // PARAMETERS FOR NEW METHOD |
| 33 | #define DD_PR_SNR 0.98f // DD update of prior SNR |
| 34 | #define LRT_TAVG 0.5f // tavg parameter for LRT (previously 0.90) |
| 35 | #define SPECT_FL_TAVG 0.30f // tavg parameter for spectral flatness measure |
| 36 | #define SPECT_DIFF_TAVG 0.30f // tavg parameter for spectral difference measure |
| 37 | #define PRIOR_UPDATE 0.1f // update parameter of prior model |
| 38 | #define NOISE_UPDATE 0.9f // update parameter for noise |
| 39 | #define SPEECH_UPDATE 0.99f // update parameter when likely speech |
| 40 | #define WIDTH_PR_MAP 4.0f // width parameter in sigmoid map for prior model |
| 41 | #define LRT_FEATURE_THR 0.5f // default threshold for LRT feature |
| 42 | #define SF_FEATURE_THR 0.5f // default threshold for Spectral Flatness feature |
| 43 | #define SD_FEATURE_THR \ |
| 44 | 0.5f // default threshold for Spectral Difference feature |
| 45 | #define PROB_RANGE \ |
| 46 | 0.2f // probability threshold for noise state in |
| 47 | // speech/noise likelihood |
| 48 | #define HIST_PAR_EST 1000 // histogram size for estimation of parameters |
| 49 | #define GAMMA_PAUSE 0.05f // update for conservative noise estimate |
| 50 | // |
| 51 | #define B_LIM 0.5f // threshold in final energy gain factor calculation |
| 52 | #endif // MODULES_AUDIO_PROCESSING_LEGACY_NS_DEFINES_H_ |