From 12f9d5ce601a13cd45d56f40ed9ed94f3a90d91e Mon Sep 17 00:00:00 2001 From: Sergey Silkin Date: Fri, 26 Jul 2024 08:06:08 +0000 Subject: [PATCH] Revert "Update support for missing HIGH profiles and 1080p" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This reverts commit 46b43e007296737751aea10685f92ddf4df63e0d. Reason for revert: chromium:354143228 Original change's description: > Update support for missing HIGH profiles and 1080p > > The High and ConstrainedHigh profiles are missing from the decoder capabilities. Also level 3.1 doesn't allow 1080p > > Bug: webrtc:347724928 > Change-Id: I3f33468327d2aaf352fc80f69d2ee31481bafcb5 > Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/355001 > Reviewed-by: Sergey Silkin > Reviewed-by: Åsa Persson > Commit-Queue: Sergey Silkin > Cr-Commit-Position: refs/heads/main@{#42528} Bug: webrtc:347724928 Change-Id: I4d55b2982aca2e94ec983473336c4fa2a72d842f Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/357861 Reviewed-by: Danil Chapovalov Commit-Queue: Sergey Silkin Cr-Commit-Position: refs/heads/main@{#42675} --- modules/video_coding/codecs/h264/h264.cc | 26 +++++++------------ .../test/videocodec_test_fixture_impl.cc | 2 +- 2 files changed, 11 insertions(+), 17 deletions(-) diff --git a/modules/video_coding/codecs/h264/h264.cc b/modules/video_coding/codecs/h264/h264.cc index b2deda5ea8..60142c88c1 100644 --- a/modules/video_coding/codecs/h264/h264.cc +++ b/modules/video_coding/codecs/h264/h264.cc @@ -90,17 +90,17 @@ std::vector SupportedH264Codecs(bool add_scalability_modes) { // // We support both packetization modes 0 (mandatory) and 1 (optional, // preferred). - return {CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel4_2, + return {CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel3_1, "1", add_scalability_modes), - CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel4_2, + CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel3_1, "0", add_scalability_modes), CreateH264Format(H264Profile::kProfileConstrainedBaseline, - H264Level::kLevel4_2, "1", add_scalability_modes), + H264Level::kLevel3_1, "1", add_scalability_modes), CreateH264Format(H264Profile::kProfileConstrainedBaseline, - H264Level::kLevel4_2, "0", add_scalability_modes), - CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel4_2, "1", + H264Level::kLevel3_1, "0", add_scalability_modes), + CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel3_1, "1", add_scalability_modes), - CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel4_2, "0", + CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel3_1, "0", add_scalability_modes)}; } @@ -111,18 +111,12 @@ std::vector SupportedH264DecoderCodecs() { std::vector supportedCodecs = SupportedH264Codecs(); + // OpenH264 doesn't yet support High Predictive 4:4:4 encoding but it does + // support decoding. supportedCodecs.push_back(CreateH264Format( - H264Profile::kProfileConstrainedHigh, H264Level::kLevel4_2, "1")); + H264Profile::kProfilePredictiveHigh444, H264Level::kLevel3_1, "1")); supportedCodecs.push_back(CreateH264Format( - H264Profile::kProfileConstrainedHigh, H264Level::kLevel4_2, "0")); - supportedCodecs.push_back( - CreateH264Format(H264Profile::kProfileHigh, H264Level::kLevel4_2, "1")); - supportedCodecs.push_back( - CreateH264Format(H264Profile::kProfileHigh, H264Level::kLevel4_2, "0")); - supportedCodecs.push_back(CreateH264Format( - H264Profile::kProfilePredictiveHigh444, H264Level::kLevel4_2, "1")); - supportedCodecs.push_back(CreateH264Format( - H264Profile::kProfilePredictiveHigh444, H264Level::kLevel4_2, "0")); + H264Profile::kProfilePredictiveHigh444, H264Level::kLevel3_1, "0")); return supportedCodecs; } diff --git a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc index 03a8beca23..40569597f3 100644 --- a/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc +++ b/modules/video_coding/codecs/test/videocodec_test_fixture_impl.cc @@ -178,7 +178,7 @@ SdpVideoFormat CreateSdpVideoFormat( CodecParameterMap codec_params = { {cricket::kH264FmtpProfileLevelId, *H264ProfileLevelIdToString(H264ProfileLevelId( - config.h264_codec_settings.profile, H264Level::kLevel4_2))}, + config.h264_codec_settings.profile, H264Level::kLevel3_1))}, {cricket::kH264FmtpPacketizationMode, packetization_mode}, {cricket::kH264FmtpLevelAsymmetryAllowed, "1"}};