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 <ssilkin@webrtc.org>
Reviewed-by: Åsa Persson <asapersson@webrtc.org>
Commit-Queue: Sergey Silkin <ssilkin@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42528}
This commit is contained in:
Sergio Garcia Murillo 2024-06-19 15:33:21 +02:00 committed by WebRTC LUCI CQ
parent 12b861ef29
commit 46b43e0072
2 changed files with 17 additions and 11 deletions

View File

@ -90,17 +90,17 @@ std::vector<SdpVideoFormat> SupportedH264Codecs(bool add_scalability_modes) {
//
// We support both packetization modes 0 (mandatory) and 1 (optional,
// preferred).
return {CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel3_1,
return {CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel4_2,
"1", add_scalability_modes),
CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel3_1,
CreateH264Format(H264Profile::kProfileBaseline, H264Level::kLevel4_2,
"0", add_scalability_modes),
CreateH264Format(H264Profile::kProfileConstrainedBaseline,
H264Level::kLevel3_1, "1", add_scalability_modes),
H264Level::kLevel4_2, "1", add_scalability_modes),
CreateH264Format(H264Profile::kProfileConstrainedBaseline,
H264Level::kLevel3_1, "0", add_scalability_modes),
CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel3_1, "1",
H264Level::kLevel4_2, "0", add_scalability_modes),
CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel4_2, "1",
add_scalability_modes),
CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel3_1, "0",
CreateH264Format(H264Profile::kProfileMain, H264Level::kLevel4_2, "0",
add_scalability_modes)};
}
@ -111,12 +111,18 @@ std::vector<SdpVideoFormat> SupportedH264DecoderCodecs() {
std::vector<SdpVideoFormat> supportedCodecs = SupportedH264Codecs();
// OpenH264 doesn't yet support High Predictive 4:4:4 encoding but it does
// support decoding.
supportedCodecs.push_back(CreateH264Format(
H264Profile::kProfilePredictiveHigh444, H264Level::kLevel3_1, "1"));
H264Profile::kProfileConstrainedHigh, H264Level::kLevel4_2, "1"));
supportedCodecs.push_back(CreateH264Format(
H264Profile::kProfilePredictiveHigh444, H264Level::kLevel3_1, "0"));
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"));
return supportedCodecs;
}

View File

@ -173,7 +173,7 @@ SdpVideoFormat CreateSdpVideoFormat(
CodecParameterMap codec_params = {
{cricket::kH264FmtpProfileLevelId,
*H264ProfileLevelIdToString(H264ProfileLevelId(
config.h264_codec_settings.profile, H264Level::kLevel3_1))},
config.h264_codec_settings.profile, H264Level::kLevel4_2))},
{cricket::kH264FmtpPacketizationMode, packetization_mode},
{cricket::kH264FmtpLevelAsymmetryAllowed, "1"}};