1 /** 2 * This file has no copyright assigned and is placed in the Public Domain. 3 * This file is part of the mingw-w64 runtime package. 4 * No warranty is given; refer to the file DISCLAIMER.PD within this package. 5 */ 6 #ifndef _INC_DXVA 7 #define _INC_DXVA 8 9 #include <objbase.h> 10 #include <guiddef.h> 11 #ifdef __cplusplus 12 extern "C" { 13 #endif 14 15 DEFINE_GUID(DXVA_NoEncrypt, 0x1b81bed0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); 16 17 /* DXVA H264 */ 18 typedef struct { 19 __C89_NAMELESS union { 20 __C89_NAMELESS struct { 21 UCHAR Index7Bits : 7; 22 UCHAR AssociatedFlag : 1; 23 }; 24 UCHAR bPicEntry; 25 }; 26 } DXVA_PicEntry_H264; 27 28 #pragma pack(push, 1) 29 typedef struct { 30 USHORT wFrameWidthInMbsMinus1; 31 USHORT wFrameHeightInMbsMinus1; 32 DXVA_PicEntry_H264 InPic; 33 DXVA_PicEntry_H264 OutPic; 34 USHORT PicOrderCnt_offset; 35 INT CurrPicOrderCnt; 36 UINT StatusReportFeedbackNumber; 37 UCHAR model_id; 38 UCHAR separate_colour_description_present_flag; 39 UCHAR film_grain_bit_depth_luma_minus8; 40 UCHAR film_grain_bit_depth_chroma_minus8; 41 UCHAR film_grain_full_range_flag; 42 UCHAR film_grain_colour_primaries; 43 UCHAR film_grain_transfer_characteristics; 44 UCHAR film_grain_matrix_coefficients; 45 UCHAR blending_mode_id; 46 UCHAR log2_scale_factor; 47 UCHAR comp_model_present_flag[4]; 48 UCHAR num_intensity_intervals_minus1[4]; 49 UCHAR num_model_values_minus1[4]; 50 UCHAR intensity_interval_lower_bound[3][16]; 51 UCHAR intensity_interval_upper_bound[3][16]; 52 SHORT comp_model_value[3][16][8]; 53 } DXVA_FilmGrainChar_H264; 54 #pragma pack(pop) 55 56 /* DXVA MPEG-I/II and VC-1 */ 57 typedef struct _DXVA_PictureParameters { 58 USHORT wDecodedPictureIndex; 59 USHORT wDeblockedPictureIndex; 60 USHORT wForwardRefPictureIndex; 61 USHORT wBackwardRefPictureIndex; 62 USHORT wPicWidthInMBminus1; 63 USHORT wPicHeightInMBminus1; 64 UCHAR bMacroblockWidthMinus1; 65 UCHAR bMacroblockHeightMinus1; 66 UCHAR bBlockWidthMinus1; 67 UCHAR bBlockHeightMinus1; 68 UCHAR bBPPminus1; 69 UCHAR bPicStructure; 70 UCHAR bSecondField; 71 UCHAR bPicIntra; 72 UCHAR bPicBackwardPrediction; 73 UCHAR bBidirectionalAveragingMode; 74 UCHAR bMVprecisionAndChromaRelation; 75 UCHAR bChromaFormat; 76 UCHAR bPicScanFixed; 77 UCHAR bPicScanMethod; 78 UCHAR bPicReadbackRequests; 79 UCHAR bRcontrol; 80 UCHAR bPicSpatialResid8; 81 UCHAR bPicOverflowBlocks; 82 UCHAR bPicExtrapolation; 83 UCHAR bPicDeblocked; 84 UCHAR bPicDeblockConfined; 85 UCHAR bPic4MVallowed; 86 UCHAR bPicOBMC; 87 UCHAR bPicBinPB; 88 UCHAR bMV_RPS; 89 UCHAR bReservedBits; 90 USHORT wBitstreamFcodes; 91 USHORT wBitstreamPCEelements; 92 UCHAR bBitstreamConcealmentNeed; 93 UCHAR bBitstreamConcealmentMethod; 94 } DXVA_PictureParameters, *LPDXVA_PictureParameters; 95 96 typedef struct _DXVA_QmatrixData { 97 BYTE bNewQmatrix[4]; 98 WORD Qmatrix[4][8 * 8]; 99 } DXVA_QmatrixData, *LPDXVA_QmatrixData; 100 101 #pragma pack(push, 1) 102 typedef struct _DXVA_SliceInfo { 103 USHORT wHorizontalPosition; 104 USHORT wVerticalPosition; 105 UINT dwSliceBitsInBuffer; 106 UINT dwSliceDataLocation; 107 UCHAR bStartCodeBitOffset; 108 UCHAR bReservedBits; 109 USHORT wMBbitOffset; 110 USHORT wNumberMBsInSlice; 111 USHORT wQuantizerScaleCode; 112 USHORT wBadSliceChopping; 113 } DXVA_SliceInfo, *LPDXVA_SliceInfo; 114 #pragma pack(pop) 115 116 typedef struct { 117 USHORT wFrameWidthInMbsMinus1; 118 USHORT wFrameHeightInMbsMinus1; 119 DXVA_PicEntry_H264 CurrPic; 120 UCHAR num_ref_frames; 121 __C89_NAMELESS union { 122 __C89_NAMELESS struct { 123 USHORT field_pic_flag : 1; 124 USHORT MbaffFrameFlag : 1; 125 USHORT residual_colour_transform_flag : 1; 126 USHORT sp_for_switch_flag : 1; 127 USHORT chroma_format_idc : 2; 128 USHORT RefPicFlag : 1; 129 USHORT constrained_intra_pred_flag : 1; 130 USHORT weighted_pred_flag : 1; 131 USHORT weighted_bipred_idc : 2; 132 USHORT MbsConsecutiveFlag : 1; 133 USHORT frame_mbs_only_flag : 1; 134 USHORT transform_8x8_mode_flag : 1; 135 USHORT MinLumaBipredSize8x8Flag : 1; 136 USHORT IntraPicFlag : 1; 137 }; 138 USHORT wBitFields; 139 }; 140 UCHAR bit_depth_luma_minus8; 141 UCHAR bit_depth_chroma_minus8; 142 USHORT Reserved16Bits; 143 UINT StatusReportFeedbackNumber; 144 DXVA_PicEntry_H264 RefFrameList[16]; 145 INT CurrFieldOrderCnt[2]; 146 INT FieldOrderCntList[16][2]; 147 CHAR pic_init_qs_minus26; 148 CHAR chroma_qp_index_offset; 149 CHAR second_chroma_qp_index_offset; 150 UCHAR ContinuationFlag; 151 CHAR pic_init_qp_minus26; 152 UCHAR num_ref_idx_l0_active_minus1; 153 UCHAR num_ref_idx_l1_active_minus1; 154 UCHAR Reserved8BitsA; 155 USHORT FrameNumList[16]; 156 UINT UsedForReferenceFlags; 157 USHORT NonExistingFrameFlags; 158 USHORT frame_num; 159 UCHAR log2_max_frame_num_minus4; 160 UCHAR pic_order_cnt_type; 161 UCHAR log2_max_pic_order_cnt_lsb_minus4; 162 UCHAR delta_pic_order_always_zero_flag; 163 UCHAR direct_8x8_inference_flag; 164 UCHAR entropy_coding_mode_flag; 165 UCHAR pic_order_present_flag; 166 UCHAR num_slice_groups_minus1; 167 UCHAR slice_group_map_type; 168 UCHAR deblocking_filter_control_present_flag; 169 UCHAR redundant_pic_cnt_present_flag; 170 UCHAR Reserved8BitsB; 171 USHORT slice_group_change_rate_minus1; 172 UCHAR SliceGroupMap[810]; 173 } DXVA_PicParams_H264; 174 175 typedef struct { 176 UCHAR bScalingLists4x4[6][16]; 177 UCHAR bScalingLists8x8[2][64]; 178 } DXVA_Qmatrix_H264; 179 180 typedef struct { 181 UINT BSNALunitDataLocation; 182 UINT SliceBytesInBuffer; 183 USHORT wBadSliceChopping; 184 USHORT first_mb_in_slice; 185 USHORT NumMbsForSlice; 186 USHORT BitOffsetToSliceData; 187 UCHAR slice_type; 188 UCHAR luma_log2_weight_denom; 189 UCHAR chroma_log2_weight_denom; 190 UCHAR num_ref_idx_l0_active_minus1; 191 UCHAR num_ref_idx_l1_active_minus1; 192 CHAR slice_alpha_c0_offset_div2; 193 CHAR slice_beta_offset_div2; 194 UCHAR Reserved8Bits; 195 DXVA_PicEntry_H264 RefPicList[2][32]; 196 SHORT Weights[2][32][3][2]; 197 CHAR slice_qs_delta; 198 CHAR slice_qp_delta; 199 UCHAR redundant_pic_cnt; 200 UCHAR direct_spatial_mv_pred_flag; 201 UCHAR cabac_init_idc; 202 UCHAR disable_deblocking_filter_idc; 203 USHORT slice_id; 204 } DXVA_Slice_H264_Long; 205 206 #pragma pack(push, 1) 207 typedef struct { 208 UINT BSNALunitDataLocation; 209 UINT SliceBytesInBuffer; 210 USHORT wBadSliceChopping; 211 } DXVA_Slice_H264_Short; 212 #pragma pack(pop) 213 214 #ifdef __cplusplus 215 } 216 #endif 217 218 #endif /*_INC_DXVA */ 219