2 * Copyright (c) 2007-2013 Intel Corporation. All Rights Reserved.
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:
12 * The above copyright notice and this permission notice (including the
13 * next paragraph) shall be included in all copies or substantial portions
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.
27 * \brief JPEG encoding API
29 * This file contains the \ref api_enc_jpeg "JPEG encoding API".
40 * \defgroup api_enc_jpeg JPEG encoding API
46 * \brief JPEG Encoding Picture Parameter Buffer Structure
48 * This structure conveys picture level parameters.
51 typedef struct _VAEncPictureParameterBufferJPEG
53 /** \brief holds reconstructed picture. */
54 VASurfaceID reconstructed_picture
;
55 /** \brief picture width. */
56 unsigned short picture_width
;
57 /** \brief picture height. */
58 unsigned short picture_height
;
59 /** \brief holds coded data. */
70 * 0 - Baseline, 1 - Extended, 2 - Lossless, 3 - Hierarchical
72 unsigned int profile
: 2;
75 * 0 - sequential, 1 - extended, 2 - progressive
77 unsigned int progressive
: 1;
80 * 0 - arithmetic, 1 - huffman
82 unsigned int huffman
: 1;
85 * 0 - non interleaved, 1 - interleaved
87 unsigned int interleaved
: 1;
89 * \brief differential:
90 * 0 - non differential, 1 - differential
92 unsigned int differential
: 1;
97 /** \brief number of bits per sample. */
98 unsigned char sample_bit_depth
;
99 /** \brief total number of scans in image. */
100 unsigned char num_scan
;
101 /** \brief number of image components in frame. */
102 unsigned short num_components
;
103 /** \brief Component identifier (Ci). */
104 unsigned char component_id
[4];
105 /** \brief Quantization table selector (Tqi). */
106 unsigned char quantiser_table_selector
[4];
107 /** \brief number from 1 to 100 that specifies quality of image. */
108 unsigned char quality
;
110 } VAEncPictureParameterBufferJPEG
;
114 * \brief Slice parameter for JPEG encoding.
116 * This structure conveys slice (scan) level parameters.
119 typedef struct _VAEncSliceParameterBufferJPEG
{
120 /** \brief Restart interval definition (Ri). */
121 unsigned short restart_interval
;
122 /** \brief number of image components in a scan. */
123 unsigned short num_components
;
125 /** \brief Scan component selector (Csj). */
126 unsigned char component_selector
;
127 /** \brief DC entropy coding table selector (Tdj). */
128 unsigned char dc_table_selector
;
129 /** \brief AC entropy coding table selector (Taj). */
130 unsigned char ac_table_selector
;
132 } VAEncSliceParameterBufferJPEG
;
135 * \brief Quantization table for JPEG encoding.
138 typedef struct _VAQMatrixBufferJPEG
140 /** \brief load luma quantization table. */
141 int load_lum_quantiser_matrix
;
142 /** \brief load chroma quantization table. */
143 int load_chroma_quantiser_matrix
;
144 /** \brief luma quantization table. */
145 unsigned char lum_quantiser_matrix
[64];
146 /** \brief chroma quantization table. */
147 unsigned char chroma_quantiser_matrix
[64];
148 } VAQMatrixBufferJPEG
;
156 #endif /* VA_ENC_JPEG_H */