libs: display: add YUV to/from RGB color primary quirk
authorU. Artie Eoff <ullysses.a.eoff@intel.com>
Tue, 25 Feb 2020 20:00:36 +0000 (12:00 -0800)
committerGStreamer Merge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Fri, 28 Feb 2020 11:09:11 +0000 (11:09 +0000)
The intel-media-driver (iHD) can't convert output color
primaries when doing YUV to/from RGB CSC.

gst-libs/gst/vaapi/gstvaapidisplay.c
gst-libs/gst/vaapi/gstvaapidisplay.h

index f4413a0..045be5b 100644 (file)
@@ -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* */
 
index 0f6f136..ecbe070 100644 (file)
@@ -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;
 
 /**