| Index: webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
|
| diff --git a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
|
| index 7f18be8c6e4ef7e428c5bb73331ed84408f9cf15..a858d3c67f11b5ceec9d503d88ff0103a0ced574 100644
|
| --- a/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
|
| +++ b/webrtc/modules/audio_processing/intelligibility/intelligibility_enhancer.h
|
| @@ -43,12 +43,12 @@ class IntelligibilityEnhancer {
|
| // TODO(bercic): the |cv_*|, |*_rate| and |gain_limit| parameters should
|
| // probably go away once fine tuning is done. They override the internal
|
| // constants in the class (kGainChangeLimit, kAnalyzeRate, kVarianceRate).
|
| - IntelligibilityEnhancer(int erb_resolution,
|
| + IntelligibilityEnhancer(size_t erb_resolution,
|
| int sample_rate_hz,
|
| int channels,
|
| int cv_type,
|
| float cv_alpha,
|
| - int cv_win,
|
| + size_t cv_win,
|
| int analysis_rate,
|
| int variance_rate,
|
| float gain_limit);
|
| @@ -75,7 +75,7 @@ class IntelligibilityEnhancer {
|
| // intelligibility enhancement, and writes result to |out_block|.
|
| void ProcessAudioBlock(const std::complex<float>* const* in_block,
|
| int in_channels,
|
| - int frames,
|
| + size_t frames,
|
| int out_channels,
|
| std::complex<float>* const* out_block) override;
|
|
|
| @@ -111,26 +111,26 @@ class IntelligibilityEnhancer {
|
| std::complex<float>* out_block);
|
|
|
| // Returns number of ERB filters.
|
| - static int GetBankSize(int sample_rate, int erb_resolution);
|
| + static size_t GetBankSize(int sample_rate, size_t erb_resolution);
|
|
|
| // Initializes ERB filterbank.
|
| void CreateErbBank();
|
|
|
| // Analytically solves quadratic for optimal gains given |lambda|.
|
| // Negative gains are set to 0. Stores the results in |sols|.
|
| - void SolveForGainsGivenLambda(float lambda, int start_freq, float* sols);
|
| + void SolveForGainsGivenLambda(float lambda, size_t start_freq, float* sols);
|
|
|
| // Computes variance across ERB filters from freq variance |var|.
|
| // Stores in |result|.
|
| void FilterVariance(const float* var, float* result);
|
|
|
| // Returns dot product of vectors specified by size |length| arrays |a|,|b|.
|
| - static float DotProduct(const float* a, const float* b, int length);
|
| + static float DotProduct(const float* a, const float* b, size_t length);
|
|
|
| - const int freqs_; // Num frequencies in frequency domain.
|
| - const int window_size_; // Window size in samples; also the block size.
|
| - const int chunk_length_; // Chunk size in samples.
|
| - const int bank_size_; // Num ERB filters.
|
| + const size_t freqs_; // Num frequencies in frequency domain.
|
| + const size_t window_size_; // Window size in samples; also the block size.
|
| + const size_t chunk_length_; // Chunk size in samples.
|
| + const size_t bank_size_; // Num ERB filters.
|
| const int sample_rate_hz_;
|
| const int erb_resolution_;
|
| const int channels_; // Num channels.
|
| @@ -143,7 +143,7 @@ class IntelligibilityEnhancer {
|
| rtc::scoped_ptr<float[]> filtered_noise_var_;
|
| std::vector<std::vector<float>> filter_bank_;
|
| rtc::scoped_ptr<float[]> center_freqs_;
|
| - int start_freq_;
|
| + size_t start_freq_;
|
| rtc::scoped_ptr<float[]> rho_; // Production and interpretation SNR.
|
| // for each ERB band.
|
| rtc::scoped_ptr<float[]> gains_eq_; // Pre-filter modified gains.
|
|
|