VA-API  2.22.0
va_enc_jpeg.h
Go to the documentation of this file.
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 
32 #ifndef VA_ENC_JPEG_H
33 #define VA_ENC_JPEG_H
34 
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38 
51 typedef struct _VAEncPictureParameterBufferJPEG {
53  VASurfaceID reconstructed_picture;
55  uint16_t picture_width;
57  uint16_t picture_height;
60 
65  union {
66  struct {
71  uint32_t profile : 2;
76  uint32_t progressive : 1;
81  uint32_t huffman : 1;
86  uint32_t interleaved : 1;
91  uint32_t differential : 1;
92  } bits;
93  uint32_t value;
94  } pic_flags;
95 
99  uint8_t num_scan;
101  uint16_t num_components;
103  uint8_t component_id[4];
105  uint8_t quantiser_table_selector[4];
107  uint8_t quality;
108 
110  uint32_t va_reserved[VA_PADDING_LOW];
112 
113 
120 typedef struct _VAEncSliceParameterBufferJPEG {
124  uint16_t num_components;
125  struct {
132  } components[4];
133 
135  uint32_t va_reserved[VA_PADDING_LOW];
137 
142 typedef struct _VAQMatrixBufferJPEG {
148  uint8_t lum_quantiser_matrix[64];
150  uint8_t chroma_quantiser_matrix[64];
151 
153  uint32_t va_reserved[VA_PADDING_LOW];
155 
158 #ifdef __cplusplus
159 }
160 #endif
161 
162 #endif /* VA_ENC_JPEG_H */
#define VA_PADDING_LOW
Definition: va.h:360
VAGenericID VABufferID
Definition: va.h:2019
JPEG Encoding Picture Parameter Buffer Structure.
Definition: va_enc_jpeg.h:51
uint8_t sample_bit_depth
number of bits per sample.
Definition: va_enc_jpeg.h:97
uint32_t interleaved
interleaved: 0 - non interleaved, 1 - interleaved
Definition: va_enc_jpeg.h:86
uint8_t num_scan
total number of scans in image.
Definition: va_enc_jpeg.h:99
uint32_t profile
profile: 0 - Baseline, 1 - Extended, 2 - Lossless, 3 - Hierarchical
Definition: va_enc_jpeg.h:71
uint16_t picture_width
picture width.
Definition: va_enc_jpeg.h:55
uint16_t num_components
number of image components in frame.
Definition: va_enc_jpeg.h:101
VABufferID coded_buf
holds coded data.
Definition: va_enc_jpeg.h:59
uint8_t quality
number from 1 to 100 that specifies quality of image.
Definition: va_enc_jpeg.h:107
uint32_t huffman
huffman: 0 - arithmetic, 1 - huffman
Definition: va_enc_jpeg.h:81
uint32_t differential
differential: 0 - non differential, 1 - differential
Definition: va_enc_jpeg.h:91
VASurfaceID reconstructed_picture
holds reconstructed picture.
Definition: va_enc_jpeg.h:53
uint16_t picture_height
picture height.
Definition: va_enc_jpeg.h:57
uint32_t progressive
progressive: 0 - sequential, 1 - extended, 2 - progressive
Definition: va_enc_jpeg.h:76
Slice parameter for JPEG encoding.
Definition: va_enc_jpeg.h:120
uint8_t component_selector
Scan component selector (Csj).
Definition: va_enc_jpeg.h:127
uint16_t restart_interval
Restart interval definition (Ri).
Definition: va_enc_jpeg.h:122
uint8_t ac_table_selector
AC entropy coding table selector (Taj).
Definition: va_enc_jpeg.h:131
uint16_t num_components
number of image components in a scan.
Definition: va_enc_jpeg.h:124
uint8_t dc_table_selector
DC entropy coding table selector (Tdj).
Definition: va_enc_jpeg.h:129
Quantization table for JPEG encoding.
Definition: va_enc_jpeg.h:142
int32_t load_lum_quantiser_matrix
load luma quantization table.
Definition: va_enc_jpeg.h:144
int32_t load_chroma_quantiser_matrix
load chroma quantization table.
Definition: va_enc_jpeg.h:146