OSDN Git Service

Add 10/12-bit YUV render target formats
[android-x86/hardware-intel-common-libva.git] / va / va.h
diff --git a/va/va.h b/va/va.h
index a8e8d14..b140c5e 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -375,7 +375,16 @@ typedef enum
     VAProfileVP9Profile0                = 19,
     VAProfileVP9Profile1                = 20,
     VAProfileVP9Profile2                = 21,
-    VAProfileVP9Profile3                = 22
+    VAProfileVP9Profile3                = 22,
+    VAProfileHEVCMain12                 = 23,
+    VAProfileHEVCMain422_10             = 24,
+    VAProfileHEVCMain422_12             = 25,
+    VAProfileHEVCMain444                = 26,
+    VAProfileHEVCMain444_10             = 27,
+    VAProfileHEVCMain444_12             = 28,
+    VAProfileHEVCSccMain                = 29,
+    VAProfileHEVCSccMain10              = 30,
+    VAProfileHEVCSccMain444             = 31
 } VAProfile;
 
 /**
@@ -754,27 +763,30 @@ typedef struct _VAConfigAttrib {
     uint32_t value; /* OR'd flags (bits) for this attribute */
 } VAConfigAttrib;
 
-/** attribute value for VAConfigAttribRTFormat */
-#define VA_RT_FORMAT_YUV420    0x00000001      
-#define VA_RT_FORMAT_YUV422    0x00000002
-#define VA_RT_FORMAT_YUV444    0x00000004
-#define VA_RT_FORMAT_YUV411    0x00000008
-#define VA_RT_FORMAT_YUV400    0x00000010
-/** YUV formats with more than 8 bpp */
-#define VA_RT_FORMAT_YUV420_10BPP      0x00000100
-/** RGB formats */
-#define VA_RT_FORMAT_RGB16     0x00010000
-#define VA_RT_FORMAT_RGB32     0x00020000
-/* RGBP covers RGBP and BGRP fourcc */ 
-#define VA_RT_FORMAT_RGBP      0x00100000
-/**
- * RGB 10-bit packed format with upper 2 bits as alpha channel.
- * The existing pre-defined fourcc codes can be used to signal
- * the position of each component for this RT format.
- */
-#define VA_RT_FORMAT_RGB32_10BPP 0x00200000
+/* Attribute values for VAConfigAttribRTFormat. */
+
+#define VA_RT_FORMAT_YUV420    0x00000001      ///< YUV 4:2:0 8-bit.
+#define VA_RT_FORMAT_YUV422    0x00000002      ///< YUV 4:2:2 8-bit.
+#define VA_RT_FORMAT_YUV444    0x00000004      ///< YUV 4:4:4 8-bit.
+#define VA_RT_FORMAT_YUV411    0x00000008      ///< YUV 4:1:1 8-bit.
+#define VA_RT_FORMAT_YUV400    0x00000010      ///< Greyscale 8-bit.
+#define VA_RT_FORMAT_YUV420_10 0x00000100      ///< YUV 4:2:0 10-bit.
+#define VA_RT_FORMAT_YUV422_10 0x00000200      ///< YUV 4:2:2 10-bit.
+#define VA_RT_FORMAT_YUV444_10 0x00000400      ///< YUV 4:4:4 10-bit.
+#define VA_RT_FORMAT_YUV420_12 0x00001000      ///< YUV 4:2:0 12-bit.
+#define VA_RT_FORMAT_YUV422_12 0x00002000      ///< YUV 4:2:2 12-bit.
+#define VA_RT_FORMAT_YUV444_12 0x00004000      ///< YUV 4:4:4 12-bit.
+
+#define VA_RT_FORMAT_RGB16     0x00010000      ///< Packed RGB, 16 bits per pixel.
+#define VA_RT_FORMAT_RGB32     0x00020000      ///< Packed RGB, 32 bits per pixel, 8 bits per colour sample.
+#define VA_RT_FORMAT_RGBP      0x00100000      ///< Planar RGB, 8 bits per sample.
+#define VA_RT_FORMAT_RGB32_10  0x00200000      ///< Packed RGB, 32 bits per pixel, 10 bits per colour sample.
+
 #define VA_RT_FORMAT_PROTECTED 0x80000000
 
+#define VA_RT_FORMAT_RGB32_10BPP       VA_RT_FORMAT_RGB32_10   ///< @deprecated use VA_RT_FORMAT_RGB32_10 instead.
+#define VA_RT_FORMAT_YUV420_10BPP      VA_RT_FORMAT_YUV420_10  ///< @deprecated use VA_RT_FORMAT_YUV420_10 instead.
+
 /** @name Attribute values for VAConfigAttribRateControl */
 /**@{*/
 /** \brief Driver does not support any form of rate control. */
@@ -1321,6 +1333,9 @@ typedef struct _VASurfaceAttribExternalBuffers {
 #define VA_SURFACE_ATTRIB_USAGE_HINT_VPP_WRITE         0x00000008
 /** \brief Surface used for display. */
 #define VA_SURFACE_ATTRIB_USAGE_HINT_DISPLAY   0x00000010
+/** \brief Surface used for export to third-party APIs, e.g. via
+ *  vaExportSurfaceHandle(). */
+#define VA_SURFACE_ATTRIB_USAGE_HINT_EXPORT    0x00000020
 
 /**@}*/
 
@@ -3583,6 +3598,14 @@ VAStatus vaQuerySurfaceError(
 #define VA_FOURCC_RGBP          0x50424752
 #define VA_FOURCC_BGRP          0x50524742
 #define VA_FOURCC_411R          0x52313134 /* rotated 411P */
+#define VA_FOURCC_RGB565        0x36314752 /* VA_FOURCC('R','G','1','6') */
+#define VA_FOURCC_BGR565        0x36314742 /* VA_FOURCC('B','G','1','6') */
+
+#define VA_FOURCC_Y210          0x30313259
+#define VA_FOURCC_Y216          0x36313259
+#define VA_FOURCC_Y410          0x30313459
+#define VA_FOURCC_Y416          0x36313459
+
 /**
  * Planar YUV 4:2:2.
  * 8-bit Y plane, followed by 8-bit 2x1 subsampled V and U planes