commit 002250d8dc426c6a2b2cab22e69ed4692afc4801
parent 4329dac0842c9450002c34ab269bd234e89c813f
Author: Dan Baker <dbaker@mozilla.com>
Date: Mon, 1 Dec 2025 21:50:26 -0700
Bug 2000941 - Vendor libwebrtc from 251e7d8d82
Upstream commit: https://webrtc.googlesource.com/src/+/251e7d8d82fc3d5e9593d989f8aa1d92f43d7adf
Allign IsSameCodecSpecific implementation to have keep consistent behavior for AV1 Video Codec
BUG=webrtc:396434695
Change-Id: Ia8367a94947617856711b2fd2cbe3ab136df8ab9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/407447
Commit-Queue: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Henrik Boström <hbos@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#45677}
Diffstat:
4 files changed, 18 insertions(+), 27 deletions(-)
diff --git a/third_party/libwebrtc/AUTHORS b/third_party/libwebrtc/AUTHORS
@@ -76,6 +76,7 @@ Jie Mao <maojie0924@gmail.com>
Jiwon Kim <jwkim0000@gmail.com>
Johnny Wong <hellojinqiang@gmail.com>
Jose Antonio Olivera Ortega <josea.olivera@gmail.com>
+Kacper Wasniowski <kwasniow@cisco.com>
Karim Hammache <karim@karhm.com>
Keiichi Enomoto <enm10k@gmail.com>
Kiran Thind <kiran.thind@gmail.com>
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-02T04:47:51.927440+00:00.
+libwebrtc updated from /Users/danielbaker/elm/.moz-fast-forward/moz-libwebrtc commit mozpatches on 2025-12-02T04:50:11.748946+00:00.
# base of lastest vendoring
-ef224d4c36
+251e7d8d82
diff --git a/third_party/libwebrtc/api/video_codecs/sdp_video_format.cc b/third_party/libwebrtc/api/video_codecs/sdp_video_format.cc
@@ -59,28 +59,6 @@ bool H264IsSamePacketizationMode(const CodecParameterMap& left,
H264GetPacketizationModeOrDefault(right);
}
-std::string AV1GetTierOrDefault(const CodecParameterMap& params) {
- // If the parameter is not present, the tier MUST be inferred to be 0.
- // https://aomediacodec.github.io/av1-rtp-spec/#72-sdp-parameters
- return GetFmtpParameterOrDefault(params, kAv1FmtpTier, "0");
-}
-
-bool AV1IsSameTier(const CodecParameterMap& left,
- const CodecParameterMap& right) {
- return AV1GetTierOrDefault(left) == AV1GetTierOrDefault(right);
-}
-
-std::string AV1GetLevelIdxOrDefault(const CodecParameterMap& params) {
- // If the parameter is not present, it MUST be inferred to be 5 (level 3.1).
- // https://aomediacodec.github.io/av1-rtp-spec/#72-sdp-parameters
- return GetFmtpParameterOrDefault(params, kAv1FmtpLevelIdx, "5");
-}
-
-bool AV1IsSameLevelIdx(const CodecParameterMap& left,
- const CodecParameterMap& right) {
- return AV1GetLevelIdxOrDefault(left) == AV1GetLevelIdxOrDefault(right);
-}
-
#ifdef RTC_ENABLE_H265
std::string GetH265TxModeOrDefault(const CodecParameterMap& params) {
// If TxMode is not present, a value of "SRST" must be inferred.
@@ -113,9 +91,12 @@ bool IsSameCodecSpecific(const std::string& name1,
case kVideoCodecVP9:
return VP9IsSameProfile(params1, params2);
case kVideoCodecAV1:
- return AV1IsSameProfile(params1, params2) &&
- AV1IsSameTier(params1, params2) &&
- AV1IsSameLevelIdx(params1, params2);
+ // https://aomediacodec.github.io/av1-rtp-spec/#723-usage-with-the-sdp-offeranswer-model
+ // These media configuration parameters are asymmetrical and the
+ // answerer MAY declare its own media configuration
+ // TODO(bugs.webrtc.org/396434695): for backward compability we currently
+ // compare profile.
+ return AV1IsSameProfile(params1, params2);
#ifdef RTC_ENABLE_H265
case kVideoCodecH265:
return H265IsSameProfile(params1, params2) &&
diff --git a/third_party/libwebrtc/api/video_codecs/test/sdp_video_format_unittest.cc b/third_party/libwebrtc/api/video_codecs/test/sdp_video_format_unittest.cc
@@ -85,6 +85,15 @@ TEST(SdpVideoFormatTest, SameCodecNameDifferentParameters) {
.IsSameCodec(Sdp("AV1", Params{{"profile", "1"}})));
EXPECT_FALSE(Sdp("AV1", Params{{"profile", "1"}})
.IsSameCodec(Sdp("AV1", Params{{"profile", "2"}})));
+ // AV1 entries with same profile and different tier are seen as equal.
+ EXPECT_TRUE(
+ Sdp("AV1", Params{{"profile", "1"}, {"tier", "1"}})
+ .IsSameCodec(Sdp("AV1", Params{{"profile", "1"}, {"tier", "2"}})));
+ // AV1 entries with same profile and different level are seen as equal.
+ EXPECT_TRUE(Sdp("AV1", Params{{"profile", "1"}, {"level-idx", "1"}})
+ .IsSameCodec(Sdp(
+ "AV1", Params{{"profile", "1"}, {"level-idx", "2"}})));
+
#ifdef RTC_ENABLE_H265
EXPECT_FALSE(Sdp("H265").IsSameCodec(Sdp(
"H265",