From 13601f4071420ea6ade1aeb0512cfbbbfb62821b Mon Sep 17 00:00:00 2001 From: "U. Artie Eoff" Date: Tue, 25 Feb 2020 12:00:36 -0800 Subject: [PATCH] libs: display: add YUV to/from RGB color primary quirk The intel-media-driver (iHD) can't convert output color primaries when doing YUV to/from RGB CSC. --- gst-libs/gst/vaapi/gstvaapidisplay.c | 1 + gst-libs/gst/vaapi/gstvaapidisplay.h | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.c b/gst-libs/gst/vaapi/gstvaapidisplay.c index f4413a0866..045be5b4b5 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.c +++ b/gst-libs/gst/vaapi/gstvaapidisplay.c @@ -780,6 +780,7 @@ set_driver_quirks (GstVaapiDisplay * display) /* @XXX(victor): is this string enough to identify it */ { "AMD", GST_VAAPI_DRIVER_QUIRK_NO_CHECK_SURFACE_PUT_IMAGE }, { "i965", GST_VAAPI_DRIVER_QUIRK_NO_CHECK_VPP_COLOR_STD }, + { "iHD", GST_VAAPI_DRIVER_QUIRK_NO_RGBYUV_VPP_COLOR_PRIMARY }, }; /* *INDENT-ON* */ diff --git a/gst-libs/gst/vaapi/gstvaapidisplay.h b/gst-libs/gst/vaapi/gstvaapidisplay.h index 0f6f136afe..ecbe0709ab 100644 --- a/gst-libs/gst/vaapi/gstvaapidisplay.h +++ b/gst-libs/gst/vaapi/gstvaapidisplay.h @@ -94,11 +94,19 @@ typedef struct _GstVaapiDisplay GstVaapiDisplay; * https://gitlab.freedesktop.org/mesa/mesa/merge_requests/2016 * @GST_VAAPI_DRIVER_QUIRK_NO_CHECK_VPP_COLOR_STD: if driver does not * properly report supported vpp color standards. + * @GST_VAAPI_DRIVER_QUIRK_NO_RGBYUV_VPP_COLOR_PRIMARY: if driver can + * only do CSC from YUV to RGB, and vice-versa without changing the + * color standard primaries. This quirk is initially introduced to + * work around a problem in the intel-media-driver (iHD) reported here: + * https://github.com/intel/media-driver/issues/860. Once the driver + * issue is fixed, we should remove this quirk. Also see this issue: + * https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/issues/238 */ typedef enum { GST_VAAPI_DRIVER_QUIRK_NO_CHECK_SURFACE_PUT_IMAGE = (1U << 0), GST_VAAPI_DRIVER_QUIRK_NO_CHECK_VPP_COLOR_STD = (1U << 1), + GST_VAAPI_DRIVER_QUIRK_NO_RGBYUV_VPP_COLOR_PRIMARY = (1U << 2), } GstVaapiDriverQuirks; /**