OSDN Git Service

update VAEncMacroblockParameterBufferH264
[android-x86/hardware-intel-common-libva.git] / va / va_enc_h264.h
1 /*
2  * Copyright (c) 2007-2011 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_enc_h264.h
27  * \brief The H.264 encoding API
28  *
29  * This file contains the \ref api_enc_h264 "H.264 encoding API".
30  */
31
32 #ifndef VA_ENC_H264_H
33 #define VA_ENC_H264_H
34
35 #ifdef __cplusplus
36 extern "C" {
37 #endif
38
39 /**
40  * \defgroup api_enc_h264 H.264 encoding API
41  *
42  * @{
43  */
44
45 /**
46  * @name Picture flags
47  *
48  * Those flags flags are meant to signal when a picture marks the end
49  * of a sequence, a stream, or even both at once.
50  *
51  * @{
52  */
53 /**
54  * \brief Marks the last picture in the sequence.
55  *
56  * i.e. the driver appends \c end_of_seq() NAL unit to the encoded frame.
57  */
58 #define H264_LAST_PICTURE_EOSEQ     0x01
59 /**
60  * \brief Marks the last picture in the stream.
61  *
62  * i.e. the driver appends \c end_of_stream() NAL unit to the encoded frame.
63  */
64 #define H264_LAST_PICTURE_EOSTREAM  0x02
65 /**@}*/
66
67 /**
68  * \brief Packed header types specific to H.264 encoding.
69  *
70  * Types of packed headers generally used for H.264 encoding. Each
71  * associated packed header data buffer shall contain the start code
72  * prefix 0x000001 followed by the complete NAL unit, thus also
73  * including the \c nal_unit_type.
74  *
75  * Note: the start code prefix can contain an arbitrary number of leading
76  * zeros. The driver will skip them for emulation prevention bytes insertion,
77  * if necessary.
78  */
79 typedef enum {
80     /**
81      * \brief Packed Sequence Parameter Set (SPS).
82      *
83      * The corresponding packed header data buffer shall contain the
84      * complete seq_parameter_set_rbsp() syntax element.
85      *
86      * Note: packed \c nal_unit_type shall be equal to 7.
87      */
88     VAEncPackedHeaderH264_SPS   = VAEncPackedHeaderSequence,
89     /**
90      * \brief Packed Picture Parameter Set (PPS).
91      *
92      * The corresponding packed header data buffer shall contain the
93      * complete pic_parameter_set_rbsp() syntax element.
94      *
95      * Note: packed \c nal_unit_type shall be equal to 8.
96      */
97     VAEncPackedHeaderH264_PPS   = VAEncPackedHeaderPicture,
98     /**
99      * \brief Packed slice header.
100      *
101      * The corresponding packed header data buffer shall contain the
102      * \c slice_header() syntax element only, along with any start
103      * code prefix and NAL unit type preceeding it. i.e. this means
104      * that the buffer does not contain any of the \c slice_data() or
105      * the \c rbsp_slice_trailing_bits().
106      *
107      * Note: packed \c nal_unit_type shall be equal to 1 (non-IDR
108      * picture), or 5 (IDR picture).
109      */
110     VAEncPackedHeaderH264_Slice = VAEncPackedHeaderSlice,
111     /**
112      * \brief Packed Supplemental Enhancement Information (SEI).
113      *
114      * The corresponding packed header data buffer shall contain the
115      * complete sei_rbsp() syntax element, thus including several
116      * sei_message() elements if necessary.
117      *
118      * Note: packed \c nal_unit_type shall be equal to 6.
119      */
120     VAEncPackedHeaderH264_SEI   = (VAEncPackedHeaderMiscMask | 1),
121 } VAEncPackedHeaderTypeH264;
122
123 /**
124  * \brief Sequence parameter for H.264 encoding in baseline, main & high 
125  * profiles.
126  *
127  * This structure holds information for \c seq_parameter_set_data() as
128  * defined by the H.264 specification.
129  *
130  * If packed sequence headers mode is used, i.e. if the encoding
131  * pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE
132  * flag, then the driver expects two more buffers to be provided to
133  * the same \c vaRenderPicture() as this buffer:
134  * - a #VAEncPackedHeaderParameterBuffer with type set to
135  *   VAEncPackedHeaderType::VAEncPackedHeaderSequence ;
136  * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
137  *   header data.
138  *
139  * If \c seq_scaling_matrix_present_flag is set to \c 1, then a
140  * #VAIQMatrixBufferH264 buffer shall also be provided within the same
141  * \c vaRenderPicture() call as this sequence parameter buffer.
142  */
143 typedef struct _VAEncSequenceParameterBufferH264 {
144     /** \brief Same as the H.264 bitstream syntax element. */
145     unsigned char   seq_parameter_set_id;
146     /** \brief Same as the H.264 bitstream syntax element. */
147     unsigned char   level_idc;
148     /** \brief Period between I frames. */
149     unsigned int    intra_period;
150     /** \brief Period between IDR frames. */
151     unsigned int    intra_idr_period;
152     /** \brief Period between I/P frames. */
153     unsigned int    ip_period;
154     /**
155      * \brief Initial bitrate set for this sequence in CBR or VBR modes.
156      *
157      * This field represents the initial bitrate value for this
158      * sequence if CBR or VBR mode is used, i.e. if the encoder
159      * pipeline was created with a #VAConfigAttribRateControl
160      * attribute set to either \ref VA_RC_CBR or \ref VA_RC_VBR.
161      *
162      * The bitrate can be modified later on through
163      * #VAEncMiscParameterRateControl buffers.
164      */
165     unsigned int    bits_per_second;
166     /** \brief Same as the H.264 bitstream syntax element. */
167     unsigned int    max_num_ref_frames;
168     /** \brief Picture width in macroblocks. */
169     unsigned short  picture_width_in_mbs;
170     /** \brief Picture height in macroblocks. */
171     unsigned short  picture_height_in_mbs;
172
173     union {
174         struct {
175             /** \brief Same as the H.264 bitstream syntax element. */
176             unsigned int chroma_format_idc                      : 2;
177             /** \brief Same as the H.264 bitstream syntax element. */
178             unsigned int frame_mbs_only_flag                    : 1;
179             /** \brief Same as the H.264 bitstream syntax element. */
180             unsigned int mb_adaptive_frame_field_flag           : 1;
181             /** \brief Same as the H.264 bitstream syntax element. */
182             unsigned int seq_scaling_matrix_present_flag        : 1;
183             /** \brief Same as the H.264 bitstream syntax element. */
184             unsigned int direct_8x8_inference_flag              : 1;
185             /** \brief Same as the H.264 bitstream syntax element. */
186             unsigned int log2_max_frame_num_minus4              : 4;
187             /** \brief Same as the H.264 bitstream syntax element. */
188             unsigned int pic_order_cnt_type                     : 2;
189             /** \brief Same as the H.264 bitstream syntax element. */
190             unsigned int log2_max_pic_order_cnt_lsb_minus4      : 4;
191             /** \brief Same as the H.264 bitstream syntax element. */
192             unsigned int delta_pic_order_always_zero_flag       : 1;
193         } bits;
194         unsigned int value;
195     } seq_fields;
196
197     /** \brief Same as the H.264 bitstream syntax element. */
198     unsigned char   bit_depth_luma_minus8;
199     /** \brief Same as the H.264 bitstream syntax element. */
200     unsigned char   bit_depth_chroma_minus8;
201
202     /** if pic_order_cnt_type == 1 */
203     /**@{*/
204     /** \brief Same as the H.264 bitstream syntax element. */
205     unsigned char   num_ref_frames_in_pic_order_cnt_cycle;
206     /** \brief Same as the H.264 bitstream syntax element. */
207     int             offset_for_non_ref_pic;
208     /** \brief Same as the H.264 bitstream syntax element. */
209     int             offset_for_top_to_bottom_field;
210     /** \brief Same as the H.264 bitstream syntax element. */
211     int             offset_for_ref_frame[256];
212     /**@}*/
213
214     /** @name Cropping (optional) */
215     /**@{*/
216     /** \brief Same as the H.264 bitstream syntax element. */
217     unsigned char   frame_cropping_flag;
218     /** \brief Same as the H.264 bitstream syntax element. */
219     unsigned int    frame_crop_left_offset;
220     /** \brief Same as the H.264 bitstream syntax element. */
221     unsigned int    frame_crop_right_offset;
222     /** \brief Same as the H.264 bitstream syntax element. */
223     unsigned int    frame_crop_top_offset;
224     /** \brief Same as the H.264 bitstream syntax element. */
225     unsigned int    frame_crop_bottom_offset;
226     /**@}*/
227
228     /** @name VUI parameters (optional) */
229     /**@{*/
230     /** \brief Same as the H.264 bitstream syntax element. */
231     unsigned char   vui_parameters_present_flag;
232     union {
233         struct {
234             /** \brief Same as the H.264 bitstream syntax element. */
235             unsigned int aspect_ratio_info_present_flag         : 1;
236             /** \brief Same as the H.264 bitstream syntax element. */
237             unsigned int timing_info_present_flag               : 1;
238             /** \brief Same as the H.264 bitstream syntax element. */
239             unsigned int bitstream_restriction_flag             : 1;
240             /** \brief Range: 0 to 16, inclusive. */
241             unsigned int log2_max_mv_length_horizontal          : 5;
242             /** \brief Range: 0 to 16, inclusive. */
243             unsigned int log2_max_mv_length_vertical            : 5;
244         } bits;
245         unsigned int value;
246     } vui_fields;
247     /** \brief Same as the H.264 bitstream syntax element. */
248     unsigned char   aspect_ratio_idc;
249     /** \brief Same as the H.264 bitstream syntax element. */
250     unsigned int    sar_width;
251     /** \brief Same as the H.264 bitstream syntax element. */
252     unsigned int    sar_height;
253     /** \brief Same as the H.264 bitstream syntax element. */
254     unsigned int    num_units_in_tick;
255     /** \brief Same as the H.264 bitstream syntax element. */
256     unsigned int    time_scale;
257     /**@}*/
258 } VAEncSequenceParameterBufferH264;
259
260 /**
261  * \brief Picture parameter for H.264 encoding in baseline, main & high 
262  * profiles.
263  *
264  * This structure holds information for \c pic_parameter_set_rbsp() as
265  * defined by the H.264 specification.
266  *
267  * If packed picture headers mode is used, i.e. if the encoding
268  * pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE
269  * flag, then the driver expects two more buffers to be provided to
270  * the same \c vaRenderPicture() as this buffer:
271  * - a #VAEncPackedHeaderParameterBuffer with type set to
272  *   VAEncPackedHeaderType::VAEncPackedHeaderPicture ;
273  * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
274  *   header data.
275  *
276  * If \c pic_scaling_matrix_present_flag is set to \c 1, then a
277  * #VAIQMatrixBufferH264 buffer shall also be provided within the same
278  * \c vaRenderPicture() call as this picture parameter buffer.
279  */
280 typedef struct _VAEncPictureParameterBufferH264 {
281     /**
282      * \brief Information about the picture to be encoded.
283      *
284      * See #VAPictureH264 for further description of each field.
285      * Note that CurrPic.picture_id represents the reconstructed
286      * (decoded) picture. User provides a scratch VA surface ID here.
287      */
288     VAPictureH264   CurrPic;
289     /**
290      * \brief Decoded Picture Buffer (DPB).
291      *
292      * This array represents the list of reconstructed (decoded)
293      * frames used as reference. It is important to keep track of
294      * reconstructed frames so that they can be used later on as
295      * reference for P or B-frames encoding.
296      */
297     VAPictureH264   ReferenceFrames[16];
298     /**
299      * \brief Output encoded bitstream.
300      *
301      * \ref coded_buf has type #VAEncCodedBufferType. It should be
302      * large enough to hold the compressed NAL slice and possibly SPS
303      * and PPS NAL units.
304      */
305     VABufferID      coded_buf;
306
307     /** \brief The picture parameter set referred to in the slice header. */
308     unsigned char   pic_parameter_set_id;
309     /** \brief The active sequence parameter set. Range: 0 to 31, inclusive. */
310     unsigned char   seq_parameter_set_id;
311
312     /**
313      * \brief OR'd flags describing whether the picture is the last one or not.
314      *
315      * This fields holds 0 if the picture to be encoded is not the last
316      * one in the stream or sequence. Otherwise, it is a combination of
317      * \ref H264_LAST_PICTURE_EOSEQ or \ref H264_LAST_PICTURE_EOSTREAM.
318      */
319     unsigned char   last_picture;
320
321     /** \brief The picture identifier.
322      *   Range: 0 to \f$2^{log2\_max\_frame\_num\_minus4 + 4} - 1\f$, inclusive.
323      */
324     unsigned short  frame_num;
325
326     /** \brief \c pic_init_qp_minus26 + 26. */
327     unsigned char   pic_init_qp;
328     /** \brief Maximum reference index for reference picture list 0.
329      *   Range: 0 to 31, inclusive.
330      */
331     unsigned char   num_ref_idx_l0_active_minus1;
332     /** \brief Maximum reference index for reference picture list 1.
333      *  Range: 0 to 31, inclusive.
334      */
335     unsigned char   num_ref_idx_l1_active_minus1;
336
337     /** \brief Range: -12 to 12, inclusive. */
338     signed char     chroma_qp_index_offset;
339     /** \brief Range: -12 to 12, inclusive. */
340     signed char     second_chroma_qp_index_offset;
341
342     union {
343         struct {
344             /** \brief Is picture an IDR picture? */
345             unsigned int idr_pic_flag                           : 1;
346             /** \brief Is picture a reference picture? */
347             unsigned int reference_pic_flag                     : 2;
348             /** \brief Selects CAVLC (0) or CABAC (1) entropy coding mode. */
349             unsigned int entropy_coding_mode_flag               : 1;
350             /** \brief Is weighted prediction applied to P slices? */
351             unsigned int weighted_pred_flag                     : 1;
352             /** \brief Range: 0 to 2, inclusive. */
353             unsigned int weighted_bipred_idc                    : 2;
354             /** \brief Same as the H.264 bitstream syntax element. */
355             unsigned int constrained_intra_pred_flag            : 1;
356             /** \brief Same as the H.264 bitstream syntax element. */
357             unsigned int transform_8x8_mode_flag                : 1;
358             /** \brief Same as the H.264 bitstream syntax element. */
359             unsigned int deblocking_filter_control_present_flag : 1;
360             /** \brief Same as the H.264 bitstream syntax element. */
361             unsigned int redundant_pic_cnt_present_flag         : 1;
362             /** \brief Same as the H.264 bitstream syntax element. */
363             unsigned int pic_order_present_flag                 : 1;
364             /** \brief Same as the H.264 bitstream syntax element. */
365             unsigned int pic_scaling_matrix_present_flag        : 1;
366         } bits;
367         unsigned int value;
368     } pic_fields;
369 } VAEncPictureParameterBufferH264;
370
371 typedef struct _VAEncQPBufferH264 {
372     /*
373      * \brief This structure holds QP per 16x16 macroblock. Buffer size shall be
374      * sufficient to fit the slice or frame to be encoded depending on if it is a
375      * slice level or frame level encoding.
376      */
377     uint8_t qp;
378 } VAEncQPBufferH264;
379
380 /**
381  * \brief Slice parameter for H.264 encoding in baseline, main & high profiles.
382  *
383  * This structure holds information for \c
384  * slice_layer_without_partitioning_rbsp() as defined by the H.264
385  * specification.
386  *
387  * If packed slice headers mode is used, i.e. if the encoding
388  * pipeline was configured with the #VA_ENC_PACKED_HEADER_SLICE
389  * flag, then the driver expects two more buffers to be provided to
390  * the same \c vaRenderPicture() as this buffer:
391  * - a #VAEncPackedHeaderParameterBuffer with type set to
392  *   VAEncPackedHeaderType::VAEncPackedHeaderSlice ;
393  * - a #VAEncPackedHeaderDataBuffer which holds the actual packed
394  *   header data.
395  *
396  * If per-macroblock encoder configuration is needed, \c macroblock_info
397  * references a buffer of type #VAEncMacroblockParameterBufferH264. This
398  * buffer is not passed to vaRenderPicture() and it can be re-used
399  * without re-allocating the whole buffer.
400  */
401 typedef struct _VAEncSliceParameterBufferH264 {
402     /** \brief Starting MB address for this slice. */
403     unsigned int    macroblock_address;
404     /** \brief Number of macroblocks in this slice. */
405     unsigned int    num_macroblocks;
406     /**
407      * \brief Per-MB encoder configuration buffer, or \c VA_INVALID_ID.
408      *
409      * If per-MB encoder configuration is needed, then \ref macroblock_info
410      * references a buffer of type #VAEncMacroblockParameterBufferH264
411      * (\c VAEncMacroblockParameterBufferType). Otherwise, buffer id
412      * is set to \c VA_INVALID_ID and per-MB configuration is derived
413      * from this slice parameter.
414      *
415      * The \c macroblock_info buffer must hold \ref num_macroblocks
416      * elements.
417      */
418     VABufferID      macroblock_info;
419     /** \brief Slice type.
420      *  Range: 0..2, 5..7, i.e. no switching slices.
421      */
422     unsigned char   slice_type;
423     /** \brief Same as the H.264 bitstream syntax element. */
424     unsigned char   pic_parameter_set_id;
425     /** \brief Same as the H.264 bitstream syntax element. */
426     unsigned short  idr_pic_id;
427
428     /** @name If pic_order_cnt_type == 0 */
429     /**@{*/
430     /** \brief The picture order count modulo MaxPicOrderCntLsb. */
431     unsigned short  pic_order_cnt_lsb;
432     /** \brief Valid if \c pic_order_present_flag and this is a bottom field. */
433     int             delta_pic_order_cnt_bottom;
434     /**@}*/
435     /** @name If pic_order_cnt_type == 1 && !delta_pic_order_always_zero_flag */
436     /**@{*/
437     /** \brief [0]: top, [1]: bottom. */
438     int             delta_pic_order_cnt[2];
439     /**@}*/
440
441     /** @name If slice_type == B */
442     /**@{*/
443     unsigned char   direct_spatial_mv_pred_flag;
444     /**@}*/
445
446     /** @name If slice_type == P */
447     /**@{*/
448     /** \brief Specifies if
449      * \ref _VAEncPictureParameterBufferH264::num_ref_idx_l0_active_minus1 or
450      * \ref _VAEncPictureParameterBufferH264::num_ref_idx_l1_active_minus1 are
451      * overriden by the values for this slice.
452      */
453     unsigned char   num_ref_idx_active_override_flag;
454     /** \brief Maximum reference index for reference picture list 0.
455      *  Range: 0 to 31, inclusive.
456      */
457     unsigned char   num_ref_idx_l0_active_minus1;
458     /** \brief Maximum reference index for reference picture list 1.
459      *  Range: 0 to 31, inclusive.
460      */
461     unsigned char   num_ref_idx_l1_active_minus1;
462     /** \brief Reference picture list 0 (for P slices). */
463     VAPictureH264   RefPicList0[32];
464     /** \brief Reference picture list 1 (for B slices). */
465     VAPictureH264   RefPicList1[32];
466     /**@}*/
467
468     /** @name pred_weight_table() */
469     /**@{*/
470     /** \brief Same as the H.264 bitstream syntax element. */
471     unsigned char   luma_log2_weight_denom;
472     /** \brief Same as the H.264 bitstream syntax element. */
473     unsigned char   chroma_log2_weight_denom;
474     /** \brief Same as the H.264 bitstream syntax element. */
475     unsigned char   luma_weight_l0_flag;
476     /** \brief Same as the H.264 bitstream syntax element. */
477     signed short    luma_weight_l0[32];
478     /** \brief Same as the H.264 bitstream syntax element. */
479     signed short    luma_offset_l0[32];
480     /** \brief Same as the H.264 bitstream syntax element. */
481     unsigned char   chroma_weight_l0_flag;
482     /** \brief Same as the H.264 bitstream syntax element. */
483     signed short    chroma_weight_l0[32][2];
484     /** \brief Same as the H.264 bitstream syntax element. */
485     signed short    chroma_offset_l0[32][2];
486     /** \brief Same as the H.264 bitstream syntax element. */
487     unsigned char   luma_weight_l1_flag;
488     /** \brief Same as the H.264 bitstream syntax element. */
489     signed short    luma_weight_l1[32];
490     /** \brief Same as the H.264 bitstream syntax element. */
491     signed short    luma_offset_l1[32];
492     /** \brief Same as the H.264 bitstream syntax element. */
493     unsigned char   chroma_weight_l1_flag;
494     /** \brief Same as the H.264 bitstream syntax element. */
495     signed short    chroma_weight_l1[32][2];
496     /** \brief Same as the H.264 bitstream syntax element. */
497     signed short    chroma_offset_l1[32][2];
498     /**@}*/
499
500     /** \brief Range: 0 to 2, inclusive. */
501     unsigned char   cabac_init_idc;
502     /** \brief Same as the H.264 bitstream syntax element. */
503     signed char     slice_qp_delta;
504     /** @name If deblocking_filter_control_present_flag */
505     /**@{*/
506     /** \brief Range: 0 to 2, inclusive. */
507     unsigned char   disable_deblocking_filter_idc;
508     /** \brief Same as the H.264 bitstream syntax element. */
509     signed char     slice_alpha_c0_offset_div2;
510     /** \brief Same as the H.264 bitstream syntax element. */
511     signed char     slice_beta_offset_div2;
512     /**@}*/
513 } VAEncSliceParameterBufferH264;
514
515 /**
516  * @name Macroblock neighbour availability bits
517  *
518  * \anchor api_enc_h264_mb_pred_avail_bits
519  * Definitions for macroblock neighbour availability bits used in
520  * intra prediction mode (non MBAFF only).
521  *
522  * @{
523  */
524 /** \brief References macroblock in the top-left corner. */
525 #define VA_MB_PRED_AVAIL_TOP_LEFT         (1 << 2)
526 /** \brief References macroblock above the current macroblock. */
527 #define VA_MB_PRED_AVAIL_TOP              (1 << 4)
528 /** \brief References macroblock in the top-right corner. */
529 #define VA_MB_PRED_AVAIL_TOP_RIGHT        (1 << 3)
530 /** \brief References macroblock on the left of the current macroblock. */
531 #define VA_MB_PRED_AVAIL_LEFT             (1 << 6)
532 /**@}*/
533
534 /**
535  * \brief Macroblock parameter for H.264 encoding in baseline, main & high 
536  * profiles.
537  *
538  * This structure holds per-macroblock information. The buffer must be
539  * allocated with as many elements (macroblocks) as necessary to fit
540  * the slice to be encoded. Besides, the per-macroblock records must
541  * be written in a strict raster order and with no gap. i.e. every
542  * macroblock, regardless of its type, shall have an entry.
543  */
544 typedef struct _VAEncMacroblockParameterBufferH264 {
545     /**
546      * \brief Quantization parameter.
547      *
548      * Requested quantization parameter. Range: 0 to 51, inclusive.
549      * If \ref qp is set to 0xff, then the actual value is derived
550      * from the slice-level value: \c pic_init_qp + \c slice_qp_delta.
551      */
552     unsigned char   qp;
553
554     union {
555         /** @name Data for intra macroblock */
556         /**@{*/
557         union {
558             struct {
559                 /**
560                  * \brief Flag specified to override MB neighbour
561                  * availability bits from VME stage.
562                  *
563                  * This flag specifies that macroblock neighbour
564                  * availability bits from the VME stage are overriden
565                  * by the \ref pred_avail_flags hereunder.
566                  */
567                 unsigned int    pred_avail_override_flag        : 1;
568                 /**
569                  * \brief Bitwise representation of which macroblocks
570                  * are available for intra prediction.
571                  *
572                  * If the slice is intra-coded, this field represents
573                  * the macroblocks available for intra prediction.
574                  * See \ref api_enc_h264_mb_pred_avail_bits
575                  * "macroblock neighbour availability" bit definitions.
576                  */
577                 unsigned int    pred_avail_flags                : 8;
578             } bits;
579             unsigned int value;
580         } intra_fields;
581         /**@}*/
582
583         /** @name Data for inter macroblock */
584         /**@{*/
585         union {
586             struct {
587                 unsigned int reserved;
588             } bits;
589             unsigned int value;
590         } inter_fields;
591         /**@}*/
592     } info;
593 } VAEncMacroblockParameterBufferH264;
594
595 /**@}*/
596
597 #ifdef __cplusplus
598 }
599 #endif
600
601 #endif /* VA_ENC_H264_H */