OSDN Git Service

Improve documentation for encode HRD parameters
[android-x86/hardware-intel-common-libva.git] / va / va_dec_jpeg.h
index 9936692..7bb26c2 100644 (file)
@@ -54,22 +54,29 @@ extern "C" {
  */
 typedef struct _VAPictureParameterBufferJPEGBaseline {
     /** \brief Picture width in pixels. */
-    unsigned short      picture_width;
+    uint16_t      picture_width;
     /** \brief Picture height in pixels. */
-    unsigned short      picture_height;
+    uint16_t      picture_height;
 
     struct {
         /** \brief Component identifier (Ci). */
-        unsigned char   component_id;
+        uint8_t   component_id;
         /** \brief Horizontal sampling factor (Hi). */
-        unsigned char   h_sampling_factor;
+        uint8_t   h_sampling_factor;
         /** \brief Vertical sampling factor (Vi). */
-        unsigned char   v_sampling_factor;
+        uint8_t   v_sampling_factor;
         /* \brief Quantization table selector (Tqi). */
-        unsigned char   quantiser_table_selector;
+        uint8_t   quantiser_table_selector;
     }                   components[255];
     /** \brief Number of components in frame (Nf). */
-    unsigned char       num_components;
+    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 - 1];
 } VAPictureParameterBufferJPEGBaseline;
 
 /**
@@ -83,49 +90,18 @@ typedef struct _VAPictureParameterBufferJPEGBaseline {
  * The #load_quantization_table array can be used as a hint to notify
  * the VA driver implementation about which table(s) actually changed
  * since the last submission of this buffer.
+ *
+ * The #quantiser_table values are specified in zig-zag scan order.
  */
 typedef struct _VAIQMatrixBufferJPEGBaseline {
     /** \brief Specifies which #quantiser_table is valid. */
-    unsigned char       load_quantiser_table[4];
+    uint8_t       load_quantiser_table[4];
     /** \brief Quanziation tables indexed by table identifier (Tqi). */
-    unsigned char       quantiser_table[4][64];
-} VAIQMatrixBufferJPEGBaseline;
+    uint8_t       quantiser_table[4][64];
 
-/**
- * \brief Huffman table for JPEG decoding.
- *
- * This structure holds the complete Huffman tables. This is an
- * aggregation of all Huffman table (DHT) segments maintained by the
- * application. i.e. up to 2 Huffman tables are stored in there for
- * baseline profile.
- *
- * The #load_huffman_table array can be used as a hint to notify the
- * VA driver implementation about which table(s) actually changed
- * since the last submission of this buffer.
- */
-typedef struct _VAHuffmanTableBufferJPEGBaseline {
-    /** \brief Specifies which #huffman_table is valid. */
-    unsigned char       load_huffman_table[2];
-    /** \brief Huffman tables indexed by table identifier (Th). */
-    struct {
-        /** @name DC table (up to 12 categories) */
-        /**@{*/
-        /** \brief Number of Huffman codes of length i + 1 (Li). */
-        unsigned char   num_dc_codes[16];
-        /** \brief Value associated with each Huffman code (Vij). */
-        unsigned char   dc_values[12];
-        /**@}*/
-        /** @name AC table (2 special codes + up to 16 * 10 codes) */
-        /**@{*/
-        /** \brief Number of Huffman codes of length i + 1 (Li). */
-        unsigned char   num_ac_codes[16];
-        /** \brief Value associated with each Huffman code (Vij). */
-        unsigned char   ac_values[162];
-        /** \brief Padding to 4-byte boundaries. Must be set to zero. */
-        unsigned char   pad[2];
-        /**@}*/
-    }                   huffman_table[2];
-} VAHuffmanTableBufferJPEGBaseline;
+    /** \brief Reserved bytes for future use, must be zero */
+    uint32_t                va_reserved[VA_PADDING_LOW];
+} VAIQMatrixBufferJPEGBaseline;
 
 /**
  * \brief Slice parameter for JPEG decoding.
@@ -138,33 +114,36 @@ typedef struct _VASliceParameterBufferJPEGBaseline {
     /** @name Codec-independent Slice Parameter Buffer base. */
     /**@{*/
     /** \brief Number of bytes in the slice data buffer for this slice. */
-    unsigned int        slice_data_size;
+    uint32_t        slice_data_size;
     /** \brief The offset to the first byte of the first MCU. */
-    unsigned int        slice_data_offset;
+    uint32_t        slice_data_offset;
     /** \brief Slice data buffer flags. See \c VA_SLICE_DATA_FLAG_xxx. */
-    unsigned int        slice_data_flag;
+    uint32_t        slice_data_flag;
     /**@}*/
 
     /** \brief Scan horizontal position. */
-    unsigned int        slice_horizontal_position;
+    uint32_t        slice_horizontal_position;
     /** \brief Scan vertical position. */
-    unsigned int        slice_vertical_position;
+    uint32_t        slice_vertical_position;
 
     struct {
         /** \brief Scan component selector (Csj). */
-        unsigned char   component_selector;
+        uint8_t   component_selector;
         /** \brief DC entropy coding table selector (Tdj). */
-        unsigned char   dc_table_selector;
+        uint8_t   dc_table_selector;
         /** \brief AC entropy coding table selector (Taj). */
-        unsigned char   ac_table_selector;
+        uint8_t   ac_table_selector;
     }                   components[4];
     /** \brief Number of components in scan (Ns). */
-    unsigned char       num_components;
+    uint8_t       num_components;
 
     /** \brief Restart interval definition (Ri). */
-    unsigned short      restart_interval;
+    uint16_t      restart_interval;
     /** \brief Number of MCUs in a scan. */
-    unsigned int        num_mcus;
+    uint32_t        num_mcus;
+
+    /** \brief Reserved bytes for future use, must be zero */
+    uint32_t                va_reserved[VA_PADDING_LOW];
 } VASliceParameterBufferJPEGBaseline;
 
 /**@}*/