commit 4064e88df25766f35614bb4df9fe24ea8657d672
parent 4ff9528031a75a07ee94db17c5a8e3eea72025f2
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 1 Dec 2025 20:01:59 -0700
Bug 2000941 - Vendor libwebrtc from aa03961511
Upstream commit: https://webrtc.googlesource.com/src/+/aa0396151102fbf24f774c3ff4e95a5a589b1a3a
Do not assume 16-bit alignment when loading the accumulated error data.
Bug: webrtc:444050112
Change-Id: I7e0c1483bacad861bacc4f3aaf84a21a899f80f8
Co-authored-by: Lionel Koenig Gélas <lionelk@webrtc.org>
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/409061
Commit-Queue: Jesus de Vicente Pena <devicentepena@webrtc.org>
Reviewed-by: Gustaf Ullberg <gustaf@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45635}
Diffstat:
2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/third_party/libwebrtc/README.mozilla.last-vendor b/third_party/libwebrtc/README.mozilla.last-vendor
@@ -1,4 +1,4 @@
# ./mach python dom/media/webrtc/third_party_build/vendor-libwebrtc.py --from-local /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T02:59:11.250671+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T03:01:39.155804+00:00.
# base of lastest vendoring
-42036e8ca6
+aa03961511
diff --git a/third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_avx2.cc b/third_party/libwebrtc/modules/audio_processing/aec3/matched_filter_avx2.cc
@@ -46,7 +46,6 @@ void MatchedFilterCore_AccumulatedError_AVX2(size_t x_start_index,
const int x_size = static_cast<int>(x.size());
RTC_DCHECK_EQ(0, h_size % 16);
std::fill(accumulated_error.begin(), accumulated_error.end(), 0.0f);
-
// Process for all samples in the sub-block.
for (size_t i = 0; i < y.size(); ++i) {
// Apply the matched filter as filter * x, and compute x * x.
@@ -69,7 +68,7 @@ void MatchedFilterCore_AccumulatedError_AVX2(size_t x_start_index,
__m256 x2_sum_256_8 = _mm256_set1_ps(0);
__m128 e_128;
float x2_sum = 0.0f;
- float s_acum = 0;
+ float s_acum = 0.0f;
const int limit_by_16 = h_size >> 4;
for (int k = limit_by_16; k > 0; --k, h_p += 16, x_p += 16, a_p += 4) {
// Load the data into 256 bit vectors.
@@ -93,7 +92,7 @@ void MatchedFilterCore_AccumulatedError_AVX2(size_t x_start_index,
s_acum += s_inst_hadd_256[5];
e_128[3] = s_acum - y[i];
- __m128 acum_error = _mm_load_ps(a_p);
+ __m128 acum_error = _mm_loadu_ps(a_p);
acum_error = _mm_fmadd_ps(e_128, e_128, acum_error);
_mm_storeu_ps(a_p, acum_error);
}