Optimize the three band filter bank.
Reducing pointer following. This will allow the compiler to optimize more efficiently with the "-fno-strict-aliasing" flag. Bug: None Change-Id: I8e2d841fa543b28c59eb08c654a2b0515ab39d69 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/241780 Reviewed-by: Sam Zackrisson <saza@webrtc.org> Commit-Queue: Christian Schuldt <cschuldt@google.com> Cr-Commit-Position: refs/heads/main@{#35548}
This commit is contained in:
@ -211,8 +211,9 @@ void ThreeBandFilterBank::Analysis(
|
||||
|
||||
// Band and modulate the output.
|
||||
for (int band = 0; band < ThreeBandFilterBank::kNumBands; ++band) {
|
||||
float* out_band = out[band].data();
|
||||
for (int n = 0; n < kSplitBandSize; ++n) {
|
||||
out[band][n] += dct_modulation[band] * out_subsampled[n];
|
||||
out_band[n] += dct_modulation[band] * out_subsampled[n];
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -254,8 +255,9 @@ void ThreeBandFilterBank::Synthesis(
|
||||
std::fill(in_subsampled.begin(), in_subsampled.end(), 0.f);
|
||||
for (int band = 0; band < ThreeBandFilterBank::kNumBands; ++band) {
|
||||
RTC_DCHECK_EQ(in[band].size(), kSplitBandSize);
|
||||
const float* in_band = in[band].data();
|
||||
for (int n = 0; n < kSplitBandSize; ++n) {
|
||||
in_subsampled[n] += dct_modulation[band] * in[band][n];
|
||||
in_subsampled[n] += dct_modulation[band] * in_band[n];
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user