OSDN Git Service

add VAConfigAttribDecJPEG attributes
authorpylee <penne.y.lee@intel.com>
Tue, 13 Jun 2017 14:10:04 +0000 (22:10 +0800)
committerXiang, Haihao <haihao.xiang@intel.com>
Wed, 22 Nov 2017 07:27:31 +0000 (23:27 -0800)
VAConfigAttribDecJPEG is for JPEG decode capabilities such as rotation

Signed-off-by: Carl.Zhang <carl.zhang@intel.com>
va/va.h
va/va_dec_jpeg.h
va/va_str.c

diff --git a/va/va.h b/va/va.h
index b9ac2dc..d8a9eaa 100644 (file)
--- a/va/va.h
+++ b/va/va.h
@@ -427,7 +427,14 @@ typedef enum
      * See \c VA_DEC_SLICE_MODE_xxx for the list of slice decoding modes.
      */
     VAConfigAttribDecSliceMode         = 6,
-
+   /**
+     * \brief JPEG decoding attribute. Read-only.
+     *
+     * This attribute exposes a number of capabilities of the underlying
+     * JPEG implementation. The attribute value is partitioned into fields as defined in the
+     * VAConfigAttribValDecJPEG union.
+     */
+    VAConfigAttribDecJPEG             = 7,
     /** @name Attributes for encoding */
     /**@{*/
     /**
@@ -615,6 +622,19 @@ typedef struct _VAConfigAttrib {
 #define VA_DEC_SLICE_MODE_NORMAL       0x00000001
 /** \brief Driver supports base mode for slice decoding */
 #define VA_DEC_SLICE_MODE_BASE         0x00000002
+
+/** @name Attribute values for VAConfigAttribDecJPEG */
+/**@{*/
+typedef union _VAConfigAttribValDecJPEG {
+    struct{
+    /** \brief Set to (1 << VA_ROTATION_xxx) for supported rotation angles. */
+    uint32_t rotation : 4;
+    /** \brief Reserved for future use. */
+    uint32_t reserved : 28;
+    }bits;
+    uint32_t value;
+    uint32_t va_reserved[VA_PADDING_LOW];
+} VAConfigAttribValDecJPEG;
 /**@}*/
 
 /** @name Attribute values for VAConfigAttribEncPackedHeaders */
index 0b44ffd..7bb26c2 100644 (file)
@@ -71,8 +71,12 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
     /** \brief Number of components in frame (Nf). */
     uint8_t       num_components;
 
+    /** \brief Input color space 0: YUV, 1: RGB, 2: BGR, others: reserved */
+    uint8_t       color_space;
+    /** \brief Set to VA_ROTATION_* for a single rotation angle reported by VAConfigAttribDecJPEG. */
+    uint32_t      rotation;
     /** \brief Reserved bytes for future use, must be zero */
-    uint32_t                va_reserved[VA_PADDING_MEDIUM];
+    uint32_t                va_reserved[VA_PADDING_MEDIUM - 1];
 } VAPictureParameterBufferJPEGBaseline;
 
 /**
index 8c04794..d9d2473 100644 (file)
@@ -98,6 +98,7 @@ const char *vaConfigAttribTypeStr(VAConfigAttribType configAttribType)
     TOSTR(VAConfigAttribEncRateControlExt);
     TOSTR(VAConfigAttribFEIFunctionType);
     TOSTR(VAConfigAttribFEIMVPredictors);
+    TOSTR(VAConfigAttribDecJPEG);
     case VAConfigAttribTypeMax: break;
     }
     return "<unknown config attribute type>";