# https://raw.githubusercontent.com/StaZhu/enable-chromium-hevc-hardware-decoding/main/remove-main-main10-profile-limit.patch From 89e80d73c454577709519dd0a0b1f2b8cdd78e99 Mon Sep 17 00:00:00 2001 From: Sta Zhu Date: Tue, 2 May 2023 22:38:51 +0800 Subject: [PATCH] Video: Remove Main/Main10 profile limit This will consider all HEVC profile as to supported, and help you be able to play video's like HEVC Rext, SCC etc... --- media/base/supported_types.cc | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/media/base/supported_types.cc b/media/base/supported_types.cc index 07b991932aad5..657f21a934359 100644 --- a/media/base/supported_types.cc +++ b/media/base/supported_types.cc @@ -209,33 +209,7 @@ bool IsAudioCodecProprietary(AudioCodec codec) { #endif // !BUILDFLAG(USE_PROPRIETARY_CODECS) bool IsHevcProfileSupported(const VideoType& type) { - if (!IsColorSpaceSupported(type.color_space)) - return false; - -#if BUILDFLAG(ENABLE_PLATFORM_HEVC) -#if BUILDFLAG(PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT) -#if BUILDFLAG(IS_CHROMEOS_LACROS) - // TODO(b/171813538): For Lacros, the supplemental profile cache will be - // asking lacros-gpu, but we will be doing decoding in ash-gpu. Until the - // codec detection is plumbed through to ash-gpu we can do this extra check - // for HEVC support. - if (base::CommandLine::ForCurrentProcess()->HasSwitch( - switches::kLacrosEnablePlatformHevc)) { - return true; - } -#endif // BUILDFLAG(IS_CHROMEOS_LACROS) -#if BUILDFLAG(IS_CHROMEOS_ASH) - if (!base::FeatureList::IsEnabled(kPlatformHEVCDecoderSupport)) { - return false; - } -#endif // BUILDFLAG(IS_CHROMEOS_ASH) - return GetSupplementalProfileCache()->IsProfileSupported(type.profile); -#else return true; -#endif // BUIDFLAG(PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT) -#else - return false; -#endif // BUILDFLAG(ENABLE_PLATFORM_HEVC) } bool IsVp9ProfileSupported(const VideoType& type) { @@ -410,7 +384,7 @@ bool IsBuiltInVideoCodec(VideoCodec codec) { if (codec == VideoCodec::kVP8) return true; #if BUILDFLAG(USE_PROPRIETARY_CODECS) - if (codec == VideoCodec::kH264) + if (codec == VideoCodec::kH264 || codec == VideoCodec::kHEVC) return true; #endif // BUILDFLAG(USE_PROPRIETARY_CODECS) #endif // BUILDFLAG(ENABLE_FFMPEG_VIDEO_DECODERS) -- 2.39.2 (Apple Git-143)