VA-API  2.8.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 {
50  /* one of the VAConfigAttribFEIFunctionType values */
51  uint32_t function;
88 
92  uint32_t num_mv_predictors_l0 : 16;
93  uint32_t num_mv_predictors_l1 : 16;
94 
96  uint32_t search_path : 8;
97  uint32_t len_sp : 8;
98  uint32_t reserved0 : 16;
99 
105  uint32_t multi_pred_l0 : 4;
106  uint32_t multi_pred_l1 : 4;
113  uint32_t sub_pel_mode : 2;
114  uint32_t adaptive_search : 1;
123  uint32_t mv_predictor_input : 3;
125  uint32_t per_block_qp : 1;
127  uint32_t per_ctb_input : 1;
136  uint32_t force_lcu_split : 1;
138  uint32_t enable_cu64_check : 1;
140  uint32_t enable_cu64_amp_check : 1;
146  uint32_t cu64_skip_check_only : 1;
147  uint32_t reserved1 : 11;
150  uint32_t ref_width : 8;
153  uint32_t ref_height : 8;
165  uint32_t search_window : 8;
170  uint32_t fast_intra_mode : 1;
171  uint32_t reserved2 : 4;
172 
179  uint32_t reserved3 : 24;
180 
182  uint32_t max_frame_size;
184  uint32_t num_passes;
186  uint8_t *delta_qp;
187 
188  uint32_t reserved4[2];
190 
201 typedef struct _VAEncFEIMVPredictorHEVC
202 {
206  struct {
207  uint8_t ref_idx_l0 : 4;
208  uint8_t ref_idx_l1 : 4;
209  } ref_idx[4]; /* index is predictor number */
215  uint32_t block_size : 2;
216  uint32_t reserved : 30;
217 
218  VAMotionVector mv[4]; /* MaxNumPredictor is 4 */
219 } VAEncFEIMVPredictorHEVC; //40 bytes
220 
222 typedef struct _VAEncFEICTBControlHEVC
223 {
224  // DWORD 0
225  uint32_t force_to_intra : 1;
226  uint32_t force_to_inter : 1;
227  uint32_t force_to_skip : 1;
229  uint32_t force_to_zero_coeff : 1;
230  uint32_t reserved0 : 28;
231  // DWORD 1
232  uint32_t reserved1;
233  // DWORD 2
234  uint32_t reserved2;
235  // DWORD 3
236  uint32_t reserved3;
238 
243 typedef struct _VAEncFEIDistortionHevc
244 {
246  uint32_t best_distortion;
250 #ifdef __cplusplus
251 }
252 #endif
253 
254 #endif
255 
Application can use this definition as reference to allocate the buffer based on MaxNumPredictor retu...
Definition: va_fei_hevc.h:201
uint32_t ref_height
Definition: va_fei_hevc.h:153
uint32_t best_distortion
Definition: va_fei_hevc.h:246
uint32_t fast_intra_mode
fast intra prediction enabling bit. It is used as a trade-off between speed and quality. The flag will be ignored if it&#39;s unsupported in the driver
Definition: va_fei_hevc.h:170
uint32_t per_block_qp
enables per CTB or CU qp
Definition: va_fei_hevc.h:125
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:64
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:113
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:123
uint32_t force_to_zero_coeff
force all coeff to zero
Definition: va_fei_hevc.h:229
uint32_t colocated_ctb_distortion
Definition: va_fei_hevc.h:248
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:105
Generic motion vector data structure.
Definition: va.h:279
uint32_t max_frame_size
max frame size control with multi passes QP setting
Definition: va_fei_hevc.h:182
FEI CTB level control data structure.
Definition: va_fei_hevc.h:222
uint32_t force_lcu_split
Definition: va_fei_hevc.h:136
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:81
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:127
uint32_t enable_cu64_check
enables CU64x64 check
Definition: va_fei_hevc.h:138
VAGenericID VABufferID
Definition: va.h:1647
VABufferID distortion
distortion output of ENC or ENC_PAK. Each CTB has one distortion data with VAEncFEIDistortionHevc Buf...
Definition: va_fei_hevc.h:76
uint32_t num_passes
number of passes, every pass has different QP
Definition: va_fei_hevc.h:184
uint32_t enable_cu64_amp_check
enables CU64x64 asymmetric motion partition check
Definition: va_fei_hevc.h:140
The FEI encoding common API.
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:92
uint32_t search_window
search window similar for AVC defines predefined search windows. If it is selected, RefWidth, RefHeight, LenSP and SearchPath are ignored. 0 : not use predefined search window 1 : Tiny – (4 SUs) 24x24 window diamond search 2 : Small – (9 SUs) 28x28 window diamond search 3 : Diamond – (16 SUs) 48x40 window diamond search 4 : Large Diamond – (32 SUs) 48x40 window diamond search 5 : Exhaustive – 48x40 window full search 6 : (64 SUs) 64x64 window full search Note: option 1, 2, 3 and 4 are valid only when CAP parameter SearchWindow64Support is 0. And option 6 is valid only when SearchWindow64Support is 1.
Definition: va_fei_hevc.h:165
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:215
uint32_t max_num_ime_search_center
number of internal MV predictors for IME searches
Definition: va_fei_hevc.h:167
uint32_t search_path
control parameters
Definition: va_fei_hevc.h:96
uint32_t colocated_ctb_distortion
Definition: va_fei_hevc.h:130
uint8_t * delta_qp
delta QP list for every pass
Definition: va_fei_hevc.h:186
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:87
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:58
VAEncFEIDistortionHevc defines the data structure for VAEncFEIDistortionBufferType per CTB block...
Definition: va_fei_hevc.h:243
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:178
uint32_t ref_width
Definition: va_fei_hevc.h:150
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:70
FEI frame level control buffer for HEVC.
Definition: va_fei_hevc.h:48
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:146