OSDN Git Service

android: ignore unimportant compile warnnings
[android-x86/hardware-intel-common-libva.git] / va / va_enc_jpeg.h
1 /*
2  * Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.
3  *
4  * Permission is hereby granted, free of charge, to any person obtaining a
5  * copy of this software and associated documentation files (the
6  * "Software"), to deal in the Software without restriction, including
7  * without limitation the rights to use, copy, modify, merge, publish,
8  * distribute, sub license, and/or sell copies of the Software, and to
9  * permit persons to whom the Software is furnished to do so, subject to
10  * the following conditions:
11  *
12  * The above copyright notice and this permission notice (including the
13  * next paragraph) shall be included in all copies or substantial portions
14  * of the Software.
15  *
16  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
17  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT.
19  * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR
20  * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
21  * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
22  * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
23  */
24
25 /**
26  * \file va_enc_jpeg.h
27  * \brief JPEG encoding API
28  *
29  * This file contains the \ref api_enc_jpeg "JPEG encoding API".
30  */
31
32 #ifndef VA_ENC_JPEG_H
33 #define VA_ENC_JPEG_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40  * \defgroup api_enc_jpeg JPEG encoding API
41  *
42  * @{
43  */
44
45 /**
46  * \brief JPEG Encoding Picture Parameter Buffer Structure
47  *
48  * This structure conveys picture level parameters.
49  *
50  */
51 typedef struct  _VAEncPictureParameterBufferJPEG
52 {
53     /** \brief holds reconstructed picture. */
54     VASurfaceID reconstructed_picture;
55     /** \brief picture width. */
56     uint16_t picture_width;
57     /** \brief picture height. */
58     uint16_t picture_height;
59     /** \brief holds coded data. */
60     VABufferID coded_buf;
61
62     /** 
63      * \brief pic_flags
64      *
65      */
66     union {
67         struct {
68             /** 
69              * \brief profile: 
70              * 0 - Baseline, 1 - Extended, 2 - Lossless, 3 - Hierarchical
71              */ 
72             uint32_t profile     : 2;
73             /** 
74              * \brief progressive: 
75              * 0 - sequential, 1 - extended, 2 - progressive
76              */ 
77             uint32_t progressive : 1;
78             /** 
79              * \brief huffman: 
80              * 0 - arithmetic, 1 - huffman
81              */ 
82             uint32_t huffman     : 1;
83             /** 
84              * \brief interleaved: 
85              * 0 - non interleaved, 1 - interleaved
86              */ 
87             uint32_t interleaved : 1;
88             /** 
89              * \brief differential: 
90              * 0 - non differential, 1 - differential
91              */ 
92             uint32_t differential   : 1;
93         } bits;
94         uint32_t value;
95     } pic_flags;
96
97     /** \brief number of bits per sample. */
98     uint8_t    sample_bit_depth;
99     /** \brief total number of scans in image. */
100     uint8_t    num_scan;
101     /** \brief number of image components in frame. */
102     uint16_t   num_components;
103     /** \brief Component identifier (Ci). */
104     uint8_t    component_id[4];
105     /** \brief Quantization table selector (Tqi). */
106     uint8_t    quantiser_table_selector[4];
107     /** \brief number from 1 to 100 that specifies quality of image. */
108     uint8_t    quality;
109
110     /** \brief Reserved bytes for future use, must be zero */
111     uint32_t                va_reserved[VA_PADDING_LOW];
112 } VAEncPictureParameterBufferJPEG;
113
114
115 /**
116  * \brief Slice parameter for JPEG encoding. 
117  *
118  * This structure conveys slice (scan) level parameters.
119  *
120  */
121 typedef struct _VAEncSliceParameterBufferJPEG {
122     /** \brief Restart interval definition (Ri). */
123     uint16_t    restart_interval;
124     /** \brief number of image components in a scan. */
125     uint16_t    num_components;
126     struct {
127         /** \brief Scan component selector (Csj). */
128         uint8_t   component_selector;
129         /** \brief DC entropy coding table selector (Tdj). */
130         uint8_t   dc_table_selector;
131         /** \brief AC entropy coding table selector (Taj). */
132         uint8_t   ac_table_selector;
133     } components[4];
134
135     /** \brief Reserved bytes for future use, must be zero */
136     uint32_t                va_reserved[VA_PADDING_LOW];
137 } VAEncSliceParameterBufferJPEG;
138
139 /**
140  * \brief Quantization table for JPEG encoding.
141  *
142  */
143 typedef struct _VAQMatrixBufferJPEG
144 {
145     /** \brief load luma quantization table. */
146     int32_t load_lum_quantiser_matrix;
147     /** \brief load chroma quantization table. */
148     int32_t load_chroma_quantiser_matrix;
149     /** \brief luma quantization table. */
150     uint8_t lum_quantiser_matrix[64];
151     /** \brief chroma quantization table. */
152     uint8_t chroma_quantiser_matrix[64];
153
154     /** \brief Reserved bytes for future use, must be zero */
155     uint32_t                va_reserved[VA_PADDING_LOW];
156 } VAQMatrixBufferJPEG;
157
158 /**@}*/
159
160 #ifdef __cplusplus
161 }
162 #endif
163
164 #endif /* VA_ENC_JPEG_H */