0

Add vvc profiles and codec string parsing.

This adds VVC profiles and codec string parsing following VVC spec and
ISO/IEC 14496-15.

Bug: 1417910
Change-Id: If6c493871f16353f4a999c77ea5e19586c57da73
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/4615727
Reviewed-by: Yuchen Liu <yucliu@chromium.org>
Commit-Queue: Jianlin Qiu <jianlin.qiu@intel.com>
Reviewed-by: Will Harris <wfh@chromium.org>
Reviewed-by: Dale Curtis <dalecurtis@chromium.org>
Reviewed-by: Zhenyao Mo <zmo@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1160328}
This commit is contained in:
Qiu Jianlin
2023-06-20 22:58:27 +00:00
committed by Chromium LUCI CQ
parent 98f4e5f59f
commit caae8720b6
16 changed files with 712 additions and 6 deletions

@ -66,6 +66,23 @@ CHECK_PROFILE_ENUM(HEVCPROFILE_SCREEN_EXTENDED);
CHECK_PROFILE_ENUM(HEVCPROFILE_SCALABLE_REXT);
CHECK_PROFILE_ENUM(HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED);
CHECK_PROFILE_ENUM(HEVCPROFILE_EXT_MAX);
CHECK_PROFILE_ENUM(VVCPROFILE_MIN);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN10);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12_INTRA);
CHECK_PROFILE_ENUM(VVCPROIFLE_MULTILAYER_MAIN10);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN10_444);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12_444);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN16_444);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12_444_INTRA);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN16_444_INTRA);
CHECK_PROFILE_ENUM(VVCPROFILE_MULTILAYER_MAIN10_444);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN10_STILL_PICTURE);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12_STILL_PICTURE);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN10_444_STILL_PICTURE);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN12_444_STILL_PICTURE);
CHECK_PROFILE_ENUM(VVCPROFILE_MAIN16_444_STILL_PICTURE);
CHECK_PROFILE_ENUM(VVCPROFILE_MAX);
CHECK_PROFILE_ENUM(VIDEO_CODEC_PROFILE_MAX);
#undef CHECK_PROFILE_ENUM
@ -121,6 +138,21 @@ bool EnumTraits<arc::mojom::VideoCodecProfile, media::VideoCodecProfile>::
case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_MAIN:
case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_HIGH:
case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_PRO:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN10:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA:
case arc::mojom::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE:
case arc::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444_STILL_PICTURE:
*output = static_cast<media::VideoCodecProfile>(input);
return true;
}

@ -67,7 +67,24 @@ enum VideoCodecProfile {
HEVCPROFILE_SCALABLE_REXT = 35,
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36,
HEVCPROFILE_EXT_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VVCPROFILE_MIN = 37,
VVCPROFILE_MAIN10 = VVCPROFILE_MIN,
VVCPROFILE_MAIN12 = 38,
VVCPROFILE_MAIN12_INTRA = 39,
VVCPROIFLE_MULTILAYER_MAIN10 = 40,
VVCPROFILE_MAIN10_444 = 41,
VVCPROFILE_MAIN12_444 = 42,
VVCPROFILE_MAIN16_444 = 43,
VVCPROFILE_MAIN12_444_INTRA = 44,
VVCPROFILE_MAIN16_444_INTRA = 45,
VVCPROFILE_MULTILAYER_MAIN10_444 = 46,
VVCPROFILE_MAIN10_STILL_PICTURE = 47,
VVCPROFILE_MAIN12_STILL_PICTURE = 48,
VVCPROFILE_MAIN10_444_STILL_PICTURE = 49,
VVCPROFILE_MAIN12_444_STILL_PICTURE = 50,
VVCPROFILE_MAIN16_444_STILL_PICTURE = 51,
VVCPROFILE_MAX = VVCPROFILE_MAIN16_444_STILL_PICTURE,
VIDEO_CODEC_PROFILE_MAX = VVCPROFILE_MAIN16_444_STILL_PICTURE,
};
[Extensible]

@ -151,6 +151,36 @@ VideoProfile ToCastVideoProfile(
return kAV1ProfileHigh;
case ::media::AV1PROFILE_PROFILE_PRO:
return kAV1ProfilePro;
case ::media::VVCPROFILE_MAIN10:
return kVVCProfileMain10;
case ::media::VVCPROFILE_MAIN12:
return kVVCProfileMain12;
case ::media::VVCPROFILE_MAIN12_INTRA:
return kVVCProfileMain12Intra;
case ::media::VVCPROIFLE_MULTILAYER_MAIN10:
return kVVCProfileMultilayerMain10;
case ::media::VVCPROFILE_MAIN10_444:
return kVVCProfileMain10444;
case ::media::VVCPROFILE_MAIN12_444:
return kVVCProfileMain12444;
case ::media::VVCPROFILE_MAIN16_444:
return kVVCProfileMain16444;
case ::media::VVCPROFILE_MAIN12_444_INTRA:
return kVVCProfileMain12444Intra;
case ::media::VVCPROFILE_MAIN16_444_INTRA:
return kVVCProfileMain16444Intra;
case ::media::VVCPROFILE_MULTILAYER_MAIN10_444:
return kVVCProfileMain10444;
case ::media::VVCPROFILE_MAIN10_STILL_PICTURE:
return kVVCProfileMain10Still;
case ::media::VVCPROFILE_MAIN12_STILL_PICTURE:
return kVVCProfileMain12Still;
case ::media::VVCPROFILE_MAIN10_444_STILL_PICTURE:
return kVVCProfileMain10444Still;
case ::media::VVCPROFILE_MAIN12_444_STILL_PICTURE:
return kVVCProfileMain12444Still;
case ::media::VVCPROFILE_MAIN16_444_STILL_PICTURE:
return kVVCProfileMain16444Still;
default:
LOG(INFO) << "Unsupported video codec profile " << codec_profile;
}

@ -151,9 +151,24 @@ enum VideoProfile : int {
kHEVCScreenExtended,
kHEVCScalableRext,
kHEVCHighThroughputScreenExtended,
kVVCProfileMain10,
kVVCProfileMain12,
kVVCProfileMain12Intra,
kVVCProfileMultilayerMain10,
kVVCProfileMain10444,
kVVCProfileMain12444,
kVVCProfileMain16444,
kVVCProfileMain12444Intra,
kVVCProfileMain16444Intra,
kVVCProfileMultilayerMain10444,
kVVCProfileMain10Still,
kVVCProfileMain12Still,
kVVCProfileMain10444Still,
kVVCProfileMain12444Still,
kVVCProfileMain16444Still,
kVideoProfileMin = kVideoProfileUnknown,
kVideoProfileMax = kHEVCHighThroughputScreenExtended,
kVideoProfileMax = kVVCProfileMain16444Still,
};
struct CodecProfileLevel {

@ -601,6 +601,36 @@ const char* GetProfileName(gpu::VideoCodecProfile profile) {
return "av1 profile high";
case gpu::AV1PROFILE_PROFILE_PRO:
return "av1 profile pro";
case gpu::VVCPROFILE_MAIN10:
return "vvc profile main10";
case gpu::VVCPROFILE_MAIN12:
return "vvc profile main12";
case gpu::VVCPROFILE_MAIN12_INTRA:
return "vvc profile main12 intra";
case gpu::VVCPROIFLE_MULTILAYER_MAIN10:
return "vvc profile multilayer main10";
case gpu::VVCPROFILE_MAIN10_444:
return "vvc profile main10 444";
case gpu::VVCPROFILE_MAIN12_444:
return "vvc profile main12 444";
case gpu::VVCPROFILE_MAIN16_444:
return "vvc profile main16 444";
case gpu::VVCPROFILE_MAIN12_444_INTRA:
return "vvc profile main12 444 intra";
case gpu::VVCPROFILE_MAIN16_444_INTRA:
return "vvc profile main16 444 intra";
case gpu::VVCPROFILE_MULTILAYER_MAIN10_444:
return "vvc profile multilayer main10 444";
case gpu::VVCPROFILE_MAIN10_STILL_PICTURE:
return "vvc profile main10 stillpicture";
case gpu::VVCPROFILE_MAIN12_STILL_PICTURE:
return "vvc profile main12 stillpicture";
case gpu::VVCPROFILE_MAIN10_444_STILL_PICTURE:
return "vvc profile main10 444 stillpicture";
case gpu::VVCPROFILE_MAIN12_444_STILL_PICTURE:
return "vvc profile main12 444 stillpicture";
case gpu::VVCPROFILE_MAIN16_444_STILL_PICTURE:
return "vvc profile main16 444 stillpicture";
}
NOTREACHED();
return "";

@ -127,7 +127,22 @@ enum VideoCodecProfile {
HEVCPROFILE_SCREEN_EXTENDED,
HEVCPROFILE_SCALABLE_REXT,
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VVCPROFILE_MAIN10,
VVCPROFILE_MAIN12,
VVCPROFILE_MAIN12_INTRA,
VVCPROIFLE_MULTILAYER_MAIN10,
VVCPROFILE_MAIN10_444,
VVCPROFILE_MAIN12_444,
VVCPROFILE_MAIN16_444,
VVCPROFILE_MAIN12_444_INTRA,
VVCPROFILE_MAIN16_444_INTRA,
VVCPROFILE_MULTILAYER_MAIN10_444,
VVCPROFILE_MAIN10_STILL_PICTURE,
VVCPROFILE_MAIN12_STILL_PICTURE,
VVCPROFILE_MAIN10_444_STILL_PICTURE,
VVCPROFILE_MAIN12_444_STILL_PICTURE,
VVCPROFILE_MAIN16_444_STILL_PICTURE,
VIDEO_CODEC_PROFILE_MAX = VVCPROFILE_MAIN16_444_STILL_PICTURE,
};
// Specification of a decoding profile supported by a hardware decoder.

@ -75,6 +75,21 @@ enum VideoCodecProfile {
HEVCPROFILE_SCREEN_EXTENDED,
HEVCPROFILE_SCALABLE_REXT,
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VVCPROFILE_MAIN10,
VVCPROFILE_MAIN12,
VVCPROFILE_MAIN12_INTRA,
VVCPROIFLE_MULTILAYER_MAIN10,
VVCPROFILE_MAIN10_444,
VVCPROFILE_MAIN12_444,
VVCPROFILE_MAIN16_444,
VVCPROFILE_MAIN12_444_INTRA,
VVCPROFILE_MAIN16_444_INTRA,
VVCPROFILE_MULTILAYER_MAIN10_444,
VVCPROFILE_MAIN10_STILL_PICTURE,
VVCPROFILE_MAIN12_STILL_PICTURE,
VVCPROFILE_MAIN10_444_STILL_PICTURE,
VVCPROFILE_MAIN12_444_STILL_PICTURE,
VVCPROFILE_MAIN16_444_STILL_PICTURE,
};
// gpu::VideoDecodeAcceleratorSupportedProfile

@ -121,6 +121,36 @@ EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::ToMojom(
return gpu::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_HIGH;
case gpu::VideoCodecProfile::AV1PROFILE_PROFILE_PRO:
return gpu::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_PRO;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN10:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA;
case gpu::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10:
return gpu::mojom::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN10_444:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN16_444:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA;
case gpu::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE;
case gpu::VideoCodecProfile::VVCPROFILE_MAIN16_444_STILL_PICTURE:
return gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE;
}
NOTREACHED() << "Invalid VideoCodecProfile:" << video_codec_profile;
return gpu::mojom::VideoCodecProfile::VIDEO_CODEC_PROFILE_UNKNOWN;
@ -247,6 +277,51 @@ bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::
case gpu::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_PRO:
*out = gpu::VideoCodecProfile::AV1PROFILE_PROFILE_PRO;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN10;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10:
*out = gpu::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN10_444;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN16_444;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444:
*out = gpu::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE;
return true;
case gpu::mojom::VideoCodecProfile::VVCPROFILE_MAIN16_444_STILL_PICTURE:
*out = gpu::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE;
return true;
}
NOTREACHED() << "Invalid VideoCodecProfile: " << input;
return false;

@ -43,6 +43,7 @@ buildflag_header("media_buildflags") {
"ENABLE_FFMPEG_VIDEO_DECODERS=$enable_ffmpeg_video_decoders",
"ENABLE_PLATFORM_HEVC=$enable_platform_hevc",
"ENABLE_HEVC_PARSER_AND_HW_DECODER=$enable_hevc_parser_and_hw_decoder",
"ENABLE_PLATFORM_VVC=$enable_platform_vvc",
"ENABLE_HLS_DEMUXER=$enable_hls_demuxer",
"ENABLE_LIBAOM=$enable_libaom",
"ENABLE_LIBRARY_CDMS=$enable_library_cdms",

@ -154,6 +154,36 @@ std::string GetProfileName(VideoCodecProfile profile) {
return "av1 profile high";
case AV1PROFILE_PROFILE_PRO:
return "av1 profile pro";
case VVCPROFILE_MAIN10:
return "vvc profile main10";
case VVCPROFILE_MAIN12:
return "vvc profile main12";
case VVCPROFILE_MAIN12_INTRA:
return "vvc profile main12 intra";
case VVCPROIFLE_MULTILAYER_MAIN10:
return "vvc profile multilayer main10";
case VVCPROFILE_MAIN10_444:
return "vvc profile main10 444";
case VVCPROFILE_MAIN12_444:
return "vvc profile main12 444";
case VVCPROFILE_MAIN16_444:
return "vvc profile main16 444";
case VVCPROFILE_MAIN12_444_INTRA:
return "vvc profile main12 444 intra";
case VVCPROFILE_MAIN16_444_INTRA:
return "vvc profile main16 444 intra";
case VVCPROFILE_MULTILAYER_MAIN10_444:
return "vvc profile multilayer main10 444";
case VVCPROFILE_MAIN10_STILL_PICTURE:
return "vvc profile main10 still picture";
case VVCPROFILE_MAIN12_STILL_PICTURE:
return "vvc profile main12 still picture";
case VVCPROFILE_MAIN10_444_STILL_PICTURE:
return "vvc profile main10 444 still picture";
case VVCPROFILE_MAIN12_444_STILL_PICTURE:
return "vvc profile main12 444 still picture";
case VVCPROFILE_MAIN16_444_STILL_PICTURE:
return "vvc profile main16 444 still picture";
}
NOTREACHED_NORETURN();
}
@ -858,6 +888,166 @@ bool ParseHEVCCodecId(base::StringPiece codec_id,
}
#endif
#if BUILDFLAG(ENABLE_PLATFORM_VVC)
// The specification for VVC codec id strings can be found in ISO/IEC 14496-15
// 2022, annex E.6.
// In detail it would be:
// <sample entry FourCC> ("vvi1: if config is inband, or "vvc1" otherwise.)
// .<general_profile_idc> (base10)
// .<general_tier_flag> ("L" or "H")
// <op_level_idc> (base10. <= general_level_idc in SPS)
// .C<ptl_frame_only_constraint_flag><ptl_multi_layer_enabled_flag> (optional)
// <general_constraint_info) (base32 with "=" might be omitted.)
// .S<general_sub_profile_idc1> (Optional, base32 with "=" might be omitted.)
// <+general_sub_profile_
// .O<ols_idx>+<max_tid> (Optional, base10 OlsIdx & MaxTid)
bool ParseVVCCodecId(base::StringPiece codec_id,
VideoCodecProfile* profile,
uint8_t* level_idc) {
if (!base::StartsWith(codec_id, "vvc1.", base::CompareCase::SENSITIVE) &&
!base::StartsWith(codec_id, "vvi1.", base::CompareCase::SENSITIVE)) {
return false;
}
std::vector<std::string> elem = base::SplitString(
codec_id, ".", base::TRIM_WHITESPACE, base::SPLIT_WANT_ALL);
DCHECK(elem[0] == "vvc1" || elem[0] == "vvi1");
if (elem.size() < 3 || elem.size() > 6) {
DVLOG(4) << __func__ << ": invalid VVC codec id " << codec_id;
return false;
}
for (auto& item : elem) {
if (item.size() < 1 ||
((item[0] == 'C' || item[0] == 'S' || item[0] == 'O') &&
item.size() < 2)) {
DVLOG(4) << __func__ << ": subelement of VVC codec id invalid.";
return false;
}
if (item[0] == 'O' && item.back() == '+') {
DVLOG(4) << __func__ << ": invalid OlxIdx and MaxTid string.";
return false;
}
}
unsigned general_profile_idc = 0;
if (!base::StringToUint(elem[1], &general_profile_idc) ||
general_profile_idc > 0x63) {
DVLOG(4) << __func__ << ": invalid general_profile_idc=" << elem[1];
return false;
}
VideoCodecProfile out_profile = VIDEO_CODEC_PROFILE_UNKNOWN;
switch (general_profile_idc) {
case 99: // Spec A.3.5
out_profile = VVCPROFILE_MAIN16_444_STILL_PICTURE;
break;
case 98: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12_444_STILL_PICTURE;
break;
case 97: // Spec A.3.2
out_profile = VVCPROFILE_MAIN10_444_STILL_PICTURE;
break;
case 66: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12_STILL_PICTURE;
break;
case 65: // Spec A.3.1
out_profile = VVCPROFILE_MAIN10_STILL_PICTURE;
break;
case 49: // Spec A.3.4
out_profile = VVCPROFILE_MULTILAYER_MAIN10_444;
break;
case 43: // Spec A.3.5
out_profile = VVCPROFILE_MAIN16_444_INTRA;
break;
case 42: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12_444_INTRA;
break;
case 35: // Spec A.3.5
out_profile = VVCPROFILE_MAIN16_444;
break;
case 34: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12_444;
break;
case 33: // Spec A.3.2
out_profile = VVCPROFILE_MAIN10_444;
break;
case 17: // Spec A.3.3
out_profile = VVCPROIFLE_MULTILAYER_MAIN10;
break;
case 10: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12_INTRA;
break;
case 2: // Spec A.3.5
out_profile = VVCPROFILE_MAIN12;
break;
case 1: // Spec A.3.1
out_profile = VVCPROFILE_MAIN10;
break;
default:
break;
}
if (out_profile == VIDEO_CODEC_PROFILE_UNKNOWN) {
DVLOG(1) << "Warning: unrecognized VVC/H.266 general_profile_idc: "
<< general_profile_idc;
return false;
}
if (profile) {
*profile = out_profile;
}
uint8_t general_tier_flag;
if (elem[2][0] == 'L' || elem[2][0] == 'H') {
general_tier_flag = (elem[2][0] == 'L') ? 0 : 1;
elem[2].erase(0, 1);
} else {
DVLOG(4) << __func__ << ": invalid general_tier_flag=" << elem[2];
return false;
}
DCHECK(general_tier_flag == 0 || general_tier_flag == 1);
unsigned general_level_idc = 0;
if (!base::StringToUint(elem[2], &general_level_idc) ||
general_level_idc > 0xff) {
DVLOG(4) << __func__ << ": invalid general_level_idc=" << elem[2];
return false;
}
if (level_idc) {
*level_idc = static_cast<uint8_t>(general_level_idc);
}
// C-string, if existing, should proceed S-string and O-string.
// Similarly, S-string should proceed O-string.
bool trailing_valid = true;
if (elem.size() == 4) {
if (elem[3][0] != 'C' && elem[3][0] != 'S' && elem[3][0] != 'O') {
trailing_valid = false;
}
} else if (elem.size() == 5) {
if (!((elem[3][0] == 'C' && elem[4][0] == 'S') ||
(elem[3][0] == 'C' && elem[4][0] == 'O') ||
(elem[3][0] == 'S' && elem[4][0] == 'O'))) {
trailing_valid = false;
}
} else if (elem.size() == 6) {
if (elem[3][0] != 'C' || elem[4][0] != 'S' || elem[5][0] != 'O') {
trailing_valid = false;
}
}
if (!trailing_valid) {
DVLOG(4) << __func__ << ": invalid traing codec string.";
return false;
}
return true;
}
#endif
#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
bool IsDolbyVisionAVCCodecId(base::StringPiece codec_id) {
return base::StartsWith(codec_id, "dva1.", base::CompareCase::SENSITIVE) ||
@ -1080,6 +1270,25 @@ VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) {
case AV1PROFILE_PROFILE_HIGH:
case AV1PROFILE_PROFILE_PRO:
return VideoCodec::kAV1;
// TODO(crbugs.com/1417910): Update to VideoCodec::kVVC when
// the production VVC decoder is enabled and corresponding
// enum is allowed to be added.
case VVCPROFILE_MAIN10:
case VVCPROFILE_MAIN12:
case VVCPROFILE_MAIN12_INTRA:
case VVCPROIFLE_MULTILAYER_MAIN10:
case VVCPROFILE_MAIN10_444:
case VVCPROFILE_MAIN12_444:
case VVCPROFILE_MAIN16_444:
case VVCPROFILE_MAIN12_444_INTRA:
case VVCPROFILE_MAIN16_444_INTRA:
case VVCPROFILE_MULTILAYER_MAIN10_444:
case VVCPROFILE_MAIN10_STILL_PICTURE:
case VVCPROFILE_MAIN12_STILL_PICTURE:
case VVCPROFILE_MAIN10_444_STILL_PICTURE:
case VVCPROFILE_MAIN12_444_STILL_PICTURE:
case VVCPROFILE_MAIN16_444_STILL_PICTURE:
return VideoCodec::kUnknown;
}
}

@ -104,7 +104,24 @@ enum VideoCodecProfile {
HEVCPROFILE_SCALABLE_REXT = 35,
HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED = 36,
HEVCPROFILE_EXT_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VIDEO_CODEC_PROFILE_MAX = HEVCPROFILE_HIGH_THROUGHPUT_SCREEN_EXTENDED,
VVCPROFILE_MIN = 37,
VVCPROFILE_MAIN10 = VVCPROFILE_MIN,
VVCPROFILE_MAIN12 = 38,
VVCPROFILE_MAIN12_INTRA = 39,
VVCPROIFLE_MULTILAYER_MAIN10 = 40,
VVCPROFILE_MAIN10_444 = 41,
VVCPROFILE_MAIN12_444 = 42,
VVCPROFILE_MAIN16_444 = 43,
VVCPROFILE_MAIN12_444_INTRA = 44,
VVCPROFILE_MAIN16_444_INTRA = 45,
VVCPROFILE_MULTILAYER_MAIN10_444 = 46,
VVCPROFILE_MAIN10_STILL_PICTURE = 47,
VVCPROFILE_MAIN12_STILL_PICTURE = 48,
VVCPROFILE_MAIN10_444_STILL_PICTURE = 49,
VVCPROFILE_MAIN12_444_STILL_PICTURE = 50,
VVCPROFILE_MAIN16_444_STILL_PICTURE = 51,
VVCPROFILE_MAX = VVCPROFILE_MAIN16_444_STILL_PICTURE,
VIDEO_CODEC_PROFILE_MAX = VVCPROFILE_MAIN16_444_STILL_PICTURE,
};
using VideoCodecLevel = uint32_t;
@ -159,6 +176,12 @@ MEDIA_EXPORT bool ParseHEVCCodecId(base::StringPiece codec_id,
uint8_t* level_idc);
#endif
#if BUILDFLAG(ENABLE_PLATFORM_VVC)
MEDIA_EXPORT bool ParseVVCCodecId(base::StringPiece codec_id,
VideoCodecProfile* profile,
uint8_t* level_idc);
#endif
#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
MEDIA_EXPORT bool ParseDolbyVisionCodecId(base::StringPiece codec_id,
VideoCodecProfile* profile,

@ -664,6 +664,115 @@ TEST(ParseHEVCCodecIdTest, InvalidHEVCCodecIds) {
}
#endif
#if BUILDFLAG(ENABLE_PLATFORM_VVC)
TEST(ParseVVCCodecIdTest, InvalidVVCCodecIds) {
VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;
uint8_t level_idc = 0;
// Both vvc1 and vvi1 should be supported
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L51.CQA.O1+3", &profile, &level_idc));
EXPECT_EQ(profile, VVCPROFILE_MAIN10);
EXPECT_EQ(level_idc, 51);
EXPECT_TRUE(
ParseVVCCodecId("vvi1.2.L83.CQA.S25+YA.O2+3", &profile, &level_idc));
EXPECT_EQ(profile, VVCPROFILE_MAIN12);
EXPECT_EQ(level_idc, 83);
// Check that codec id string with insufficient number of dot-separated
// elements are rejected. There must be at least 4 elements: vvc1/vvi1 prefix,
// profile, level, constraints.
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L51.CQA", &profile, &level_idc));
EXPECT_EQ(profile, VVCPROFILE_MAIN10);
EXPECT_EQ(level_idc, 51);
EXPECT_FALSE(ParseVVCCodecId("vvc1", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvi1", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1..", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1...", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1....", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1..", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1...", &profile, &level_idc));
// Check that codec ids with invalid trailing bytes are rejected.
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83..", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83...", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83....", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.....", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83......", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.......", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.......0", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.0.", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.0..", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.0..0", &profile, &level_idc));
// general_profile_idc (the number after the first dot) must be a 5-bit
// decimal-encoded number (between 1 and 99)
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L83.CQA", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.99.L83.CQA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.100.L83.CQA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.0.L83.CQA", &profile, &level_idc));
// general_tier_flag is encoded as either character 'L' (general_tier_flag==0)
// or character 'H' (general_tier_flag==1) in the 3rd element of the string
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L83.CQA", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.H83.CQA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.83.CQA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.A83.CQA", &profile, &level_idc));
// general_level_idc is 8-bit decimal-encoded number after general_tier_flag.
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA", &profile, &level_idc));
EXPECT_EQ(level_idc, 0);
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L1.CQA", &profile, &level_idc));
EXPECT_EQ(level_idc, 1);
// Level 3.1 (51 == 3 * 16 + 1 * 3)
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L51.CQA", &profile, &level_idc));
EXPECT_EQ(level_idc, 51);
// Level 6.2 (102 == 6 * 16 + 2 * 3)
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L102.CYA", &profile, &level_idc));
EXPECT_EQ(level_idc, 102);
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L255.CYA", &profile, &level_idc));
EXPECT_EQ(level_idc, 255);
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L256.CYA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L999.CQA", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L-1.CQA", &profile, &level_idc));
// constraints string
EXPECT_FALSE(ParseVVCCodecId("vvc1.100.L83.C.", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.100.L83.2C", &profile, &level_idc));
// general_sub_profile_idc placement.
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA.SF1.O0+3", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA.SF1", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.SF1", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.SF1.", &profile, &level_idc));
EXPECT_TRUE(
ParseVVCCodecId("vvc1.1.L0.CQA.SF1+AB.O0+3", &profile, &level_idc));
EXPECT_TRUE(
ParseVVCCodecId("vvc1.1.L0.CQA.SF1+AB+2B.O0+3", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.SF1.CQA.O0+3", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.O0+3.SF1", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.O0+3.S", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.O0+3.S.", &profile, &level_idc));
// OlsIdx & MaxTid
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA.O0+3", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA.O1", &profile, &level_idc));
// When MaxTid does not exist, "+" should not be present.
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.O1+", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L0.CQA.O", &profile, &level_idc));
EXPECT_TRUE(ParseVVCCodecId("vvc1.1.L0.CQA.O+3", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.100", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.1FF", &profile, &level_idc));
EXPECT_FALSE(ParseVVCCodecId("vvc1.1.L83.-1", &profile, &level_idc));
EXPECT_FALSE(
ParseVVCCodecId("vvc1.1.L0.CQA.SF1.O0+3.100", &profile, &level_idc));
}
#endif
#if BUILDFLAG(ENABLE_PLATFORM_DOLBY_VISION)
TEST(ParseDolbyVisionCodecIdTest, InvalidDolbyVisionCodecIds) {
VideoCodecProfile profile = VIDEO_CODEC_PROFILE_UNKNOWN;

@ -50,6 +50,21 @@ STATIC_ASSERT_ENUM_MATCH(DOLBYVISION_PROFILE9);
STATIC_ASSERT_ENUM_MATCH(AV1PROFILE_PROFILE_MAIN);
STATIC_ASSERT_ENUM_MATCH(AV1PROFILE_PROFILE_HIGH);
STATIC_ASSERT_ENUM_MATCH(AV1PROFILE_PROFILE_PRO);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN10);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12_INTRA);
STATIC_ASSERT_ENUM_MATCH(VVCPROIFLE_MULTILAYER_MAIN10);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN10_444);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12_444);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN16_444);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12_444_INTRA);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN16_444_INTRA);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MULTILAYER_MAIN10_444);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN10_STILL_PICTURE);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12_STILL_PICTURE);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN10_444_STILL_PICTURE);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN12_444_STILL_PICTURE);
STATIC_ASSERT_ENUM_MATCH(VVCPROFILE_MAIN16_444_STILL_PICTURE);
STATIC_ASSERT_ENUM_MATCH(VIDEO_CODEC_PROFILE_MAX);
// static

@ -37,8 +37,8 @@ enum VideoCodecProfile {
// Keep the values in this enum unique, as they imply format (h.264 vs. VP8,
// for example), and keep the values for a particular format grouped
// together for clarity.
// Next version: 2
// Next value: 37
// Next version: 3
// Next value: 52
[Default] kVideoCodecProfileUnknown = -1,
kH264ProfileMin = 0,
kH264ProfileBaseline = kH264ProfileMin,
@ -91,6 +91,23 @@ enum VideoCodecProfile {
[MinVersion=1] kHEVCProfileScalableRext = 35,
[MinVersion=1] kHEVCProfileHighThroughputScreenExtended = 36,
[MinVersion=1] kHEVCProfileExtMax = kHEVCProfileHighThroughputScreenExtended,
[MinVersion=2] kVVCProfileMin = 37,
[MinVersion=2] kVVCProfileMain10 = kVVCProfileMin,
[MinVersion=2] kVVCProfileMain12 = 38,
[MinVersion=2] kVVCProfileMain12Intra = 39,
[MinVersion=2] kVVCProfileMultilayerMain10 = 40,
[MinVersion=2] kVVCProfileMain10444 = 41,
[MinVersion=2] kVVCProfileMain12444 = 42,
[MinVersion=2] kVVCProfileMain16444 = 43,
[MinVersion=2] kVVCProfileMain12444Intra = 44,
[MinVersion=2] kVVCProfileMain16444Intra = 45,
[MinVersion=2] kVVCProfileMultilayerMain10444 = 46,
[MinVersion=2] kVVCProfileMain10Still = 47,
[MinVersion=2] kVVCProfileMain12Still = 48,
[MinVersion=2] kVVCProfileMain10444Still = 49,
[MinVersion=2] kVVCProfileMain12444Still = 50,
[MinVersion=2] kVVCProfileMain16444Still = 51,
[MinVersion=2] kVVCProileMax = kVVCProfileMain16444Still,
};
// Based on |media.mojom.SubsampleEntry|.

@ -923,6 +923,45 @@ struct EnumTraits<media::stable::mojom::VideoCodecProfile,
return media::stable::mojom::VideoCodecProfile::kDolbyVisionProfile8;
case ::media::VideoCodecProfile::DOLBYVISION_PROFILE9:
return media::stable::mojom::VideoCodecProfile::kDolbyVisionProfile9;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN10:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain10;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain12;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain12Intra;
case ::media::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMultilayerMain10;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN10_444:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain10444;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12_444:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain12444;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN16_444:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain16444;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain12444Intra;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain16444Intra;
case ::media::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444:
return ::media::stable::mojom::VideoCodecProfile::kVVCProfileMain10444;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain10Still;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain12Still;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain10444Still;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain12444Still;
case ::media::VideoCodecProfile::VVCPROFILE_MAIN16_444_STILL_PICTURE:
return ::media::stable::mojom::VideoCodecProfile::
kVVCProfileMain16444Still;
}
NOTREACHED_NORETURN();
@ -1053,6 +1092,55 @@ struct EnumTraits<media::stable::mojom::VideoCodecProfile,
case media::stable::mojom::VideoCodecProfile::kDolbyVisionProfile9:
*output = ::media::VideoCodecProfile::DOLBYVISION_PROFILE9;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain10:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN10;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN12;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12Intra:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN12_INTRA;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMultilayerMain10:
*output = ::media::VideoCodecProfile::VVCPROIFLE_MULTILAYER_MAIN10;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain10444:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN10_444;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12444:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN12_444;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain16444:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN16_444;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12444Intra:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN12_444_INTRA;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain16444Intra:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN16_444_INTRA;
return true;
case media::stable::mojom::VideoCodecProfile::
kVVCProfileMultilayerMain10444:
*output = ::media::VideoCodecProfile::VVCPROFILE_MULTILAYER_MAIN10_444;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain10Still:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN10_STILL_PICTURE;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12Still:
*output = ::media::VideoCodecProfile::VVCPROFILE_MAIN12_STILL_PICTURE;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain10444Still:
*output =
::media::VideoCodecProfile::VVCPROFILE_MAIN10_444_STILL_PICTURE;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain12444Still:
*output =
::media::VideoCodecProfile::VVCPROFILE_MAIN12_444_STILL_PICTURE;
return true;
case media::stable::mojom::VideoCodecProfile::kVVCProfileMain16444Still:
*output =
::media::VideoCodecProfile::VVCPROFILE_MAIN16_444_STILL_PICTURE;
return true;
}
NOTREACHED_NORETURN();

@ -109216,6 +109216,21 @@ Full version information for the fingerprint enum values:
<int value="34" label="HEVC ScreenExtended"/>
<int value="35" label="HEVC ScalableRext"/>
<int value="36" label="HEVC HighThroughputScreenExtended"/>
<int value="37" label="VVC Main10"/>
<int value="38" label="VVC Main12"/>
<int value="39" label="VVC Main12 Intra"/>
<int value="40" label="VVC Multi-layer Main10"/>
<int value="41" label="VVC Main10 444"/>
<int value="42" label="VVC Main12 444"/>
<int value="43" label="VVC Main16 444"/>
<int value="44" label="VVC Main12 444 Intra"/>
<int value="45" label="VVC Main16 444 Intra"/>
<int value="46" label="VVC Multi-layer Main10 444"/>
<int value="47" label="VVC Main10 Still-picture"/>
<int value="48" label="VVC Main12 Still-picture"/>
<int value="49" label="VVC Main10 444 Still-picture"/>
<int value="50" label="VVC Main12 444 Still-picture"/>
<int value="51" label="VVC Main16 444 Still-picture"/>
</enum>
<enum name="VideoColorSpace.PrimaryID">