summarylogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.SRCINFO6
-rw-r--r--PKGBUILD13
-rw-r--r--remove-main-main10-profile-limit.patch36
-rw-r--r--vaapi-add-av1-hevc-support.patch42
4 files changed, 71 insertions, 26 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 71ffc728df0e..45fc07a3e566 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -67,7 +67,7 @@ pkgbase = ungoogled-chromium
source = use-oauth2-client-switches-as-default.patch
source = ungoogled-chromium-112.0.5615.49-1.tar.gz::https://github.com/ungoogled-software/ungoogled-chromium/archive/112.0.5615.49-1.tar.gz
source = ozone-add-va-api-support-to-wayland.patch
- source = vaapi-add-av1-support.patch
+ source = vaapi-add-av1-hevc-support.patch
source = remove-main-main10-profile-limit.patch
sha256sums = ddfd37373c1fa0f433a6ac11f0baa2b1f3fdfb9c7b5867e32a4300f2eb5aff41
sha256sums = 213e50f48b67feb4441078d50b0fd431df34323be15be97c55302d3fdac4483a
@@ -76,7 +76,7 @@ pkgbase = ungoogled-chromium
sha256sums = e393174d7695d0bafed69e868c5fbfecf07aa6969f3b64596d0bae8b067e1711
sha256sums = 9048669535558d2a6cd264539c6588d0218ba2b12950d3ed057ef3ec5fee1baa
sha256sums = e9e8d3a82da818f0a67d4a09be4ecff5680b0534d7f0198befb3654e9fab5b69
- sha256sums = e742cc5227b6ad6c3e0c2026edd561c6d3151e7bf0afb618578ede181451b307
- sha256sums = fc810e3c495c77ac60b383a27e48cf6a38b4a95b65dd2984baa297c5df83133c
+ sha256sums = dfa5251a649f3e0ab43538a20eefd5747217c2deaf34f8a761af54491356580a
+ sha256sums = be8d3475427553feb5bd46665ead3086301ed93c9a41cf6cc2644811c5bda51c
pkgname = ungoogled-chromium
diff --git a/PKGBUILD b/PKGBUILD
index e535d2bbf53d..a5c80751369d 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -51,13 +51,15 @@ _uc_ver=$pkgver-1
source=(${source[@]}
$pkgname-$_uc_ver.tar.gz::https://github.com/$_uc_usr/ungoogled-chromium/archive/$_uc_ver.tar.gz
ozone-add-va-api-support-to-wayland.patch
- vaapi-add-av1-support.patch
+ #vaapi-add-av1-support.patch
+ vaapi-add-av1-hevc-support.patch
remove-main-main10-profile-limit.patch)
sha256sums=(${sha256sums[@]}
'9048669535558d2a6cd264539c6588d0218ba2b12950d3ed057ef3ec5fee1baa'
'e9e8d3a82da818f0a67d4a09be4ecff5680b0534d7f0198befb3654e9fab5b69'
- 'e742cc5227b6ad6c3e0c2026edd561c6d3151e7bf0afb618578ede181451b307'
- 'fc810e3c495c77ac60b383a27e48cf6a38b4a95b65dd2984baa297c5df83133c')
+ #'e742cc5227b6ad6c3e0c2026edd561c6d3151e7bf0afb618578ede181451b307'
+ 'dfa5251a649f3e0ab43538a20eefd5747217c2deaf34f8a761af54491356580a'
+ 'be8d3475427553feb5bd46665ead3086301ed93c9a41cf6cc2644811c5bda51c')
# Possible replacements are listed in build/linux/unbundle/replace_gn_files.py
# Keys are the names in the above script; values are the dependencies in Arch
@@ -132,8 +134,9 @@ prepare() {
# Custom Patches
patch -Np1 -i ../ozone-add-va-api-support-to-wayland.patch
- #patch -Np1 -i ../remove-main-main10-profile-limit.patch
- patch -Np1 -i ../vaapi-add-av1-support.patch
+ patch -Np1 -i ../remove-main-main10-profile-limit.patch
+ #patch -Np1 -i ../vaapi-add-av1-support.patch
+ patch -Np1 -i ../vaapi-add-av1-hevc-support.patch
# Ungoogled Chromium changes
_ungoogled_repo="$srcdir/$pkgname-$_uc_ver"
diff --git a/remove-main-main10-profile-limit.patch b/remove-main-main10-profile-limit.patch
index d2f5c90a8991..15bd6a7e29a3 100644
--- a/remove-main-main10-profile-limit.patch
+++ b/remove-main-main10-profile-limit.patch
@@ -1,13 +1,16 @@
diff --git a/media/base/supported_types.cc b/media/base/supported_types.cc
-index c47d83f..ebbbce5 100644
+index 2ebbdf9..861dc50 100644
--- a/media/base/supported_types.cc
+++ b/media/base/supported_types.cc
-@@ -205,28 +205,7 @@ bool IsHevcProfileSupported(const VideoType& type) {
- return false;
+@@ -205,28 +205,7 @@ bool IsAudioCodecProprietary(AudioCodec codec) {
+ #endif // !BUILDFLAG(USE_PROPRIETARY_CODECS)
- #if BUILDFLAG(ENABLE_PLATFORM_HEVC)
--#if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) || \
-- BUILDFLAG(IS_MAC)
+ 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
@@ -15,19 +18,16 @@ index c47d83f..ebbbce5 100644
- // for HEVC support.
- if (base::CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kLacrosEnablePlatformHevc)) {
-- return true;
+ return true;
- }
-#endif // BUILDFLAG(IS_CHROMEOS_LACROS)
- return GetSupplementalProfileCache()->IsProfileSupported(type.profile);
--#elif BUILDFLAG(IS_ANDROID)
-- // Technically android 5.0 mandates support for only HEVC main profile,
-- // however some platforms (like chromecast) have had more profiles supported
-- // so we'll see what happens if we just enable them all.
-- return base::FeatureList::IsEnabled(kPlatformHEVCDecoderSupport);
-#else
- return true;
--#endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_CHROMEOS) || BUILDFLAG(IS_LINUX) ||
-- // BUILDFLAG(IS_MAC)
- #else
- return false;
- #endif // BUILDFLAG(ENABLE_PLATFORM_HEVC)
+- return true;
+-#endif // BUIDFLAG(PLATFORM_HAS_OPTIONAL_HEVC_SUPPORT)
+-#else
+- return false;
+-#endif // BUILDFLAG(ENABLE_PLATFORM_HEVC)
+ }
+
+ bool IsVp9ProfileSupported(const VideoType& type) {
diff --git a/vaapi-add-av1-hevc-support.patch b/vaapi-add-av1-hevc-support.patch
new file mode 100644
index 000000000000..b992f637db04
--- /dev/null
+++ b/vaapi-add-av1-hevc-support.patch
@@ -0,0 +1,42 @@
+diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+index dd22c7c..dd76a98 100644
+--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
+@@ -41,6 +41,8 @@
+ #include "media/gpu/vaapi/vaapi_utils.h"
+ #include "media/gpu/vaapi/vp8_vaapi_video_decoder_delegate.h"
+ #include "media/gpu/vaapi/vp9_vaapi_video_decoder_delegate.h"
++#include "media/gpu/vaapi/h265_vaapi_video_decoder_delegate.h"
++#include "media/gpu/vaapi/av1_vaapi_video_decoder_delegate.h"
+ #include "media/gpu/vp8_decoder.h"
+ #include "media/gpu/vp9_decoder.h"
+ #include "media/video/picture.h"
+@@ -230,6 +232,18 @@ bool VaapiVideoDecodeAccelerator::Initialize(const Config& config,
+ decoder_delegate_ = accelerator.get();
+ decoder_.reset(new VP9Decoder(std::move(accelerator), profile,
+ config.container_color_space));
++ } else if (profile >= AV1PROFILE_MIN && profile <= AV1PROFILE_MAX) {
++ auto accelerator =
++ std::make_unique<AV1VaapiVideoDecoderDelegate>(this, vaapi_wrapper_);
++ decoder_delegate_ = accelerator.get();
++ decoder_.reset(new AV1Decoder(std::move(accelerator), profile,
++ config.container_color_space));
++ } else if (profile >= H265PROFILE_MIN && profile <= H265PROFILE_MAX) {
++ auto accelerator =
++ std::make_unique<H265VaapiVideoDecoderDelegate>(this, vaapi_wrapper_);
++ decoder_delegate_ = accelerator.get();
++ decoder_.reset(new H265Decoder(std::move(accelerator), profile,
++ config.container_color_space));
+ } else {
+ VLOGF(1) << "Unsupported profile " << GetProfileName(profile);
+ return false;
+@@ -1201,8 +1215,7 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
+ // Filter them out.
+ base::EraseIf(profiles, [](const auto& profile) {
+ VideoCodec codec = VideoCodecProfileToVideoCodec(profile.profile);
+- return profile.profile == VP9PROFILE_PROFILE2 ||
+- codec == VideoCodec::kAV1 || codec == VideoCodec::kHEVC;
++ return profile.profile == VP9PROFILE_PROFILE2;
+ });
+ return profiles;
+ }