From ddb62b3694c30559a6321ca0adc02dd035bce1fc Mon Sep 17 00:00:00 2001 From: Alexander David Frick Date: Tue, 26 Oct 2021 08:52:46 -0500 Subject: [PATCH] Update vaapi_wrapper.cc --- media/gpu/vaapi/vaapi_wrapper.cc | 25 +++++-------------------- 1 file changed, 5 insertions(+), 20 deletions(-) diff --git a/media/gpu/vaapi/vaapi_wrapper.cc b/media/gpu/vaapi/vaapi_wrapper.cc index 129ce332..73a3bfd1 100644 --- a/media/gpu/vaapi/vaapi_wrapper.cc +++ b/media/gpu/vaapi/vaapi_wrapper.cc @@ -3028,27 +3028,12 @@ bool VaapiWrapper::CreateSurfaces( va_surfaces->resize(num_surfaces); - VASurfaceAttrib attribute{}; + VASurfaceAttrib attribute; memset(&attribute, 0, sizeof(attribute)); - if (GetImplementationType() != VAImplementation::kNVIDIAVDPAU) { - // Nvidia's VAAPI-VDPAU driver doesn't support this attribute - attribute.type = VASurfaceAttribUsageHint; - attribute.flags = VA_SURFACE_ATTRIB_SETTABLE; - attribute.value.type = VAGenericValueTypeInteger; - switch (usage_hint) { - case SurfaceUsageHint::kVideoDecoder: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_DECODER; - break; - case SurfaceUsageHint::kVideoEncoder: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_ENCODER; - break; - case SurfaceUsageHint::kVideoProcessWrite: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE; - break; - case SurfaceUsageHint::kGeneric: - attribute.value.value.i = VA_SURFACE_ATTRIB_USAGE_HINT_GENERIC; - break; - } + attribute.type = VASurfaceAttribUsageHint; + attribute.flags = VA_SURFACE_ATTRIB_SETTABLE; + attribute.value.type = VAGenericValueTypeInteger; + attribute.value.value.i = 0; for (SurfaceUsageHint usage_hint : usage_hints) attribute.value.value.i |= static_cast(usage_hint); static_assert(std::is_same::value,