dri: Add YVU formats
authorKristian Høgsberg Kristensen <kristian.h.kristensen@intel.com>
Wed, 27 Apr 2016 22:00:54 +0000 (15:00 -0700)
committerKristian Høgsberg Kristensen <krh@bitplanet.net>
Tue, 24 May 2016 17:14:57 +0000 (10:14 -0700)
Reviewed-by: Jordan Justen <jordan.l.justen@intel.com>
include/GL/internal/dri_interface.h
src/mesa/drivers/dri/i965/intel_screen.c

index 5cf34a4356f41075c4cd42350ed95edee6e12cbf..4008658dcef6b4d293bbaaf7e51ac467b4c990ad 100644 (file)
@@ -1163,6 +1163,11 @@ struct __DRIdri2ExtensionRec {
 #define __DRI_IMAGE_FOURCC_NV16                0x3631564e
 #define __DRI_IMAGE_FOURCC_YUYV                0x56595559
 
+#define __DRI_IMAGE_FOURCC_YVU410      0x39555659
+#define __DRI_IMAGE_FOURCC_YVU411      0x31315659
+#define __DRI_IMAGE_FOURCC_YVU420      0x32315659
+#define __DRI_IMAGE_FOURCC_YVU422      0x36315659
+#define __DRI_IMAGE_FOURCC_YVU444      0x34325659
 
 /**
  * Queryable on images created by createImageFromNames.
index 2a6d9d8387cb84bc1a0ef3f6583b5d64d1e42afe..19a66786e303b792f88f737dbe93f1392af363a0 100644 (file)
@@ -258,6 +258,31 @@ static struct intel_image_format intel_image_formats[] = {
        { 1, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
        { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
 
+   { __DRI_IMAGE_FOURCC_YVU410, __DRI_IMAGE_COMPONENTS_Y_U_V, 3,
+     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 2, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 1, 2, 2, __DRI_IMAGE_FORMAT_R8, 1 } } },
+
+   { __DRI_IMAGE_FOURCC_YVU411, __DRI_IMAGE_COMPONENTS_Y_U_V, 3,
+     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 2, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 1, 2, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
+
+   { __DRI_IMAGE_FOURCC_YVU420, __DRI_IMAGE_COMPONENTS_Y_U_V, 3,
+     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 2, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 1, 1, 1, __DRI_IMAGE_FORMAT_R8, 1 } } },
+
+   { __DRI_IMAGE_FOURCC_YVU422, __DRI_IMAGE_COMPONENTS_Y_U_V, 3,
+     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 2, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 1, 1, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
+
+   { __DRI_IMAGE_FOURCC_YVU444, __DRI_IMAGE_COMPONENTS_Y_U_V, 3,
+     { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 2, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
+       { 1, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 } } },
+
    { __DRI_IMAGE_FOURCC_NV12, __DRI_IMAGE_COMPONENTS_Y_UV, 2,
      { { 0, 0, 0, __DRI_IMAGE_FORMAT_R8, 1 },
        { 1, 1, 1, __DRI_IMAGE_FORMAT_GR88, 2 } } },