VA-API  2.22.0
va_fei_hevc.h
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2007-2017 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 
31 #ifndef __VA_FEI_HEVC_H__
32 #define __VA_FEI_HEVC_H__
33 
34 #ifdef __cplusplus
35 extern "C" {
36 #endif
37 
38 #include <stdint.h>
39 #include "va_fei.h"
40 
48 typedef struct _VAEncMiscParameterFEIFrameControlHEVC {
49  /* one of the VAConfigAttribFEIFunctionType values */
50  uint32_t function;
87 
91  uint32_t num_mv_predictors_l0 : 16;
92  uint32_t num_mv_predictors_l1 : 16;
93 
95  uint32_t search_path : 8;
96  uint32_t len_sp : 8;
97  uint32_t reserved0 : 16;
98 
104  uint32_t multi_pred_l0 : 4;
105  uint32_t multi_pred_l1 : 4;
112  uint32_t sub_pel_mode : 2;
113  uint32_t adaptive_search : 1;
122  uint32_t mv_predictor_input : 3;
124  uint32_t per_block_qp : 1;
126  uint32_t per_ctb_input : 1;
135  uint32_t force_lcu_split : 1;
137  uint32_t enable_cu64_check : 1;
139  uint32_t enable_cu64_amp_check : 1;
145  uint32_t cu64_skip_check_only : 1;
146  uint32_t reserved1 : 11;
149  uint32_t ref_width : 8;
152  uint32_t ref_height : 8;
164  uint32_t search_window : 8;
169  uint32_t fast_intra_mode : 1;
170  uint32_t reserved2 : 4;
171 
178  uint32_t reserved3 : 24;
179 
181  uint32_t max_frame_size;
183  uint32_t num_passes;
185  uint8_t *delta_qp;
186 
187  uint32_t reserved4[2];
189 
200 typedef struct _VAEncFEIMVPredictorHEVC {
204  struct {
205  uint8_t ref_idx_l0 : 4;
206  uint8_t ref_idx_l1 : 4;
207  } ref_idx[4]; /* index is predictor number */
213  uint32_t block_size : 2;
214  uint32_t reserved : 30;
215 
216  VAMotionVector mv[4]; /* MaxNumPredictor is 4 */
217 } VAEncFEIMVPredictorHEVC; //40 bytes
218 
220 typedef struct _VAEncFEICTBControlHEVC {
221  // DWORD 0
222  uint32_t force_to_intra : 1;
223  uint32_t force_to_inter : 1;
224  uint32_t force_to_skip : 1;
226  uint32_t force_to_zero_coeff : 1;
227  uint32_t reserved0 : 28;
228  // DWORD 1
229  uint32_t reserved1;
230  // DWORD 2
231  uint32_t reserved2;
232  // DWORD 3
233  uint32_t reserved3;
235 
240 typedef struct _VAEncFEIDistortionHevc {
242  uint32_t best_distortion;
246 
249 #ifdef __cplusplus
250 }
251 #endif
252 
253 #endif
254 
VAGenericID VABufferID
Definition: va.h:2019
FEI CTB level control data structure.
Definition: va_fei_hevc.h:220
uint32_t force_to_zero_coeff
force all coeff to zero
Definition: va_fei_hevc.h:226
VAEncFEIDistortionHevc defines the data structure for VAEncFEIDistortionBufferType per CTB block....
Definition: va_fei_hevc.h:240
uint32_t colocated_ctb_distortion
Definition: va_fei_hevc.h:244
uint32_t best_distortion
Definition: va_fei_hevc.h:242
Application can use this definition as reference to allocate the buffer based on MaxNumPredictor retu...
Definition: va_fei_hevc.h:200
uint32_t block_size
Valid only when MVPredictor is set to 011 for HEVC. Only valid in the first 16x16 block....
Definition: va_fei_hevc.h:213
FEI frame level control buffer for HEVC.
Definition: va_fei_hevc.h:48
uint8_t * delta_qp
delta QP list for every pass
Definition: va_fei_hevc.h:185
uint32_t num_concurrent_enc_frame_partition
specifies number of splits that encoder could be run concurrently 1: level 1, default value 2: level ...
Definition: va_fei_hevc.h:177
uint32_t force_lcu_split
Definition: va_fei_hevc.h:135
uint32_t ref_width
Definition: va_fei_hevc.h:149
uint32_t max_frame_size
max frame size control with multi passes QP setting
Definition: va_fei_hevc.h:181
uint32_t enable_cu64_amp_check
enables CU64x64 asymmetric motion partition check
Definition: va_fei_hevc.h:139
VABufferID mv_predictor
MV predictor. It is valid only when mv_predictor_input is set to non-zero. Each CTB block has one or ...
Definition: va_fei_hevc.h:86
uint32_t search_window
search window similar for AVC defines predefined search windows. If it is selected,...
Definition: va_fei_hevc.h:164
uint32_t per_ctb_input
enables the per CTB input , if 1, need ctb_ctrl to be a real surface ID
Definition: va_fei_hevc.h:126
VABufferID ctb_ctrl
CTB control input buffer. It is valid only when per_ctb_input is set to 1. The data in this buffer co...
Definition: va_fei_hevc.h:57
uint32_t multi_pred_l0
multi pred l0/1 0000: no internal MV predictor will be used 0001: spatial MV predictors 0100/1000: Re...
Definition: va_fei_hevc.h:104
uint32_t max_num_ime_search_center
number of internal MV predictors for IME searches
Definition: va_fei_hevc.h:166
uint32_t ref_height
Definition: va_fei_hevc.h:152
VABufferID qp
Qp input buffer. It is valid only when per_block_qp is set to 1. The data in this buffer correspond t...
Definition: va_fei_hevc.h:80
uint32_t enable_cu64_check
enables CU64x64 check
Definition: va_fei_hevc.h:137
uint32_t fast_intra_mode
fast intra prediction enabling bit. It is used as a trade-off between speed and quality....
Definition: va_fei_hevc.h:169
uint32_t per_block_qp
enables per CTB or CU qp
Definition: va_fei_hevc.h:124
uint32_t search_path
control parameters
Definition: va_fei_hevc.h:95
uint32_t num_passes
number of passes, every pass has different QP
Definition: va_fei_hevc.h:183
uint32_t mv_predictor_input
mv_predictor_input 000: MV predictor disabled 001: MV predictor enabled per 16x16 block 010: MV predi...
Definition: va_fei_hevc.h:122
uint32_t colocated_ctb_distortion
Definition: va_fei_hevc.h:129
uint32_t cu64_skip_check_only
specifies if check the 64x64 merge candidate 0: after skip check, 1: only skip check for 64x64 Defaul...
Definition: va_fei_hevc.h:145
uint32_t num_mv_predictors_l0
number of MV predictors L0 and L1. the maximum number of motion vector predictor for a 16x16,...
Definition: va_fei_hevc.h:91
VABufferID ctb_cmd
CTB cmd per CTB data output of ENC it is reserved for CTB level information it should include CU spli...
Definition: va_fei_hevc.h:63
VABufferID distortion
distortion output of ENC or ENC_PAK. Each CTB has one distortion data with VAEncFEIDistortionHevc Buf...
Definition: va_fei_hevc.h:75
uint32_t sub_pel_mode
defines the motion vector precision, like integer/half/quarter pel. 00b: integer pel 01b: half-pel 10...
Definition: va_fei_hevc.h:112
VABufferID cu_record
CU record data output of ENC it is reserved for CU level information it should include CU detail data...
Definition: va_fei_hevc.h:69
Generic motion vector data structure.
Definition: va.h:414
The FEI encoding common API.