Miscellaneous changes split from https://codereview.webrtc.org/1230503003 .
These are mostly trivial changes and are separated out just to reduce the diff on that change to the minimum possible. Note explanatory comments on patch set 1. BUG=none TEST=none Review URL: https://codereview.webrtc.org/1235643003 Cr-Commit-Position: refs/heads/master@{#9617}
This commit is contained in:
@ -120,7 +120,7 @@ complex<float> ConjugateDotProduct(const ComplexMatrix<float>& lhs,
|
||||
|
||||
// Works for positive numbers only.
|
||||
int Round(float x) {
|
||||
return std::floor(x + 0.5f);
|
||||
return static_cast<int>(std::floor(x + 0.5f));
|
||||
}
|
||||
|
||||
// Calculates the sum of absolute values of a complex matrix.
|
||||
@ -464,9 +464,9 @@ void NonlinearBeamformer::ApplyMaskFrequencySmoothing() {
|
||||
final_mask_[i] = kMaskFrequencySmoothAlpha * final_mask_[i] +
|
||||
(1 - kMaskFrequencySmoothAlpha) * final_mask_[i - 1];
|
||||
}
|
||||
for (int i = high_mean_end_bin_; i >= 0; --i) {
|
||||
final_mask_[i] = kMaskFrequencySmoothAlpha * final_mask_[i] +
|
||||
(1 - kMaskFrequencySmoothAlpha) * final_mask_[i + 1];
|
||||
for (int i = high_mean_end_bin_ + 1; i > 0; --i) {
|
||||
final_mask_[i - 1] = kMaskFrequencySmoothAlpha * final_mask_[i - 1] +
|
||||
(1 - kMaskFrequencySmoothAlpha) * final_mask_[i];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user