• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

hardware/intel/common/libva


Commit MetaInfo

Revision397a4a2201d7584a1f62229b406755c8181e34f3 (tree)
Time2017-08-21 17:37:24
AuthorKelvin Hu <kelvin.hu@inte...>
CommiterXiang, Haihao

Log Message

H264 FEI support

The purpose of FEI (Flexible Encoding Infrastructure) is to allow applications
to have more controls and trade off quality for speed with their own IPs. The
application can optionally provide input to ENC for extra encode control and
get the output from ENC. Application can chose to modify the ENC output/PAK
input during encoding, but the performance impact is significant.

FEI EntryPoint/BufferType/Attrib changes are in va.h, codec common
changes are in va_fei.h, va_fei_h264.h is for H264 special changes

Signed-off-by: Kelvin Hu <kelvin.hu@intel.com>
Signed-off-by: Jonathan Bian <jonathan.bian@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Signed-off-by: Zhong Li <zhong.li@intel.com>
Signed-off-by: Daniel Charles <daniel.charles@intel.com>

Change Summary

Incremental Difference

--- a/va/Makefile.am
+++ b/va/Makefile.am
@@ -51,6 +51,8 @@ libva_source_h = \
5151 va_enc_h264.h \
5252 va_enc_jpeg.h \
5353 va_enc_vp8.h \
54+ va_fei.h \
55+ va_fei_h264.h \
5456 va_enc_mpeg2.h \
5557 va_enc_vp9.h \
5658 va_tpi.h \
--- a/va/va.h
+++ b/va/va.h
@@ -230,6 +230,16 @@ typedef struct _VARectangle
230230 unsigned short height;
231231 } VARectangle;
232232
233+/** \brief Generic motion vector data structure. */
234+typedef struct _VAMotionVector {
235+ /** \mv0[0]: horizontal motion vector for past reference */
236+ /** \mv0[1]: vertical motion vector for past reference */
237+ /** \mv1[0]: horizontal motion vector for future reference */
238+ /** \mv1[1]: vertical motion vector for future reference */
239+ int16_t mv0[2]; /* past reference */
240+ int16_t mv1[2]; /* future reference */
241+} VAMotionVector;
242+
233243 /** Type of a message callback, used for both error and info log. */
234244 typedef void (*vaMessageCallback)(const char *message);
235245
@@ -354,6 +364,23 @@ typedef enum
354364 */
355365 VAEntrypointEncSliceLP = 8,
356366 VAEntrypointVideoProc = 10, /**< Video pre/post-processing. */
367+ /**
368+ * \brief VAEntrypointFEI
369+ *
370+ * The purpose of FEI (Flexible Encoding Infrastructure) is to allow applications to
371+ * have more controls and trade off quality for speed with their own IPs.
372+ * The application can optionally provide input to ENC for extra encode control
373+ * and get the output from ENC. Application can chose to modify the ENC
374+ * output/PAK input during encoding, but the performance impact is significant.
375+ *
376+ * On top of the existing buffers for normal encode, there will be
377+ * one extra input buffer (VAEncMiscParameterFEIFrameControl) and
378+ * three extra output buffers (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType
379+ * and VAEncFEIDistortionBufferType) for VAEntrypointFEI entry function.
380+ * If separate PAK is set, two extra input buffers
381+ * (VAEncFEIMVBufferType, VAEncFEIMBModeBufferType) are needed for PAK input.
382+ **/
383+ VAEntrypointFEI = 11,
357384 } VAEntrypoint;
358385
359386 /** Currently defined configuration attribute types */
@@ -495,6 +522,23 @@ typedef enum
495522 */
496523 VAConfigAttribEncRateControlExt = 26,
497524
525+ /**
526+ * \brief Encode function type for FEI.
527+ *
528+ * This attribute conveys whether the driver supports different function types for encode.
529+ * It can be VA_FEI_FUNCTION_ENC, VA_FEI_FUNCTION_PAK, or VA_FEI_FUNCTION_ENC_PAK. Currently
530+ * it is for FEI entry point only.
531+ * Default is VA_FEI_FUNCTION_ENC_PAK.
532+ */
533+ VAConfigAttribFEIFunctionType = 32,
534+ /**
535+ * \brief Maximum number of FEI MV predictors. Read-only.
536+ *
537+ * This attribute determines the maximum number of MV predictors the driver
538+ * can support to encode a single frame. 0 means no MV predictor is supported.
539+ * Currently it is for FEI entry point only.
540+ */
541+ VAConfigAttribFEIMVPredictors = 33,
498542 /**@}*/
499543 VAConfigAttribTypeMax
500544 } VAConfigAttribType;
@@ -1153,6 +1197,14 @@ typedef enum
11531197 * color balance (#VAProcFilterParameterBufferColorBalance), etc.
11541198 */
11551199 VAProcFilterParameterBufferType = 42,
1200+ /**
1201+ * \brief FEI specific buffer types
1202+ */
1203+ VAEncFEIMVBufferType = 43,
1204+ VAEncFEIMBCodeBufferType = 44,
1205+ VAEncFEIDistortionBufferType = 45,
1206+ VAEncFEIMBControlBufferType = 46,
1207+ VAEncFEIMVPredictorBufferType = 47,
11561208 VABufferTypeMax
11571209 } VABufferType;
11581210
@@ -1174,6 +1226,8 @@ typedef enum
11741226 VAEncMiscParameterTypeROI = 10,
11751227 /** \brief Buffer type used for temporal layer structure */
11761228 VAEncMiscParameterTypeTemporalLayerStructure = 12,
1229+ /** \brief Buffer type used for FEI input frame level parameters */
1230+ VAEncMiscParameterTypeFEIFrameControl = 18,
11771231 } VAEncMiscParameterType;
11781232
11791233 /** \brief Packed header type. */
@@ -3130,6 +3184,8 @@ typedef struct _VAPictureHEVC
31303184 #include <va/va_enc_mpeg2.h>
31313185 #include <va/va_enc_vp8.h>
31323186 #include <va/va_enc_vp9.h>
3187+#include <va/va_fei.h>
3188+#include <va/va_fei_h264.h>
31333189 #include <va/va_vpp.h>
31343190
31353191 /**@}*/
--- /dev/null
+++ b/va/va_fei.h
@@ -0,0 +1,68 @@
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+
25+/**
26+ * \file va_fei.h
27+ * \brief The FEI encoding common API
28+ */
29+
30+#ifndef VA_FEI_H
31+#define VA_FEI_H
32+
33+#ifdef __cplusplus
34+extern "C" {
35+#endif
36+
37+#include <stdint.h>
38+
39+/**
40+ * \brief FEI specific attribute definitions
41+ */
42+/** @name Attribute values for VAConfigAttribFEIFunctionType
43+ *
44+ * This is only for VAEntrypointFEI
45+ * The desired type should be passed to driver when creating the configuration.
46+ * If VA_FEI_FUNCTION_ENC_PAK is set, VA_FEI_FUNCTION_ENC and VA_FEI_FUNCTION_PAK
47+ * will be ignored if set also. Combination of VA_FEI_FUNCTION_ENC and VA_FEI_FUNCTION_PAK
48+ * is not valid. If VA_FEI_FUNCTION_ENC is set, there will be no bitstream output.
49+ * If VA_FEI_FUNCTION_PAK is set, two extra input buffers for PAK are needed:
50+ * VAEncFEIMVBufferType and VAEncFEIMBCodeBufferType.
51+ * VA_FEI_FUNCTION_ENC_PAK is recommended for best performance.
52+ *
53+ **/
54+/**@{*/
55+/** \brief ENC only is supported */
56+#define VA_FEI_FUNCTION_ENC 0x00000001
57+/** \brief PAK only is supported */
58+#define VA_FEI_FUNCTION_PAK 0x00000002
59+/** \brief ENC_PAK is supported */
60+#define VA_FEI_FUNCTION_ENC_PAK 0x00000004
61+
62+/**@}*/
63+
64+#ifdef __cplusplus
65+}
66+#endif
67+
68+#endif /* VA_FEI_H */
--- /dev/null
+++ b/va/va_fei_h264.h
@@ -0,0 +1,325 @@
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+
25+/**
26+ * \file va_fei_h264.h
27+ * \brief The FEI encoding H264 special API
28+ */
29+
30+#ifndef VA_FEI_H264_H
31+#define VA_FEI_H264_H
32+
33+#ifdef __cplusplus
34+extern "C" {
35+#endif
36+
37+#include <stdint.h>
38+#include "va_fei.h"
39+
40+/** \brief FEI frame level control buffer for H.264 */
41+typedef struct _VAEncMiscParameterFEIFrameControlH264
42+{
43+ uint32_t function; /* one of the VAConfigAttribFEIFunctionType values */
44+ /** \brief MB (16x16) control input buffer. It is valid only when (mb_input | mb_size_ctrl)
45+ * is set to 1. The data in this buffer correspond to the input source. 16x16 MB is in raster scan order,
46+ * each MB control data structure is defined by VAEncFEIMBControlH264.
47+ * Buffer size shall not be less than the number of 16x16 blocks multiplied by
48+ * sizeof(VAEncFEIMBControlH264).
49+ * Note: if mb_qp is set, VAEncQPBufferH264 is expected.
50+ */
51+ VABufferID mb_ctrl;
52+ /** \brief distortion output of MB ENC or ENC_PAK.
53+ * Each 16x16 block has one distortion data with VAEncFEIDistortionH264 layout
54+ * Buffer size shall not be less than the number of 16x16 blocks multiplied by
55+ * sizeof(VAEncFEIDistortionH264).
56+ */
57+ VABufferID distortion;
58+ /** \brief MVs data output of MB ENC.
59+ * Each 16x16 block has one MVs data with layout VAMotionVector
60+ * Buffer size shall not be less than the number of 16x16 blocks multiplied by
61+ * sizeof(VAMotionVector) * 16.
62+ */
63+ VABufferID mv_data;
64+ /** \brief MBCode data output of MB ENC.
65+ * Each 16x16 block has one MB Code data with layout VAEncFEIMBCodeH264
66+ * Buffer size shall not be less than the number of 16x16 blocks multiplied by
67+ * sizeof(VAEncFEIMBCodeH264).
68+ */
69+ VABufferID mb_code_data;
70+ /** \brief QP input buffer with layout VAEncQPBufferH264. It is valid only when mb_qp is set to 1.
71+ * The data in this buffer correspond to the input source.
72+ * One QP per 16x16 block in raster scan order, each QP is a signed char (8-bit) value.
73+ **/
74+ VABufferID qp;
75+ /** \brief MV predictor. It is valid only when mv_predictor_enable is set to 1.
76+ * Each 16x16 block has one or more pair of motion vectors and the corresponding
77+ * reference indexes as defined by VAEncFEIMVPredictorH264. 16x16 block is in raster scan order.
78+ * Buffer size shall not be less than the number of 16x16 blocks multiplied by
79+ * sizeof(VAEncFEIMVPredictorH264). */
80+ VABufferID mv_predictor;
81+
82+ /** \brief number of MV predictors. It must not be greater than maximum supported MV predictor. */
83+ uint32_t num_mv_predictors_l0 : 16;
84+ uint32_t num_mv_predictors_l1 : 16;
85+
86+ /** \brief motion search method definition
87+ * 0: default value, diamond search
88+ * 1: full search
89+ * 2: diamond search
90+ **/
91+ uint32_t search_path : 8;
92+ /** \brief maximum number of Search Units, valid range is [1, 63] */
93+ uint32_t len_sp : 8;
94+ uint32_t reserved0 : 16;
95+
96+ uint32_t sub_mb_part_mask : 7;
97+ uint32_t intra_part_mask : 5;
98+ uint32_t multi_pred_l0 : 1;
99+ uint32_t multi_pred_l1 : 1;
100+ uint32_t sub_pel_mode : 2;
101+ uint32_t inter_sad : 2;
102+ uint32_t intra_sad : 2;
103+ uint32_t distortion_type : 1;
104+ uint32_t repartition_check_enable : 1;
105+ uint32_t adaptive_search : 1;
106+ uint32_t mv_predictor_enable : 1;
107+ uint32_t mb_qp : 1;
108+ uint32_t mb_input : 1;
109+ uint32_t mb_size_ctrl : 1;
110+ uint32_t colocated_mb_distortion : 1;
111+ uint32_t reserved1 : 4;
112+
113+ /** \brief motion search window(ref_width * ref_height) */
114+ uint32_t ref_width : 8;
115+ uint32_t ref_height : 8;
116+ /** \brief predefined motion search windows. If selected, len_sp, window(ref_width * ref_eight)
117+ * and search_path setting are ignored.
118+ * 0: not use predefined search window
119+ * 1: Tiny, len_sp=4, 24x24 window and diamond search
120+ * 2: Small, len_sp=9, 28x28 window and diamond search
121+ * 3: Diamond, len_sp=16, 48x40 window and diamond search
122+ * 4: Large Diamond, len_sp=32, 48x40 window and diamond search
123+ * 5: Exhaustive, len_sp=48, 48x40 window and full search
124+ * 6: Extend Diamond, len_sp=16, 64x40 window and diamond search
125+ * 7: Extend Large Diamond, len_sp=32, 64x40 window and diamond search
126+ * 8: Extend Exhaustive, len_sp=48, 64x40 window and full search
127+ **/
128+ uint32_t search_window : 4;
129+ uint32_t reserved2 : 12;
130+
131+ /** \brief max frame size control with multi passes QP setting */
132+ uint32_t max_frame_size;
133+ /** \brief number of passes, every pass has different QP */
134+ uint32_t num_passes;
135+ /** \brief delta QP list for every pass */
136+ uint8_t *delta_qp;
137+ uint32_t reserved3[2];
138+} VAEncMiscParameterFEIFrameControlH264;
139+
140+/** \brief FEI MB level control data structure */
141+typedef struct _VAEncFEIMBControlH264
142+{
143+ /** \brief when set, correposndent MB is coded as intra */
144+ uint32_t force_to_intra : 1;
145+ /** \brief when set, correposndent MB is coded as skip */
146+ uint32_t force_to_skip : 1;
147+ uint32_t force_to_nonskip : 1;
148+ uint32_t enable_direct_bias_adjustment : 1;
149+ uint32_t enable_motion_bias_adjustment : 1;
150+ uint32_t ext_mv_cost_scaling_factor : 3;
151+ uint32_t reserved0 : 24;
152+
153+ uint32_t reserved1;
154+
155+ uint32_t reserved2;
156+
157+ /** \brief when mb_size_ctrl is set, size here is used to budget accumulatively. Set to 0xFF if don't care. */
158+ uint32_t reserved3 : 16;
159+ uint32_t target_size_in_word : 8;
160+ uint32_t max_size_in_word : 8;
161+} VAEncFEIMBControlH264;
162+
163+
164+/** \brief Application can use this definition as reference to allocate the buffer
165+ * based on MaxNumPredictor returned from attribute VAConfigAttribFEIMVPredictors query.
166+ **/
167+typedef struct _VAEncFEIMVPredictorH264
168+{
169+ /** \brief Reference index corresponding to the entry of RefPicList0 & RefPicList1 in VAEncSliceParameterBufferH264.
170+ * Note that RefPicList0 & RefPicList1 needs to be the same for all slices.
171+ * ref_idx_l0_x : index to RefPicList0; ref_idx_l1_x : index to RefPicList1; x : 0 - MaxNumPredictor.
172+ **/
173+ struct {
174+ uint8_t ref_idx_l0 : 4;
175+ uint8_t ref_idx_l1 : 4;
176+ } ref_idx[4]; /* index is predictor number */
177+ uint32_t reserved;
178+ /** \brief MV. MaxNumPredictor must be the returned value from attribute VAConfigAttribFEIMVPredictors query.
179+ * Even application doesn't use the maximum predictors, the VAFEIMVPredictorH264 structure size
180+ * has to be defined as maximum so each MB can be at a fixed location.
181+ * Note that 0x8000 must be used for correspondent intra block.
182+ **/
183+ VAMotionVector mv[4]; /* MaxNumPredictor is 4 */
184+} VAEncFEIMVPredictorH264;
185+
186+/** \brief FEI output */
187+/**
188+ * Motion vector output is per 4x4 block. For each 4x4 block there is a pair of MVs
189+ * for RefPicList0 and RefPicList1 and each MV is 4 bytes including horizontal and vertical directions.
190+ * Depending on Subblock partition, for the shape that is not 4x4, the MV is replicated
191+ * so each 4x4 block has a pair of MVs. The 16x16 block has 32 MVs (128 bytes).
192+ * 0x8000 is used for correspondent intra block. The 16x16 block is in raster scan order,
193+ * within the 16x16 block, each 4x4 block MV is ordered as below in memory.
194+ * The buffer size shall be greater than or equal to the number of 16x16 blocks multiplied by 128 bytes.
195+ * Note that, when separate ENC and PAK is enabled, the exact layout of this buffer is needed for PAK input.
196+ * App can reuse this buffer, or copy to a different buffer as PAK input.
197+ * Layout is defined as Generic motion vector data structure VAMotionVector
198+ * 16x16 Block
199+ * -----------------------------------------
200+ * | 1 | 2 | 5 | 6 |
201+ * -----------------------------------------
202+ * | 3 | 4 | 7 | 8 |
203+ * -----------------------------------------
204+ * | 9 | 10 | 13 | 14 |
205+ * -----------------------------------------
206+ * | 11 | 12 | 15 | 16 |
207+ * -----------------------------------------
208+ **/
209+
210+/** \brief VAEncFEIMBCodeH264 defines the data structure for VAEncFEIMBCodeBufferType per 16x16 MB block.
211+ * it is output buffer of ENC and ENC_PAK modes, it's also input buffer of PAK mode.
212+ * The 16x16 block is in raster scan order. Buffer size shall not be less than the number of 16x16 blocks
213+ * multiplied by sizeof(VAEncFEIMBCodeH264). Note that, when separate ENC and PAK is enabled,
214+ * the exact layout of this buffer is needed for PAK input. App can reuse this buffer,
215+ * or copy to a different buffer as PAK input, reserved elements must not be modified when used as PAK input.
216+ **/
217+typedef struct _VAEncFEIMBCodeH264
218+{
219+ //DWORD 0~2
220+ uint32_t reserved0[3];
221+
222+ //DWORD 3
223+ uint32_t inter_mb_mode : 2;
224+ uint32_t mb_skip_flag : 1;
225+ uint32_t reserved1 : 1;
226+ uint32_t intra_mb_mode : 2;
227+ uint32_t reserved2 : 1;
228+ uint32_t field_mb_polarity_flag : 1;
229+ uint32_t mb_type : 5;
230+ uint32_t intra_mb_flag : 1;
231+ uint32_t field_mb_flag : 1;
232+ uint32_t transform8x8_flag : 1;
233+ uint32_t reserved3 : 1;
234+ uint32_t dc_block_coded_cr_flag : 1;
235+ uint32_t dc_block_coded_cb_flag : 1;
236+ uint32_t dc_block_coded_y_flag : 1;
237+ uint32_t reserved4 : 12;
238+
239+ //DWORD 4
240+ uint32_t horz_origin : 8;
241+ uint32_t vert_origin : 8;
242+ uint32_t cbp_y : 16;
243+
244+ //DWORD 5
245+ uint32_t cbp_cb : 16;
246+ uint32_t cbp_cr : 16;
247+
248+ //DWORD 6
249+ uint32_t qp_prime_y : 8;
250+ uint32_t reserved5 : 17;
251+ uint32_t mb_skip_conv_disable : 1;
252+ uint32_t is_last_mb : 1;
253+ uint32_t enable_coefficient_clamp : 1;
254+ uint32_t direct8x8_pattern : 4;
255+
256+ //DWORD 7 8 and 9
257+ union
258+ {
259+ /* Intra MBs */
260+ struct
261+ {
262+ uint32_t luma_intra_pred_modes0 : 16;
263+ uint32_t luma_intra_pred_modes1 : 16;
264+
265+ uint32_t luma_intra_pred_modes2 : 16;
266+ uint32_t luma_intra_pred_modes3 : 16;
267+
268+ uint32_t chroma_intra_pred_mode : 2;
269+ uint32_t intra_pred_avail_flag : 5;
270+ uint32_t intra_pred_avail_flagF : 1;
271+ uint32_t reserved6 : 24;
272+ } intra_mb;
273+
274+ /* Inter MBs */
275+ struct
276+ {
277+ uint32_t sub_mb_shapes : 8;
278+ uint32_t sub_mb_pred_modes : 8;
279+ uint32_t reserved7 : 16;
280+
281+ uint32_t ref_idx_l0_0 : 8;
282+ uint32_t ref_idx_l0_1 : 8;
283+ uint32_t ref_idx_l0_2 : 8;
284+ uint32_t ref_idx_l0_3 : 8;
285+
286+ uint32_t ref_idx_l1_0 : 8;
287+ uint32_t ref_idx_l1_1 : 8;
288+ uint32_t ref_idx_l1_2 : 8;
289+ uint32_t ref_idx_l1_3 : 8;
290+ } inter_mb;
291+ } mb_mode;
292+
293+ //DWORD 10
294+ uint32_t reserved8 : 16;
295+ uint32_t target_size_in_word : 8;
296+ uint32_t max_size_in_word : 8;
297+
298+ //DWORD 11~14
299+ uint32_t reserved9[4];
300+
301+ //DWORD 15
302+ uint32_t reserved10;
303+} VAEncFEIMBCodeH264; // 64 bytes
304+
305+/** \brief VAEncFEIDistortionH264 defines the data structure for VAEncFEIDistortionBufferType per 16x16 MB block.
306+ * It is output buffer of ENC and ENC_PAK modes, The 16x16 block is in raster scan order.
307+ * Buffer size shall not be less than the number of 16x16 blocks multiple by sizeof(VAEncFEIDistortionH264).
308+ **/
309+typedef struct _VAEncFEIDistortionH264 {
310+ /** \brief Inter-prediction-distortion associated with motion vector i (co-located with subblock_4x4_i).
311+ * Its meaning is determined by sub-shape. It must be zero if the corresponding sub-shape is not chosen.
312+ **/
313+ uint16_t inter_distortion[16];
314+ uint32_t best_inter_distortion : 16;
315+ uint32_t best_intra_distortion : 16;
316+ uint32_t colocated_mb_distortion : 16;
317+ uint32_t reserved0 : 16;
318+ uint32_t reserved1[2];
319+} VAEncFEIDistortionH264; // 48 bytes
320+
321+#ifdef __cplusplus
322+}
323+#endif
324+
325+#endif /* VA_FEI_H264_H */