commit b5a44b7649900dbc52cc81978cf1c51bf07e53f7
parent 82736d0761dcf67e1e22af7a0927829c58b1f85a
Author: Michael Froman <mfroman@mozilla.com>
Date: Thu, 9 Oct 2025 13:14:55 -0500
Bug 1993083 - Vendor libwebrtc from adecfb681f
Upstream commit: https://webrtc.googlesource.com/src/+/adecfb681f7bbca40f558d458652f8791307f953
Fix discrepancy when std_dev = 0.
Bug: webrtc:431021030
Change-Id: Ib19ce5a1d7955e93ae9eac2d7afe772b5263831f
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/400020
Reviewed-by: Erik Språng <sprang@webrtc.org>
Commit-Queue: Fanny Linderborg <linderborg@webrtc.org>
Reviewed-by: Fanny Linderborg <linderborg@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45136}
Diffstat:
2 files changed, 10 insertions(+), 4 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 /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc --commit mozpatches libwebrtc
-libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T18:13:26.931627+00:00.
+libwebrtc updated from /home/mfroman/mozilla/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-09T18:14:46.148322+00:00.
# base of lastest vendoring
-9f42d00a21
+adecfb681f
diff --git a/third_party/libwebrtc/video/corruption_detection/halton_frame_sampler.cc b/third_party/libwebrtc/video/corruption_detection/halton_frame_sampler.cc
@@ -111,8 +111,14 @@ double GetFilteredElement(const VideoFrameSampler& frame_sampler,
RTC_CHECK_LT(row, frame_sampler.height(channel));
RTC_CHECK_GE(column, 0);
RTC_CHECK_LT(column, frame_sampler.width(channel));
- RTC_CHECK_GT(std_dev, 0.0)
- << "Standard deviation = 0 yields improper Gaussian weights.";
+ RTC_CHECK_GE(std_dev, 0.0);
+
+ // `std_dev` being zero should ideally correspond to a very low QP value. In
+ // this case even a noisy pixel should be able to be encoded and transmitted
+ // correctly. Hence, the pixel value can be used as is.
+ if (std_dev == 0.0) {
+ return frame_sampler.GetSampleValue(channel, column, row);
+ }
int max_distance =
std::ceil(std::sqrt(-2.0 * std::log(kCutoff) * std::pow(std_dev, 2.0))) -