Commit f87a7ae3 authored by Yuchen Liu's avatar Yuchen Liu Committed by Commit Bot

Support DV profile 8 and 9

This patch adds new enum DOLBYVISION_PROFILE8 and DOLBYVISION_PROFILE9,
and updates all the other related codes.

Bug: internal b/134099245
Test: DV stream, Netflix, Vudu
Change-Id: Ic238eefedde39387924356ef105fac8dc89075d8
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1637983Reviewed-by: default avatarDale Curtis <dalecurtis@chromium.org>
Reviewed-by: default avatarSergey Volk <servolk@chromium.org>
Reviewed-by: default avatarDaniel Cheng <dcheng@chromium.org>
Reviewed-by: default avatarAntoine Labour <piman@chromium.org>
Commit-Queue: Yuchen Liu <yucliu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#665988}
parent 6d57c056
...@@ -50,11 +50,13 @@ VideoCodec ToCastVideoCodec(const ::media::VideoCodec video_codec, ...@@ -50,11 +50,13 @@ VideoCodec ToCastVideoCodec(const ::media::VideoCodec video_codec,
case ::media::kCodecHEVC: case ::media::kCodecHEVC:
return kCodecHEVC; return kCodecHEVC;
case ::media::kCodecDolbyVision: case ::media::kCodecDolbyVision:
if (codec_profile == ::media::DOLBYVISION_PROFILE0) { if (codec_profile == ::media::DOLBYVISION_PROFILE0 ||
codec_profile == ::media::DOLBYVISION_PROFILE9) {
return kCodecDolbyVisionH264; return kCodecDolbyVisionH264;
} else if (codec_profile == ::media::DOLBYVISION_PROFILE4 || } else if (codec_profile == ::media::DOLBYVISION_PROFILE4 ||
codec_profile == ::media::DOLBYVISION_PROFILE5 || codec_profile == ::media::DOLBYVISION_PROFILE5 ||
codec_profile == ::media::DOLBYVISION_PROFILE7) { codec_profile == ::media::DOLBYVISION_PROFILE7 ||
codec_profile == ::media::DOLBYVISION_PROFILE8) {
return kCodecDolbyVisionHEVC; return kCodecDolbyVisionHEVC;
} }
LOG(ERROR) << "Unsupported video codec profile " << codec_profile; LOG(ERROR) << "Unsupported video codec profile " << codec_profile;
......
...@@ -42,12 +42,12 @@ CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN); ...@@ -42,12 +42,12 @@ CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN);
CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN10); CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN10);
CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN_STILL_PICTURE); CHECK_PROFILE_ENUM(HEVCPROFILE_MAIN_STILL_PICTURE);
CHECK_PROFILE_ENUM(HEVCPROFILE_MAX); CHECK_PROFILE_ENUM(HEVCPROFILE_MAX);
CHECK_PROFILE_ENUM(DOLBYVISION_MIN);
CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE0); CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE0);
CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE4); CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE4);
CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE5); CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE5);
CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE7); CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE7);
CHECK_PROFILE_ENUM(DOLBYVISION_MAX); CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE8);
CHECK_PROFILE_ENUM(DOLBYVISION_PROFILE9);
CHECK_PROFILE_ENUM(THEORAPROFILE_MIN); CHECK_PROFILE_ENUM(THEORAPROFILE_MIN);
CHECK_PROFILE_ENUM(THEORAPROFILE_ANY); CHECK_PROFILE_ENUM(THEORAPROFILE_ANY);
CHECK_PROFILE_ENUM(THEORAPROFILE_MAX); CHECK_PROFILE_ENUM(THEORAPROFILE_MAX);
...@@ -96,6 +96,8 @@ bool EnumTraits<arc::mojom::VideoCodecProfile, media::VideoCodecProfile>:: ...@@ -96,6 +96,8 @@ bool EnumTraits<arc::mojom::VideoCodecProfile, media::VideoCodecProfile>::
case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE4: case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE4:
case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5: case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5:
case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7: case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7:
case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE8:
case arc::mojom::VideoCodecProfile::DOLBYVISION_PROFILE9:
case arc::mojom::VideoCodecProfile::THEORAPROFILE_ANY: case arc::mojom::VideoCodecProfile::THEORAPROFILE_ANY:
case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_MAIN: case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_MAIN:
case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_HIGH: case arc::mojom::VideoCodecProfile::AV1PROFILE_PROFILE_HIGH:
......
...@@ -41,12 +41,10 @@ enum VideoCodecProfile { ...@@ -41,12 +41,10 @@ enum VideoCodecProfile {
HEVCPROFILE_MAIN10 = 17, HEVCPROFILE_MAIN10 = 17,
HEVCPROFILE_MAIN_STILL_PICTURE = 18, HEVCPROFILE_MAIN_STILL_PICTURE = 18,
HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE, HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
DOLBYVISION_MIN = 19, DOLBYVISION_PROFILE0 = 19,
DOLBYVISION_PROFILE0 = DOLBYVISION_MIN,
DOLBYVISION_PROFILE4 = 20, DOLBYVISION_PROFILE4 = 20,
DOLBYVISION_PROFILE5 = 21, DOLBYVISION_PROFILE5 = 21,
DOLBYVISION_PROFILE7 = 22, DOLBYVISION_PROFILE7 = 22,
DOLBYVISION_MAX = DOLBYVISION_PROFILE7,
THEORAPROFILE_MIN = 23, THEORAPROFILE_MIN = 23,
THEORAPROFILE_ANY = THEORAPROFILE_MIN, THEORAPROFILE_ANY = THEORAPROFILE_MIN,
THEORAPROFILE_MAX = THEORAPROFILE_ANY, THEORAPROFILE_MAX = THEORAPROFILE_ANY,
...@@ -55,7 +53,9 @@ enum VideoCodecProfile { ...@@ -55,7 +53,9 @@ enum VideoCodecProfile {
AV1PROFILE_PROFILE_HIGH = 25, AV1PROFILE_PROFILE_HIGH = 25,
AV1PROFILE_PROFILE_PRO = 26, AV1PROFILE_PROFILE_PRO = 26,
AV1PROFILE_MAX = AV1PROFILE_PROFILE_PRO, AV1PROFILE_MAX = AV1PROFILE_PROFILE_PRO,
VIDEO_CODEC_PROFILE_MAX = AV1PROFILE_PROFILE_PRO, DOLBYVISION_PROFILE8 = 27,
DOLBYVISION_PROFILE9 = 28,
VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_PROFILE9,
}; };
[Extensible] [Extensible]
......
...@@ -407,7 +407,7 @@ std::unique_ptr<base::ListValue> getDisplayInfo() { ...@@ -407,7 +407,7 @@ std::unique_ptr<base::ListValue> getDisplayInfo() {
return display_info; return display_info;
} }
std::string GetProfileName(gpu::VideoCodecProfile profile) { const char* GetProfileName(gpu::VideoCodecProfile profile) {
switch (profile) { switch (profile) {
case gpu::VIDEO_CODEC_PROFILE_UNKNOWN: case gpu::VIDEO_CODEC_PROFILE_UNKNOWN:
return "unknown"; return "unknown";
...@@ -457,6 +457,10 @@ std::string GetProfileName(gpu::VideoCodecProfile profile) { ...@@ -457,6 +457,10 @@ std::string GetProfileName(gpu::VideoCodecProfile profile) {
return "dolby vision profile 5"; return "dolby vision profile 5";
case gpu::DOLBYVISION_PROFILE7: case gpu::DOLBYVISION_PROFILE7:
return "dolby vision profile 7"; return "dolby vision profile 7";
case gpu::DOLBYVISION_PROFILE8:
return "dolby vision profile 8";
case gpu::DOLBYVISION_PROFILE9:
return "dolby vision profile 9";
case gpu::THEORAPROFILE_ANY: case gpu::THEORAPROFILE_ANY:
return "theora"; return "theora";
case gpu::AV1PROFILE_PROFILE_MAIN: case gpu::AV1PROFILE_PROFILE_MAIN:
...@@ -476,8 +480,8 @@ std::unique_ptr<base::ListValue> GetVideoAcceleratorsInfo() { ...@@ -476,8 +480,8 @@ std::unique_ptr<base::ListValue> GetVideoAcceleratorsInfo() {
for (const auto& profile : for (const auto& profile :
gpu_info.video_decode_accelerator_capabilities.supported_profiles) { gpu_info.video_decode_accelerator_capabilities.supported_profiles) {
std::string codec_string = base::StringPrintf( std::string codec_string =
"Decode %s", GetProfileName(profile.profile).c_str()); base::StringPrintf("Decode %s", GetProfileName(profile.profile));
std::string resolution_string = base::StringPrintf( std::string resolution_string = base::StringPrintf(
"up to %s pixels %s", profile.max_resolution.ToString().c_str(), "up to %s pixels %s", profile.max_resolution.ToString().c_str(),
profile.encrypted_only ? "(encrypted)" : ""); profile.encrypted_only ? "(encrypted)" : "");
...@@ -486,8 +490,8 @@ std::unique_ptr<base::ListValue> GetVideoAcceleratorsInfo() { ...@@ -486,8 +490,8 @@ std::unique_ptr<base::ListValue> GetVideoAcceleratorsInfo() {
for (const auto& profile : for (const auto& profile :
gpu_info.video_encode_accelerator_supported_profiles) { gpu_info.video_encode_accelerator_supported_profiles) {
std::string codec_string = base::StringPrintf( std::string codec_string =
"Encode %s", GetProfileName(profile.profile).c_str()); base::StringPrintf("Encode %s", GetProfileName(profile.profile));
std::string resolution_string = base::StringPrintf( std::string resolution_string = base::StringPrintf(
"up to %s pixels and/or %.3f fps", "up to %s pixels and/or %.3f fps",
profile.max_resolution.ToString().c_str(), profile.max_resolution.ToString().c_str(),
......
...@@ -80,7 +80,9 @@ enum VideoCodecProfile { ...@@ -80,7 +80,9 @@ enum VideoCodecProfile {
AV1PROFILE_PROFILE_MAIN, AV1PROFILE_PROFILE_MAIN,
AV1PROFILE_PROFILE_HIGH, AV1PROFILE_PROFILE_HIGH,
AV1PROFILE_PROFILE_PRO, AV1PROFILE_PROFILE_PRO,
VIDEO_CODEC_PROFILE_MAX = AV1PROFILE_PROFILE_PRO, DOLBYVISION_PROFILE8,
DOLBYVISION_PROFILE9,
VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_PROFILE9,
}; };
// Specification of a decoding profile supported by a hardware decoder. // Specification of a decoding profile supported by a hardware decoder.
......
...@@ -52,6 +52,8 @@ enum VideoCodecProfile { ...@@ -52,6 +52,8 @@ enum VideoCodecProfile {
AV1PROFILE_PROFILE_MAIN, AV1PROFILE_PROFILE_MAIN,
AV1PROFILE_PROFILE_HIGH, AV1PROFILE_PROFILE_HIGH,
AV1PROFILE_PROFILE_PRO, AV1PROFILE_PROFILE_PRO,
DOLBYVISION_PROFILE8,
DOLBYVISION_PROFILE9,
}; };
// gpu::VideoDecodeAcceleratorSupportedProfile // gpu::VideoDecodeAcceleratorSupportedProfile
......
...@@ -79,6 +79,10 @@ EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::ToMojom( ...@@ -79,6 +79,10 @@ EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::ToMojom(
return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5; return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE5;
case gpu::VideoCodecProfile::DOLBYVISION_PROFILE7: case gpu::VideoCodecProfile::DOLBYVISION_PROFILE7:
return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7; return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7;
case gpu::VideoCodecProfile::DOLBYVISION_PROFILE8:
return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE8;
case gpu::VideoCodecProfile::DOLBYVISION_PROFILE9:
return gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE9;
case gpu::VideoCodecProfile::THEORAPROFILE_ANY: case gpu::VideoCodecProfile::THEORAPROFILE_ANY:
return gpu::mojom::VideoCodecProfile::THEORAPROFILE_ANY; return gpu::mojom::VideoCodecProfile::THEORAPROFILE_ANY;
case gpu::VideoCodecProfile::AV1PROFILE_PROFILE_MAIN: case gpu::VideoCodecProfile::AV1PROFILE_PROFILE_MAIN:
...@@ -169,6 +173,12 @@ bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>:: ...@@ -169,6 +173,12 @@ bool EnumTraits<gpu::mojom::VideoCodecProfile, gpu::VideoCodecProfile>::
case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7: case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE7:
*out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE7; *out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE7;
return true; return true;
case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE8:
*out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE8;
return true;
case gpu::mojom::VideoCodecProfile::DOLBYVISION_PROFILE9:
*out = gpu::VideoCodecProfile::DOLBYVISION_PROFILE9;
return true;
case gpu::mojom::VideoCodecProfile::THEORAPROFILE_ANY: case gpu::mojom::VideoCodecProfile::THEORAPROFILE_ANY:
*out = gpu::VideoCodecProfile::THEORAPROFILE_ANY; *out = gpu::VideoCodecProfile::THEORAPROFILE_ANY;
return true; return true;
......
...@@ -103,13 +103,14 @@ EmeCodec ToVideoEmeCodec(VideoCodec codec, VideoCodecProfile profile) { ...@@ -103,13 +103,14 @@ EmeCodec ToVideoEmeCodec(VideoCodec codec, VideoCodecProfile profile) {
case kCodecHEVC: case kCodecHEVC:
return EME_CODEC_HEVC; return EME_CODEC_HEVC;
case kCodecDolbyVision: case kCodecDolbyVision:
// Only profiles 0, 4, 5 and 7 are valid. Profile 0 is encoded based on // Only profiles 0, 4, 5, 7, 8, 9 are valid. Profile 0 and 9 are encoded
// AVC while profile 4, 5 and 7 are based on HEVC. // based on AVC while profile 4, 5, 7 and 8 are based on HEVC.
if (profile == DOLBYVISION_PROFILE0) { if (profile == DOLBYVISION_PROFILE0 || profile == DOLBYVISION_PROFILE9) {
return EME_CODEC_DOLBY_VISION_AVC; return EME_CODEC_DOLBY_VISION_AVC;
} else if (profile == DOLBYVISION_PROFILE4 || } else if (profile == DOLBYVISION_PROFILE4 ||
profile == DOLBYVISION_PROFILE5 || profile == DOLBYVISION_PROFILE5 ||
profile == DOLBYVISION_PROFILE7) { profile == DOLBYVISION_PROFILE7 ||
profile == DOLBYVISION_PROFILE8) {
return EME_CODEC_DOLBY_VISION_HEVC; return EME_CODEC_DOLBY_VISION_HEVC;
} else { } else {
return EME_CODEC_NONE; return EME_CODEC_NONE;
......
...@@ -160,7 +160,7 @@ static VideoCodecProfile MinProfile(VideoCodec codec) { ...@@ -160,7 +160,7 @@ static VideoCodecProfile MinProfile(VideoCodec codec) {
case kCodecHEVC: case kCodecHEVC:
return HEVCPROFILE_MIN; return HEVCPROFILE_MIN;
case kCodecDolbyVision: case kCodecDolbyVision:
return DOLBYVISION_MIN; return DOLBYVISION_PROFILE0;
case kCodecAV1: case kCodecAV1:
return AV1PROFILE_MIN; return AV1PROFILE_MIN;
} }
......
...@@ -92,6 +92,10 @@ std::string GetProfileName(VideoCodecProfile profile) { ...@@ -92,6 +92,10 @@ std::string GetProfileName(VideoCodecProfile profile) {
return "dolby vision profile 5"; return "dolby vision profile 5";
case DOLBYVISION_PROFILE7: case DOLBYVISION_PROFILE7:
return "dolby vision profile 7"; return "dolby vision profile 7";
case DOLBYVISION_PROFILE8:
return "dolby vision profile 8";
case DOLBYVISION_PROFILE9:
return "dolby vision profile 9";
case THEORAPROFILE_ANY: case THEORAPROFILE_ANY:
return "theora"; return "theora";
case AV1PROFILE_PROFILE_MAIN: case AV1PROFILE_PROFILE_MAIN:
...@@ -756,26 +760,31 @@ bool ParseDolbyVisionCodecId(const std::string& codec_id, ...@@ -756,26 +760,31 @@ bool ParseDolbyVisionCodecId(const std::string& codec_id,
// Profile string should be two digits. // Profile string should be two digits.
unsigned profile_id = 0; unsigned profile_id = 0;
if (elem[1].size() != 2 || !base::StringToUint(elem[1], &profile_id) || if (elem[1].size() != 2 || !base::StringToUint(elem[1], &profile_id) ||
profile_id > 7) { profile_id > 9) {
DVLOG(4) << __func__ << ": invalid format or profile_id=" << elem[1]; DVLOG(4) << __func__ << ": invalid format or profile_id=" << elem[1];
return false; return false;
} }
// Only profiles 0, 4, 5 and 7 are valid. Profile 0 is encoded based on AVC // Only profiles 0, 4, 5, 7, 8 and 9 are valid. Profile 0 and 9 are encoded
// while profile 4, 5 and 7 are based on HEVC. // based on AVC while profile 4, 5, 7 and 8 are based on HEVC.
switch (profile_id) { switch (profile_id) {
case 0: case 0:
case 9:
if (!IsDolbyVisionAVCCodecId(codec_id)) { if (!IsDolbyVisionAVCCodecId(codec_id)) {
DVLOG(4) << __func__ DVLOG(4) << __func__
<< ": codec id is mismatched with profile_id=" << profile_id; << ": codec id is mismatched with profile_id=" << profile_id;
return false; return false;
} }
if (profile_id == 0)
*profile = DOLBYVISION_PROFILE0; *profile = DOLBYVISION_PROFILE0;
else if (profile_id == 9)
*profile = DOLBYVISION_PROFILE9;
break; break;
#if BUILDFLAG(ENABLE_HEVC_DEMUXING) #if BUILDFLAG(ENABLE_HEVC_DEMUXING)
case 4: case 4:
case 5: case 5:
case 7: case 7:
case 8:
if (!IsDolbyVisionHEVCCodecId(codec_id)) { if (!IsDolbyVisionHEVCCodecId(codec_id)) {
DVLOG(4) << __func__ DVLOG(4) << __func__
<< ": codec id is mismatched with profile_id=" << profile_id; << ": codec id is mismatched with profile_id=" << profile_id;
...@@ -787,6 +796,8 @@ bool ParseDolbyVisionCodecId(const std::string& codec_id, ...@@ -787,6 +796,8 @@ bool ParseDolbyVisionCodecId(const std::string& codec_id,
*profile = DOLBYVISION_PROFILE5; *profile = DOLBYVISION_PROFILE5;
else if (profile_id == 7) else if (profile_id == 7)
*profile = DOLBYVISION_PROFILE7; *profile = DOLBYVISION_PROFILE7;
else if (profile_id == 8)
*profile = DOLBYVISION_PROFILE8;
break; break;
#endif #endif
default: default:
......
...@@ -79,12 +79,10 @@ enum VideoCodecProfile { ...@@ -79,12 +79,10 @@ enum VideoCodecProfile {
HEVCPROFILE_MAIN10 = 17, HEVCPROFILE_MAIN10 = 17,
HEVCPROFILE_MAIN_STILL_PICTURE = 18, HEVCPROFILE_MAIN_STILL_PICTURE = 18,
HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE, HEVCPROFILE_MAX = HEVCPROFILE_MAIN_STILL_PICTURE,
DOLBYVISION_MIN = 19, DOLBYVISION_PROFILE0 = 19,
DOLBYVISION_PROFILE0 = DOLBYVISION_MIN,
DOLBYVISION_PROFILE4 = 20, DOLBYVISION_PROFILE4 = 20,
DOLBYVISION_PROFILE5 = 21, DOLBYVISION_PROFILE5 = 21,
DOLBYVISION_PROFILE7 = 22, DOLBYVISION_PROFILE7 = 22,
DOLBYVISION_MAX = DOLBYVISION_PROFILE7,
THEORAPROFILE_MIN = 23, THEORAPROFILE_MIN = 23,
THEORAPROFILE_ANY = THEORAPROFILE_MIN, THEORAPROFILE_ANY = THEORAPROFILE_MIN,
THEORAPROFILE_MAX = THEORAPROFILE_ANY, THEORAPROFILE_MAX = THEORAPROFILE_ANY,
...@@ -93,7 +91,9 @@ enum VideoCodecProfile { ...@@ -93,7 +91,9 @@ enum VideoCodecProfile {
AV1PROFILE_PROFILE_HIGH = 25, AV1PROFILE_PROFILE_HIGH = 25,
AV1PROFILE_PROFILE_PRO = 26, AV1PROFILE_PROFILE_PRO = 26,
AV1PROFILE_MAX = AV1PROFILE_PROFILE_PRO, AV1PROFILE_MAX = AV1PROFILE_PROFILE_PRO,
VIDEO_CODEC_PROFILE_MAX = AV1PROFILE_PROFILE_PRO, DOLBYVISION_PROFILE8 = 27,
DOLBYVISION_PROFILE9 = 28,
VIDEO_CODEC_PROFILE_MAX = DOLBYVISION_PROFILE9,
}; };
struct CodecProfileLevel { struct CodecProfileLevel {
......
...@@ -46,6 +46,8 @@ VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) { ...@@ -46,6 +46,8 @@ VideoCodec VideoCodecProfileToVideoCodec(VideoCodecProfile profile) {
case DOLBYVISION_PROFILE4: case DOLBYVISION_PROFILE4:
case DOLBYVISION_PROFILE5: case DOLBYVISION_PROFILE5:
case DOLBYVISION_PROFILE7: case DOLBYVISION_PROFILE7:
case DOLBYVISION_PROFILE8:
case DOLBYVISION_PROFILE9:
return kCodecDolbyVision; return kCodecDolbyVision;
case THEORAPROFILE_ANY: case THEORAPROFILE_ANY:
return kCodecTheora; return kCodecTheora;
......
...@@ -65,6 +65,12 @@ bool DolbyVisionConfiguration::ParseInternal(BufferReader* reader, ...@@ -65,6 +65,12 @@ bool DolbyVisionConfiguration::ParseInternal(BufferReader* reader,
case 7: case 7:
codec_profile = DOLBYVISION_PROFILE7; codec_profile = DOLBYVISION_PROFILE7;
break; break;
case 8:
codec_profile = DOLBYVISION_PROFILE8;
break;
case 9:
codec_profile = DOLBYVISION_PROFILE9;
break;
default: default:
DVLOG(2) << "Deprecated or invalid Dolby Vision profile:" DVLOG(2) << "Deprecated or invalid Dolby Vision profile:"
<< static_cast<int>(dv_profile); << static_cast<int>(dv_profile);
......
...@@ -189,6 +189,8 @@ message VideoDecoderConfig { ...@@ -189,6 +189,8 @@ message VideoDecoderConfig {
AV1PROFILE_PROFILE_MAIN = 24; AV1PROFILE_PROFILE_MAIN = 24;
AV1PROFILE_PROFILE_HIGH = 25; AV1PROFILE_PROFILE_HIGH = 25;
AV1PROFILE_PROFILE_PRO = 26; AV1PROFILE_PROFILE_PRO = 26;
DOLBYVISION_PROFILE8 = 27;
DOLBYVISION_PROFILE9 = 28;
}; };
// Proto version of media::VideoPixelFormat. // Proto version of media::VideoPixelFormat.
......
...@@ -284,6 +284,8 @@ base::Optional<VideoCodecProfile> ToMediaVideoCodecProfile( ...@@ -284,6 +284,8 @@ base::Optional<VideoCodecProfile> ToMediaVideoCodecProfile(
CASE_RETURN_OTHER(DOLBYVISION_PROFILE4); CASE_RETURN_OTHER(DOLBYVISION_PROFILE4);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE5); CASE_RETURN_OTHER(DOLBYVISION_PROFILE5);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE7); CASE_RETURN_OTHER(DOLBYVISION_PROFILE7);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE8);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE9);
CASE_RETURN_OTHER(THEORAPROFILE_ANY); CASE_RETURN_OTHER(THEORAPROFILE_ANY);
CASE_RETURN_OTHER(AV1PROFILE_PROFILE_MAIN); CASE_RETURN_OTHER(AV1PROFILE_PROFILE_MAIN);
CASE_RETURN_OTHER(AV1PROFILE_PROFILE_HIGH); CASE_RETURN_OTHER(AV1PROFILE_PROFILE_HIGH);
...@@ -321,6 +323,8 @@ ToProtoVideoDecoderConfigProfile(VideoCodecProfile value) { ...@@ -321,6 +323,8 @@ ToProtoVideoDecoderConfigProfile(VideoCodecProfile value) {
CASE_RETURN_OTHER(DOLBYVISION_PROFILE4); CASE_RETURN_OTHER(DOLBYVISION_PROFILE4);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE5); CASE_RETURN_OTHER(DOLBYVISION_PROFILE5);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE7); CASE_RETURN_OTHER(DOLBYVISION_PROFILE7);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE8);
CASE_RETURN_OTHER(DOLBYVISION_PROFILE9);
CASE_RETURN_OTHER(THEORAPROFILE_ANY); CASE_RETURN_OTHER(THEORAPROFILE_ANY);
CASE_RETURN_OTHER(AV1PROFILE_PROFILE_MAIN); CASE_RETURN_OTHER(AV1PROFILE_PROFILE_MAIN);
CASE_RETURN_OTHER(AV1PROFILE_PROFILE_HIGH); CASE_RETURN_OTHER(AV1PROFILE_PROFILE_HIGH);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment