From 685a611812227fd8c04432ac4ecdd66aa6973fbf Mon Sep 17 00:00:00 2001 From: =?utf8?q?V=C3=ADctor=20Manuel=20J=C3=A1quez=20Leal?= Date: Thu, 16 Jun 2022 16:33:14 +0200 Subject: [PATCH] va: Use driver implementation macro rather than function. Part-of: --- subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c | 6 ++---- subprojects/gst-plugins-bad/sys/va/gstvafilter.c | 6 ++---- 2 files changed, 4 insertions(+), 8 deletions(-) diff --git a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c index 5445a1d..5651c46 100644 --- a/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c +++ b/subprojects/gst-plugins-bad/gst-libs/gst/va/gstvaallocator.c @@ -533,8 +533,7 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator, } /* HACK(victor): disable tiling for i965 driver for RGB formats */ - if (gst_va_display_is_implementation (self->display, - GST_VA_IMPLEMENTATION_INTEL_I965) + if (GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_I965) && GST_VIDEO_INFO_IS_RGB (&self->info)) { /* *INDENT-OFF* */ ext_buf = (VASurfaceAttribExternalBuffers) { @@ -555,8 +554,7 @@ gst_va_dmabuf_allocator_setup_buffer_full (GstAllocator * allocator, return FALSE; /* workaround for missing layered dmabuf formats in i965 */ - if (gst_va_display_is_implementation (self->display, - GST_VA_IMPLEMENTATION_INTEL_I965) + if (GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_I965) && (fourcc == VA_FOURCC_YUY2 || fourcc == VA_FOURCC_UYVY)) { /* These are not representable as separate planes */ export_flags = VA_EXPORT_SURFACE_COMPOSED_LAYERS; diff --git a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c index 68eb8d6..f14f544 100644 --- a/subprojects/gst-plugins-bad/sys/va/gstvafilter.c +++ b/subprojects/gst-plugins-bad/sys/va/gstvafilter.c @@ -242,8 +242,7 @@ format_is_accepted (GstVaFilter * self, GstVideoFormat format) { /* https://github.com/intel/media-driver/issues/690 * https://github.com/intel/media-driver/issues/644 */ - if (!gst_va_display_is_implementation (self->display, - GST_VA_IMPLEMENTATION_INTEL_IHD)) + if (!GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_IHD)) return TRUE; switch (format) { @@ -1723,8 +1722,7 @@ gst_va_filter_has_compose (GstVaFilter * self) return FALSE; /* HACK(uartie): i965 can't do composition */ - if (gst_va_display_is_implementation (self->display, - GST_VA_IMPLEMENTATION_INTEL_I965)) + if (GST_VA_DISPLAY_IS_IMPLEMENTATION (self->display, INTEL_I965)) return FALSE; /* some drivers can compose, but may not support blending (e.g. GALLIUM) */ -- 2.7.4