diff options
author | JustKidding | 2023-01-29 19:47:40 -0500 |
---|---|---|
committer | JustKidding | 2023-01-29 19:47:40 -0500 |
commit | 1be77f627909176b0328871a5c4197b8ae56e8c3 (patch) | |
tree | 772e591fd54bd31adb8d2c082acae74faac05ad9 /vaapi-add-av1-support.patch | |
parent | e17dbb5b99125bc5913a652f1890d222e73093b5 (diff) | |
download | aur-1be77f627909176b0328871a5c4197b8ae56e8c3.tar.gz |
upgpkg: ungoogled-chromium 109.0.5414.119-2
add vaapi patch
Diffstat (limited to 'vaapi-add-av1-support.patch')
-rw-r--r-- | vaapi-add-av1-support.patch | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/vaapi-add-av1-support.patch b/vaapi-add-av1-support.patch new file mode 100644 index 000000000000..f1a62eb82de3 --- /dev/null +++ b/vaapi-add-av1-support.patch @@ -0,0 +1,51 @@ +From 1245d8c56a0e9197e20f73b33b31f2bf6cfbe4bd Mon Sep 17 00:00:00 2001 +From: Xuanxi Leng <xuanxi.leng@intel.com> +Date: Fri, 14 Oct 2022 09:36:39 -0400 +Subject: [PATCH] VaVDA: Add 'VDAVideoDecoder' support for AV1. + +This CL adds 'VDAVideoDecoder' support for AV1. + +Bug: 1325824 +Change-Id: I7787761c080aba680543e173bef12254ab7ccafe +--- + +diff --git a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +index 37e3520..4e77924 100644 +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -41,6 +41,7 @@ + #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/av1_vaapi_video_decoder_delegate.h" + #include "media/gpu/vp8_decoder.h" + #include "media/gpu/vp9_decoder.h" + #include "media/video/picture.h" +@@ -229,6 +230,12 @@ + 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 { + VLOGF(1) << "Unsupported profile " << GetProfileName(profile); + return false; +@@ -1196,12 +1203,11 @@ + VaapiVideoDecodeAccelerator::GetSupportedProfiles() { + VideoDecodeAccelerator::SupportedProfiles profiles = + VaapiWrapper::GetSupportedDecodeProfiles(); +- // VaVDA never supported VP9 Profile 2, AV1 and HEVC, but VaapiWrapper does. ++ // VaVDA never supported VP9 Profile 2 and HEVC, but VaapiWrapper does. + // 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 || codec == VideoCodec::kHEVC; + }); + return profiles; + } |