OSDN Git Service

Changed values for VASurfaceAttribMemoryType from fourcc to bit fields.
authorJonathan Bian <jonathan.bian@intel.com>
Mon, 17 Sep 2012 04:26:00 +0000 (21:26 -0700)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 5 Jun 2013 01:38:35 +0000 (09:38 +0800)
va/va.h
va/va_android.h
va/va_drmcommon.h

diff --git a/va/va.h b/va/va.h
index 78e0e9f..42b77f8 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -655,7 +655,7 @@ typedef enum {
     VASurfaceAttribMinHeight,
     /** \brief Maximal height in pixels (int, read-only). */
     VASurfaceAttribMaxHeight,
-    /** \brief Surface memory type in fourcc (int, read/write). */
+    /** \brief Surface memory type expressed in bit fields (int, read/write). */
     VASurfaceAttribMemoryType,
     /** \brief External buffer descriptor (pointer, write). */
     VASurfaceAttribExternalBufferDescriptor,
@@ -673,14 +673,19 @@ typedef struct _VASurfaceAttrib {
     VAGenericValue      value;
 } VASurfaceAttrib;
 
-/** @name VASurfaceAttribMemoryType values in fourcc */
+/** 
+ * @name VASurfaceAttribMemoryType values in bit fields. 
+ * Bit 0:7 are reserved for generic types, Bit 31:28 are reserved for 
+ * Linux DRM, Bit 23:20 are reserved for Android. DRM and Android specific
+ * types are defined in DRM and Android header files.
+ */
 /**@{*/
-/** \brief VA memory type (default) is supported. VAVA in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_VA                  0x41564156
-/** \brief V4L2 buffer memory type is supported. V4L2 in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_V4L2                        0x324C3456
-/** \brief User pointer memory type is supported. UPTR in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR            0x52545055
+/** \brief VA memory type (default) is supported. */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_VA                  0x00000001
+/** \brief V4L2 buffer memory type is supported. */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_V4L2                        0x00000002
+/** \brief User pointer memory type is supported. */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_USER_PTR            0x00000004
 /**@}*/
 
 /** 
index a9a8e52..a5d0e2f 100644 (file)
@@ -26,8 +26,8 @@
 
 #include <va/va.h>
 
-/** \brief Android Gralloc buffer memory type "AGRA" in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_ANDROID_GRALLOC     0x41524741
+/** \brief Android Gralloc buffer memory type. */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_ANDROID_GRALLOC     0x00100000
 
 #ifdef __cplusplus
 extern "C" {
index 47dd371..76820a3 100644 (file)
@@ -68,9 +68,9 @@ struct drm_state {
     int         auth_type;
 };
 
-/** \brief Kernel DRM buffer memory type "KDRM" in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM          0x4D52444B
-/** \brief DRM PRIME memory type "DPRI" in fourcc */
-#define VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME           0x49525044
+/** \brief Kernel DRM buffer memory type */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_KERNEL_DRM          0x10000000
+/** \brief DRM PRIME memory type. */
+#define VA_SURFACE_ATTRIB_MEM_TYPE_DRM_PRIME           0x20000000
 
 #endif /* VA_DRM_COMMON_H */