1409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/* 2409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * Copyright (c) 2012 Intel Corporation. All Rights Reserved. 3409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 4409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * Permission is hereby granted, free of charge, to any person obtaining a 5409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * copy of this software and associated documentation files (the 6409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * "Software"), to deal in the Software without restriction, including 7409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * without limitation the rights to use, copy, modify, merge, publish, 8409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * distribute, sub license, and/or sell copies of the Software, and to 9409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * permit persons to whom the Software is furnished to do so, subject to 10409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * the following conditions: 11409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 12409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * The above copyright notice and this permission notice (including the 13409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * next paragraph) shall be included in all copies or substantial portions 14409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * of the Software. 15409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 16409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS 17409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. 19409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * IN NO EVENT SHALL INTEL AND/OR ITS SUPPLIERS BE LIABLE FOR 20409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, 21409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE 22409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 23409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 24409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 25409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 26409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \file va_enc_mpeg2.h 27409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief The MPEG-2 encoding API 28409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 29409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * This file contains the \ref api_enc_mpeg2 "MPEG-2 encoding API". 30409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 31409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 32409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#ifndef _VA_ENC_MPEG2_H_ 33409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#define _VA_ENC_MPEG2_H_ 34409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 35409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#ifdef __cplusplus 36409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuanextern "C" { 37409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#endif 38409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 39409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#include <va/va_enc.h> 40409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 41409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 42409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \defgroup api_enc_mpeg2 MPEG-2 encoding API 43409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 44409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * @{ 45409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 46409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 47409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#define MPEG2_LAST_PICTURE_EOSTREAM VA_ENC_LAST_PICTURE_EOSTREAM 48409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 49409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 50409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief MPEG-2 Quantization Matrix Buffer 51409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 52409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 53409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuantypedef VAIQMatrixBufferMPEG2 VAQMatrixBufferMPEG2; 54409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 55409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 56409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Packed header types specific to MPEG-2 encoding. 57409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 58409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * Types of packed headers generally used for MPEG-2 encoding. 59409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 60409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuantypedef enum { 61409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 62409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Packed Sequence Parameter Set (SPS). 63409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 64409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 65409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VAEncPackedHeaderMPEG2_SPS = VAEncPackedHeaderSequence, 66409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 67409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Packed Picture Parameter Set (PPS). 68409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 69409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 70409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VAEncPackedHeaderMPEG2_PPS = VAEncPackedHeaderPicture, 71409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 72409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Packed slice header. 73409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 74409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 75409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VAEncPackedHeaderMPEG2_Slice = VAEncPackedHeaderSlice, 76409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan} VAEncPackedHeaderTypeMPEG2; 77409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 78409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 79409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Sequence parameter for MPEG-2 encoding 80409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 81409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * This structure holds information for \c sequence_header() and 82409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * sequence_extension(). 83409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 84409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * If packed sequence headers mode is used, i.e. if the encoding 85409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * pipeline was configured with the #VA_ENC_PACKED_HEADER_SEQUENCE 86409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * flag, then the driver expects two more buffers to be provided to 87409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * the same \c vaRenderPicture() as this buffer: 88409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * - a #VAEncPackedHeaderParameterBuffer with type set to 89409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * VAEncPackedHeaderType::VAEncPackedHeaderSequence ; 90409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * - a #VAEncPackedHeaderDataBuffer which holds the actual packed 91409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * header data. 92409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 93409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 94409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuantypedef struct _VAEncSequenceParameterBufferMPEG2 { 95409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Period between I frames. */ 96409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int intra_period; 97409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Period between I/P frames. */ 98409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int ip_period; 99409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Picture width. 100409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 101409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * A 14bits unsigned inter, the lower 12bits 102409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * is horizontal_size_value, and the upper 103409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 2bits is \c horizontal_size_extension 104409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 105409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 106409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned short picture_width; 107409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Picture height. 108409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 109409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * A 14bits unsigned inter, the lower 12bits 110409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * is vertical_size_value, and the upper 2bits is 111409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * vertical_size_size_extension 112409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 113409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 114409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned short picture_height; 115409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 116409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Initial bitrate set for this sequence in CBR or VBR modes. 117409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 118409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * This field represents the initial bitrate value for this 119409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * sequence if CBR or VBR mode is used, i.e. if the encoder 120409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * pipeline was created with a #VAConfigAttribRateControl 121409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * attribute set to either \ref VA_RC_CBR or \ref VA_RC_VBR. 122409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 123409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * bits_per_second may be derived from bit_rate. 124409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 125409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 126409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int bits_per_second; 127409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 128409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Frame rate 129409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 130409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * Derived from frame_rate_value, frame_rate_extension_n and 131409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * frame_rate_extension_d 132409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 133409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 134409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan float frame_rate; 135409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in sequence_header() */ 136409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned short aspect_ratio_information; 137409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Define the size of VBV */ 138409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int vbv_buffer_size; 139409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 140409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan union { 141409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan struct { 142409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 143409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int profile_and_level_indication : 8; 144409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 145409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int progressive_sequence : 1; 146409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 147409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int chroma_format : 2; 148409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 149409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int low_delay : 1; 150409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 151409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int frame_rate_extension_n : 2; 152409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Sequence extension() */ 153409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int frame_rate_extension_d : 5; 154409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } bits; 155409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int value; 156409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } sequence_extension; 157409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 158409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Flag to indicate the following GOP header are being updated */ 159409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int new_gop_header; 160409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 161409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan union { 162409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan struct { 163409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Time code */ 164409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int time_code : 25; 165409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in GOP header */ 166409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int closed_gop : 1; 167409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief SAme as the element in GOP header */ 168409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int broken_link : 1; 169409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } bits; 170409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int value; 171409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } gop_header; 172409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan} VAEncSequenceParameterBufferMPEG2; 173409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 174409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 175409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Picture parameter for MPEG-2 encoding 176409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 177409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * This structure holds information for picture_header() and 178409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * picture_coding_extension() 179409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 180409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * If packed picture headers mode is used, i.e. if the encoding 181409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * pipeline was configured with the #VA_ENC_PACKED_HEADER_PICTURE 182409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * flag, then the driver expects two more buffers to be provided to 183409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * the same \c vaRenderPicture() as this buffer: 184409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * - a #VAEncPackedHeaderParameterBuffer with type set to 185409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * VAEncPackedHeaderType::VAEncPackedHeaderPicture ; 186409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * - a #VAEncPackedHeaderDataBuffer which holds the actual packed 187409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * header data. 188409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 189409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 190409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuantypedef struct _VAEncPictureParameterBufferMPEG2 { 191409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Forward reference picture */ 192409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VASurfaceID forward_reference_picture; 193409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Backward reference picture */ 194409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VASurfaceID backward_reference_picture; 195409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Reconstructed(decoded) picture */ 196409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VASurfaceID reconstructed_picture; 197409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 198409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Output encoded bitstream. 199409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 200409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \ref coded_buf has type #VAEncCodedBufferType. It should be 201409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * large enough to hold the compressed NAL slice and possibly SPS 202409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * and PPS NAL units. 203409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 204409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VABufferID coded_buf; 205409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** 206409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Flag to indicate the picture is the last one or not. 207409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 208409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * This fields holds 0 if the picture to be encoded is not 209409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * the last one in the stream. Otherwise, it 210409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * is \ref MPEG2_LAST_PICTURE_EOSTREAM. 211409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 212409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned char last_picture; 213409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Picture type */ 214409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan VAEncPictureType picture_type; 215409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in picture_header() */ 216409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int temporal_reference; 217409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in picture_header() */ 218409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int vbv_delay; 219409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 220409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned char f_code[2][2]; 221409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan union { 222409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan struct { 223409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 224409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int intra_dc_precision : 2; 225409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 226409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int picture_structure : 2; 227409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 228409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int top_field_first : 1; 229409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 230409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int frame_pred_frame_dct : 1; 231409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 232409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int concealment_motion_vectors : 1; 233409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 234409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int q_scale_type : 1; 235409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 236409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int intra_vlc_format : 1; 237409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 238409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int alternate_scan : 1; 239409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 240409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int repeat_first_field : 1; 241409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 242409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int progressive_frame : 1; 243409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 244409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int composite_display_flag : 1; 245409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } bits; 246409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int value; 247409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } picture_coding_extension; 248409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 249409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /* \brief Parameters for composite display 250409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 251409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * Valid only when omposite_display_flag is 1 252409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 253409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan union { 254409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan struct { 255409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 256409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int v_axis : 1; 257409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 258409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int field_sequence : 3; 259409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 260409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int sub_carrier : 1; 261409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 262409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int burst_amplitude : 7; 263409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in Picture coding extension */ 264409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int sub_carrier_phase : 8; 265409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } bits; 266409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int value; 267409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan } composite_display; 268409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan} VAEncPictureParameterBufferMPEG2; 269409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 270409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/** 271409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * \brief Slice parameter for MPEG-2 encoding 272409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan * 273409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan */ 274409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuantypedef struct _VAEncSliceParameterBufferMPEG2 { 275409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Starting MB address for this slice. */ 276409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int macroblock_address; 277409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Number of macroblocks in this slice. */ 278409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan unsigned int num_macroblocks; 279409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Same as the element in slice() */ 280409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan int quantiser_scale_code; 281409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan /** \brief Flag to indicate intra slice */ 282409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan int is_intra_slice; 283409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan} VAEncSliceParameterBufferMPEG2; 284409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 285409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan/**@}*/ 286409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 287409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#ifdef __cplusplus 288409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan} 289409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#endif 290409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan 291409de6acb4473c973ed2532e340831dc582e5e0eAustin Yuan#endif /* _VA_ENC_MPEG2_H_ */ 292