chromium: Update the VA-API patch (fix #81909)
This commit is contained in:
parent
b0737acd28
commit
735707ef0c
@ -1,6 +1,6 @@
|
|||||||
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
|
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
|
||||||
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
|
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.cc
|
||||||
@@ -635,6 +635,7 @@
|
@@ -641,6 +641,7 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
|
||||||
// |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
|
// |vpp_vaapi_wrapper_| for VaapiPicture to DownloadFromSurface() the VA's
|
||||||
// internal decoded frame.
|
// internal decoded frame.
|
||||||
if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
|
if (buffer_allocation_mode_ != BufferAllocationMode::kNone &&
|
||||||
@ -8,24 +8,22 @@
|
|||||||
!vpp_vaapi_wrapper_) {
|
!vpp_vaapi_wrapper_) {
|
||||||
vpp_vaapi_wrapper_ = VaapiWrapper::Create(
|
vpp_vaapi_wrapper_ = VaapiWrapper::Create(
|
||||||
VaapiWrapper::kVideoProcess, VAProfileNone,
|
VaapiWrapper::kVideoProcess, VAProfileNone,
|
||||||
@@ -650,7 +651,8 @@
|
@@ -665,7 +666,8 @@ void VaapiVideoDecodeAccelerator::AssignPictureBuffers(
|
||||||
// only used as a copy destination. Therefore, the VaapiWrapper used and
|
PictureBuffer buffer = buffers[i];
|
||||||
// owned by |picture| is |vpp_vaapi_wrapper_|.
|
buffer.set_size(requested_pic_size_);
|
||||||
std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
|
std::unique_ptr<VaapiPicture> picture = vaapi_picture_factory_->Create(
|
||||||
- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
|
- (buffer_allocation_mode_ == BufferAllocationMode::kNone)
|
||||||
+ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
|
+ ((buffer_allocation_mode_ == BufferAllocationMode::kNone) ||
|
||||||
+ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
|
+ (buffer_allocation_mode_ == BufferAllocationMode::kWrapVdpau))
|
||||||
? vaapi_wrapper_
|
? vaapi_wrapper_
|
||||||
: vpp_vaapi_wrapper_,
|
: vpp_vaapi_wrapper_,
|
||||||
make_context_current_cb_, bind_image_cb_, buffers[i]);
|
make_context_current_cb_, bind_image_cb_, buffer);
|
||||||
@@ -1077,6 +1079,14 @@
|
@@ -1093,6 +1095,12 @@ VaapiVideoDecodeAccelerator::GetSupportedProfiles() {
|
||||||
|
|
||||||
VaapiVideoDecodeAccelerator::BufferAllocationMode
|
VaapiVideoDecodeAccelerator::BufferAllocationMode
|
||||||
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
|
VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
|
||||||
+ // NVIDIA blobs use VDPAU
|
+ // NVIDIA blobs use VDPAU
|
||||||
+ if (base::StartsWith(VaapiWrapper::GetVendorStringForTesting(),
|
+ if (VaapiWrapper::GetImplementationType() == VAImplementation::kNVIDIAVDPAU) {
|
||||||
+ "Splitted-Desktop Systems VDPAU",
|
|
||||||
+ base::CompareCase::SENSITIVE)) {
|
|
||||||
+ LOG(INFO) << "VA-API driver on VDPAU backend";
|
+ LOG(INFO) << "VA-API driver on VDPAU backend";
|
||||||
+ return BufferAllocationMode::kWrapVdpau;
|
+ return BufferAllocationMode::kWrapVdpau;
|
||||||
+ }
|
+ }
|
||||||
@ -33,7 +31,7 @@
|
|||||||
// TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
|
// TODO(crbug.com/912295): Enable a better BufferAllocationMode for IMPORT
|
||||||
// |output_mode_| as well.
|
// |output_mode_| as well.
|
||||||
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
|
if (output_mode_ == VideoDecodeAccelerator::Config::OutputMode::IMPORT)
|
||||||
@@ -1089,7 +1099,7 @@
|
@@ -1105,7 +1113,7 @@ VaapiVideoDecodeAccelerator::DecideBufferAllocationMode() {
|
||||||
// depends on the bitstream and sometimes it's not enough to cover the amount
|
// depends on the bitstream and sometimes it's not enough to cover the amount
|
||||||
// of frames needed by the client pipeline (see b/133733739).
|
// of frames needed by the client pipeline (see b/133733739).
|
||||||
// TODO(crbug.com/911754): Enable for VP9 Profile 2.
|
// TODO(crbug.com/911754): Enable for VP9 Profile 2.
|
||||||
@ -44,7 +42,7 @@
|
|||||||
// an extra allocation for both |client_| and |decoder_|, see
|
// an extra allocation for both |client_| and |decoder_|, see
|
||||||
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h
|
--- a/media/gpu/vaapi/vaapi_video_decode_accelerator.h
|
||||||
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h
|
+++ b/media/gpu/vaapi/vaapi_video_decode_accelerator.h
|
||||||
@@ -204,6 +204,7 @@
|
@@ -204,6 +204,7 @@ class MEDIA_GPU_EXPORT VaapiVideoDecodeAccelerator
|
||||||
// Using |client_|s provided PictureBuffers and as many internally
|
// Using |client_|s provided PictureBuffers and as many internally
|
||||||
// allocated.
|
// allocated.
|
||||||
kNormal,
|
kNormal,
|
||||||
@ -52,3 +50,25 @@
|
|||||||
};
|
};
|
||||||
|
|
||||||
// Decides the concrete buffer allocation mode, depending on the hardware
|
// Decides the concrete buffer allocation mode, depending on the hardware
|
||||||
|
--- a/media/gpu/vaapi/vaapi_wrapper.cc
|
||||||
|
+++ b/media/gpu/vaapi/vaapi_wrapper.cc
|
||||||
|
@@ -131,6 +131,9 @@ media::VAImplementation VendorStringToImplementationType(
|
||||||
|
} else if (base::StartsWith(va_vendor_string, "Intel iHD driver",
|
||||||
|
base::CompareCase::SENSITIVE)) {
|
||||||
|
return media::VAImplementation::kIntelIHD;
|
||||||
|
+ } else if (base::StartsWith(va_vendor_string, "Splitted-Desktop Systems VDPAU",
|
||||||
|
+ base::CompareCase::SENSITIVE)) {
|
||||||
|
+ return media::VAImplementation::kNVIDIAVDPAU;
|
||||||
|
}
|
||||||
|
return media::VAImplementation::kOther;
|
||||||
|
}
|
||||||
|
--- a/media/gpu/vaapi/vaapi_wrapper.h
|
||||||
|
+++ b/media/gpu/vaapi/vaapi_wrapper.h
|
||||||
|
@@ -79,6 +79,7 @@ enum class VAImplementation {
|
||||||
|
kIntelIHD,
|
||||||
|
kOther,
|
||||||
|
kInvalid,
|
||||||
|
+ kNVIDIAVDPAU,
|
||||||
|
};
|
||||||
|
|
||||||
|
// This class handles VA-API calls and ensures proper locking of VA-API calls
|
||||||
|
Loading…
x
Reference in New Issue
Block a user