commit 4c304ab1e0752d20ab299df0b61172deac7f8da0 parent e3db6a957e72c73661cc4bc71f052e08f6bf6e08 Author: Dan Baker <dbaker@mozilla.com> Date: Wed, 22 Oct 2025 15:14:48 -0600 Bug 1995393 - Vendor libwebrtc from 684e8494e0 Upstream commit: https://webrtc.googlesource.com/src/+/684e8494e08b4376f356c9d1beb635ca7e071499 Create api/video/corruption_detection directory. This CL adds a new corruption_detection subdirector in api/video and moves corruption_detection_filter_settings.h there. The intent is to expose more parts of the corruption detection code in this directory to make integration in external systems easier. Bug: webrtc:358039777 Change-Id: I4dc8fc8b1d146616aeebfc6bd845a880944b4449 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/403700 Commit-Queue: Mirko Bonadei <mbonadei@webrtc.org> Reviewed-by: Mirko Bonadei <mbonadei@webrtc.org> Auto-Submit: Erik Språng <sprang@webrtc.org> Cr-Commit-Position: refs/heads/main@{#45314} Diffstat:
18 files changed, 70 insertions(+), 36 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-10-22T21:12:10.456978+00:00. +libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-10-22T21:14:31.120179+00:00. # base of lastest vendoring -3200a0b030 +684e8494e0 diff --git a/third_party/libwebrtc/api/video/BUILD.gn b/third_party/libwebrtc/api/video/BUILD.gn @@ -144,9 +144,11 @@ rtc_source_set("resolution") { deps = [ "../../rtc_base/system:rtc_export" ] } +# TODO: bugs.webrtc.org/358039777 - Remove when safe. rtc_source_set("corruption_detection_filter_settings") { visibility = [ "*" ] sources = [ "corruption_detection_filter_settings.h" ] + deps = [ "corruption_detection:filter_settings" ] } rtc_library("encoded_image") { @@ -156,7 +158,6 @@ rtc_library("encoded_image") { "encoded_image.h", ] deps = [ - ":corruption_detection_filter_settings", ":video_codec_constants", ":video_frame", ":video_frame_type", @@ -171,6 +172,7 @@ rtc_library("encoded_image") { "../../rtc_base:refcount", "../../rtc_base/system:rtc_export", "../units:timestamp", + "corruption_detection:filter_settings", ] } diff --git a/third_party/libwebrtc/api/video/corruption_detection/BUILD.gn b/third_party/libwebrtc/api/video/corruption_detection/BUILD.gn @@ -0,0 +1,14 @@ +# Copyright (c) 2025 The WebRTC project authors. All Rights Reserved. +# +# Use of this source code is governed by a BSD-style license +# that can be found in the LICENSE file in the root of the source +# tree. An additional intellectual property rights grant can be found +# in the file PATENTS. All contributing project authors may +# be found in the AUTHORS file in the root of the source tree. + +import("../../../webrtc.gni") + +rtc_source_set("filter_settings") { + visibility = [ "*" ] + sources = [ "corruption_detection_filter_settings.h" ] +} diff --git a/third_party/libwebrtc/api/video/corruption_detection/corruption_detection_filter_settings.h b/third_party/libwebrtc/api/video/corruption_detection/corruption_detection_filter_settings.h @@ -0,0 +1,31 @@ +/* + * Copyright (c) 2024 The WebRTC project authors. All Rights Reserved. + * + * Use of this source code is governed by a BSD-style license + * that can be found in the LICENSE file in the root of the source + * tree. An additional intellectual property rights grant can be found + * in the file PATENTS. All contributing project authors may + * be found in the AUTHORS file in the root of the source tree. + */ + +#ifndef API_VIDEO_CORRUPTION_DETECTION_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ +#define API_VIDEO_CORRUPTION_DETECTION_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ + +#include <stdint.h> + +namespace webrtc { + +// Filter settings for automatic corruption detection. See +// http://www.webrtc.org/experiments/rtp-hdrext/corruption-detection for more +// information. +struct CorruptionDetectionFilterSettings { + // Size of the blur kernel used. + double std_dev = 0.0; + // Allowed error thresholds (maps to `Y err` and `UV err` respectively). + int luma_error_threshold = 0; + int chroma_error_threshold = 0; +}; + +} // namespace webrtc + +#endif // API_VIDEO_CORRUPTION_DETECTION_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ diff --git a/third_party/libwebrtc/api/video/corruption_detection_filter_settings.h b/third_party/libwebrtc/api/video/corruption_detection_filter_settings.h @@ -11,21 +11,8 @@ #ifndef API_VIDEO_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ #define API_VIDEO_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ -#include <stdint.h> +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" -namespace webrtc { - -// Filter settings for automatic corruption detection. See -// http://www.webrtc.org/experiments/rtp-hdrext/corruption-detection for more -// information. -struct CorruptionDetectionFilterSettings { - // Size of the blur kernel used. - double std_dev = 0.0; - // Allowed error thresholds (maps to `Y err` and `UV err` respectively). - int luma_error_threshold = 0; - int chroma_error_threshold = 0; -}; - -} // namespace webrtc +// TODO: bugs.webrtc.org/358039777 - Remove this file when safe to do so. #endif // API_VIDEO_CORRUPTION_DETECTION_FILTER_SETTINGS_H_ diff --git a/third_party/libwebrtc/api/video/encoded_image.h b/third_party/libwebrtc/api/video/encoded_image.h @@ -23,7 +23,7 @@ #include "api/scoped_refptr.h" #include "api/units/timestamp.h" #include "api/video/color_space.h" -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/video_codec_constants.h" #include "api/video/video_content_type.h" #include "api/video/video_frame_type.h" diff --git a/third_party/libwebrtc/modules/video_coding/BUILD.gn b/third_party/libwebrtc/modules/video_coding/BUILD.gn @@ -444,7 +444,6 @@ rtc_library("video_coding_utility") { "../../api/task_queue", "../../api/units:data_rate", "../../api/units:time_delta", - "../../api/video:corruption_detection_filter_settings", "../../api/video:encoded_frame", "../../api/video:encoded_image", "../../api/video:video_adaptation", @@ -453,6 +452,7 @@ rtc_library("video_coding_utility") { "../../api/video:video_codec_constants", "../../api/video:video_frame", "../../api/video:video_frame_type", + "../../api/video/corruption_detection:filter_settings", "../../api/video_codecs:video_codecs_api", "../../common_video", "../../modules/rtp_rtcp", @@ -1297,7 +1297,6 @@ if (rtc_include_tests) { "../../api/units:time_delta", "../../api/units:timestamp", "../../api/video:builtin_video_bitrate_allocator_factory", - "../../api/video:corruption_detection_filter_settings", "../../api/video:encoded_frame", "../../api/video:encoded_image", "../../api/video:frame_buffer", @@ -1310,6 +1309,7 @@ if (rtc_include_tests) { "../../api/video:video_frame", "../../api/video:video_frame_type", "../../api/video:video_rtp_headers", + "../../api/video/corruption_detection:filter_settings", "../../api/video_codecs:scalability_mode", "../../api/video_codecs:video_codecs_api", "../../api/video_codecs:vp8_temporal_layers_factory", diff --git a/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator.cc b/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator.cc @@ -14,7 +14,7 @@ #include <cmath> #include <variant> -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "rtc_base/checks.h" namespace webrtc { diff --git a/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator.h b/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator.h @@ -14,7 +14,7 @@ #include <optional> #include <variant> -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" namespace webrtc { diff --git a/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator_unittest.cc b/third_party/libwebrtc/modules/video_coding/utility/corruption_detection_settings_generator_unittest.cc @@ -10,7 +10,7 @@ #include "modules/video_coding/utility/corruption_detection_settings_generator.h" -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "test/gmock.h" #include "test/gtest.h" diff --git a/third_party/libwebrtc/moz-patch-stack/s0101.patch b/third_party/libwebrtc/moz-patch-stack/s0101.patch @@ -39,7 +39,7 @@ index 0f2341a462..51d055bcf0 100644 group("media") { diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn -index b0dd69877b..959bea0ab4 100644 +index 2ef666d59a..2eddb81fd7 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -7,7 +7,7 @@ diff --git a/third_party/libwebrtc/moz-patch-stack/s0103.patch b/third_party/libwebrtc/moz-patch-stack/s0103.patch @@ -246,7 +246,7 @@ index 40714b196e..2c6b39f59e 100644 if (rtc_include_tests) { diff --git a/api/video/BUILD.gn b/api/video/BUILD.gn -index e621f9c088..e4c80260d4 100644 +index cd74281a22..16af840261 100644 --- a/api/video/BUILD.gn +++ b/api/video/BUILD.gn @@ -8,8 +8,8 @@ @@ -588,7 +588,7 @@ index a693604389..72972d18e1 100644 import("../../webrtc.gni") diff --git a/modules/video_coding/BUILD.gn b/modules/video_coding/BUILD.gn -index 959bea0ab4..2f8b9c0df1 100644 +index 2eddb81fd7..11da028bd3 100644 --- a/modules/video_coding/BUILD.gn +++ b/modules/video_coding/BUILD.gn @@ -6,7 +6,7 @@ diff --git a/third_party/libwebrtc/video/corruption_detection/BUILD.gn b/third_party/libwebrtc/video/corruption_detection/BUILD.gn @@ -48,10 +48,10 @@ rtc_library("frame_instrumentation_generator") { ":generic_mapping_functions", ":halton_frame_sampler", "../../api:scoped_refptr", - "../../api/video:corruption_detection_filter_settings", "../../api/video:encoded_image", "../../api/video:video_frame", "../../api/video:video_frame_type", + "../../api/video/corruption_detection:filter_settings", "../../api/video_codecs:video_codecs_api", "../../common_video:frame_instrumentation_data", "../../modules:module_api_public", @@ -75,8 +75,8 @@ rtc_library("frame_pair_corruption_score") { ":halton_frame_sampler", ":utils", "../../api:scoped_refptr", - "../../api/video:corruption_detection_filter_settings", "../../api/video:video_frame", + "../../api/video/corruption_detection:filter_settings", "../../rtc_base:checks", "//third_party/abseil-cpp/absl/strings:string_view", ] @@ -88,8 +88,8 @@ rtc_library("generic_mapping_functions") { "generic_mapping_functions.h", ] deps = [ - "../../api/video:corruption_detection_filter_settings", "../../api/video:video_frame", + "../../api/video/corruption_detection:filter_settings", "../../api/video_codecs:video_codecs_api", "../../rtc_base:checks", ] @@ -176,10 +176,10 @@ if (rtc_include_tests) { ":frame_instrumentation_generator", "../../api:make_ref_counted", "../../api:scoped_refptr", - "../../api/video:corruption_detection_filter_settings", "../../api/video:encoded_image", "../../api/video:video_frame", "../../api/video:video_frame_type", + "../../api/video/corruption_detection:filter_settings", "../../common_video:frame_instrumentation_data", "../../rtc_base:refcount", "../../test:test_support", diff --git a/third_party/libwebrtc/video/corruption_detection/frame_instrumentation_generator.cc b/third_party/libwebrtc/video/corruption_detection/frame_instrumentation_generator.cc @@ -19,7 +19,7 @@ #include <vector> #include "absl/algorithm/container.h" -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/encoded_image.h" #include "api/video/video_codec_type.h" #include "api/video/video_frame.h" diff --git a/third_party/libwebrtc/video/corruption_detection/frame_instrumentation_generator_unittest.cc b/third_party/libwebrtc/video/corruption_detection/frame_instrumentation_generator_unittest.cc @@ -18,7 +18,7 @@ #include "api/make_ref_counted.h" #include "api/scoped_refptr.h" -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/encoded_image.h" #include "api/video/i420_buffer.h" #include "api/video/video_codec_type.h" diff --git a/third_party/libwebrtc/video/corruption_detection/frame_pair_corruption_score.cc b/third_party/libwebrtc/video/corruption_detection/frame_pair_corruption_score.cc @@ -15,7 +15,7 @@ #include "absl/strings/string_view.h" #include "api/scoped_refptr.h" -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/video_frame.h" #include "api/video/video_frame_buffer.h" #include "rtc_base/checks.h" diff --git a/third_party/libwebrtc/video/corruption_detection/generic_mapping_functions.cc b/third_party/libwebrtc/video/corruption_detection/generic_mapping_functions.cc @@ -12,7 +12,7 @@ #include <cmath> -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/video_codec_type.h" #include "api/video_codecs/video_codec.h" #include "rtc_base/checks.h" diff --git a/third_party/libwebrtc/video/corruption_detection/generic_mapping_functions.h b/third_party/libwebrtc/video/corruption_detection/generic_mapping_functions.h @@ -11,7 +11,7 @@ #ifndef VIDEO_CORRUPTION_DETECTION_GENERIC_MAPPING_FUNCTIONS_H_ #define VIDEO_CORRUPTION_DETECTION_GENERIC_MAPPING_FUNCTIONS_H_ -#include "api/video/corruption_detection_filter_settings.h" +#include "api/video/corruption_detection/corruption_detection_filter_settings.h" #include "api/video/video_codec_type.h" namespace webrtc {