diff options
author | jk | 2019-11-22 20:41:27 -0500 |
---|---|---|
committer | jk | 2019-11-22 20:41:27 -0500 |
commit | d94f5e13dfca9ff5e1f61dfae19569b4e981ffaf (patch) | |
tree | 01eb42170d2ae83dcc61d7ed66b83bb02e30a1f9 /vaapi-fix.patch | |
download | aur-d94f5e13dfca9ff5e1f61dfae19569b4e981ffaf.tar.gz |
initial commit
Diffstat (limited to 'vaapi-fix.patch')
-rw-r--r-- | vaapi-fix.patch | 54 |
1 files changed, 54 insertions, 0 deletions
diff --git a/vaapi-fix.patch b/vaapi-fix.patch new file mode 100644 index 000000000000..a1343731dcaf --- /dev/null +++ b/vaapi-fix.patch @@ -0,0 +1,54 @@ +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc +@@ -635,6 +635,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( + // |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's + // internal decoded frame. + if (buffer_allocation_mode_ != BufferAllocationMode::kNone && ++ buffer_allocation_mode_ != BufferAllocationMode::kWrapVdpau && + !vpp_vaapi_wrapper_) { + vpp_vaapi_wrapper_ = VaapiWrapper::Create( + VaapiWrapper::kVideoProcess, VAProfileNone, +@@ -650,7 +651,8 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers( + // only used as a copy destination. Therefore, the VaapiWrapper used and + // owned by |picture| is |vpp_vaapi_wrapper_|. + std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create( +- (buffer_allocation_mode_ == BufferAllocationMode::kNone) ++ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) || ++ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau)) + ? vaapi_wrapper_ + : vpp_vaapi_wrapper_, + make_context_current_cb_, bind_image_cb_, buffers[i]); +@@ -1077,6 +1079,14 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() { + + VaapiVideoDecodeAccelerator::BufferAllocationMode + VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { ++ // NVIDIA blobs use VDPAU ++ if (base::StartsWith(VaapiWrapper::GetVendorStringForTesting(), ++ "Splitted-Desktop Systems VDPAU", ++ base::CompareCase::SENSITIVE)) { ++ LOG(INFO) << "VA-API driver on VDPAU backend"; ++ return BufferAllocationMode::kWrapVdpau; ++ } ++ + // TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT + // |output_mode_| as well. + if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT) +@@ -1089,7 +1099,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() { + // depends on the bitstream and sometimes it's not enough to cover the amount + // of frames needed by the client pipeline (see b/133733739). + // TODO(crbug.com/911754): Enable for VP9 Profile 2. +- if (IsGeminiLakeOrLater() && ++ if (false && IsGeminiLakeOrLater() && + (profile_ == VP9PROFILE_PROFILE0 || profile_ == VP8PROFILE_ANY)) { + // Add one to the reference frames for the one being currently egressed, and + // an extra allocation for both |client_| and |decoder_|, see +--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h ++++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h +@@ -204,6 +204,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator + // Using |client_|s provided PictureBuffers and as many internally + // allocated. + kNormal, ++ kWrapVdpau, + }; + + // Decides the concrete buffer allocation mode, depending on the hardware |