| 1 | /* | 
 
 
 
 
 | 2 | * Copyright 2015 Michael Müller | 
 
 
 
 
 | 3 | * | 
 
 
 
 
 | 4 | * This library is free software; you can redistribute it and/or | 
 
 
 
 
 | 5 | * modify it under the terms of the GNU Lesser General Public | 
 
 
 
 
 | 6 | * License as published by the Free Software Foundation; either | 
 
 
 
 
 | 7 | * version 2.1 of the License, or (at your option) any later version. | 
 
 
 
 
 | 8 | * | 
 
 
 
 
 | 9 | * This library is distributed in the hope that it will be useful, | 
 
 
 
 
 | 10 | * but WITHOUT ANY WARRANTY; without even the implied warranty of | 
 
 
 
 
 | 11 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU | 
 
 
 
 
 | 12 | * Lesser General Public License for more details. | 
 
 
 
 
 | 13 | * | 
 
 
 
 
 | 14 | * You should have received a copy of the GNU Lesser General Public | 
 
 
 
 
 | 15 | * License along with this library; if not, write to the Free Software | 
 
 
 
 
 | 16 | * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA | 
 
 
 
 
 | 17 | */ | 
 
 
 
 
 | 18 |  | 
 
 
 
 
 | 19 | #ifndef __WINE_DXVA_H | 
 
 
 
 
 | 20 | #define __WINE_DXVA_H | 
 
 
 
 
 | 21 |  | 
 
 
 
 
 | 22 | #ifdef __cplusplus | 
 
 
 
 
 | 23 | extern "C" { | 
 
 
 
 
 | 24 | #endif | 
 
 
 
 
 | 25 |  | 
 
 
 
 
 | 26 | DEFINE_GUID(DXVA_NoEncrypt, 0x1b81bed0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5); | 
 
 
 
 
 | 27 |  | 
 
 
 
 
 | 28 | #define DXVA_USUAL_BLOCK_WIDTH   8 | 
 
 
 
 
 | 29 | #define DXVA_USUAL_BLOCK_HEIGHT  8 | 
 
 
 
 
 | 30 | #define DXVA_USUAL_BLOCK_SIZE   (DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT) | 
 
 
 
 
 | 31 |  | 
 
 
 
 
 | 32 | #include <pshpack1.h> | 
 
 
 
 
 | 33 |  | 
 
 
 
 
 | 34 | typedef struct _DXVA_PicEntry_H264 | 
 
 
 
 
 | 35 | { | 
 
 
 
 
 | 36 | union | 
 
 
 
 
 | 37 | { | 
 
 
 
 
 | 38 | struct | 
 
 
 
 
 | 39 | { | 
 
 
 
 
 | 40 | UCHAR Index7Bits     : 7; | 
 
 
 
 
 | 41 | UCHAR AssociatedFlag : 1; | 
 
 
 
 
 | 42 | } DUMMYSTRUCTNAME; | 
 
 
 
 
 | 43 | UCHAR bPicEntry; | 
 
 
 
 
 | 44 | } DUMMYUNIONNAME; | 
 
 
 
 
 | 45 | } DXVA_PicEntry_H264, *LPDXVA_PicEntry_H264; | 
 
 
 
 
 | 46 |  | 
 
 
 
 
 | 47 | typedef struct _DXVA_FilmGrainCharacteristics | 
 
 
 
 
 | 48 | { | 
 
 
 
 
 | 49 | USHORT  wFrameWidthInMbsMinus1; | 
 
 
 
 
 | 50 | USHORT  wFrameHeightInMbsMinus1; | 
 
 
 
 
 | 51 | DXVA_PicEntry_H264 InPic; | 
 
 
 
 
 | 52 | DXVA_PicEntry_H264 OutPic; | 
 
 
 
 
 | 53 | USHORT  PicOrderCnt_offset; | 
 
 
 
 
 | 54 | INT     CurrPicOrderCnt; | 
 
 
 
 
 | 55 | UINT    StatusReportFeedbackNumber; | 
 
 
 
 
 | 56 | UCHAR   model_id; | 
 
 
 
 
 | 57 | UCHAR   separate_colour_description_present_flag; | 
 
 
 
 
 | 58 | UCHAR   film_grain_bit_depth_luma_minus8; | 
 
 
 
 
 | 59 | UCHAR   film_grain_bit_depth_chroma_minus8; | 
 
 
 
 
 | 60 | UCHAR   film_grain_full_range_flag; | 
 
 
 
 
 | 61 | UCHAR   film_grain_colour_primaries; | 
 
 
 
 
 | 62 | UCHAR   film_grain_transfer_characteristics; | 
 
 
 
 
 | 63 | UCHAR   film_grain_matrix_coefficients; | 
 
 
 
 
 | 64 | UCHAR   blending_mode_id; | 
 
 
 
 
 | 65 | UCHAR   log2_scale_factor; | 
 
 
 
 
 | 66 | UCHAR   comp_model_present_flag[4]; | 
 
 
 
 
 | 67 | UCHAR   num_intensity_intervals_minus1[4]; | 
 
 
 
 
 | 68 | UCHAR   num_model_values_minus1[4]; | 
 
 
 
 
 | 69 | UCHAR   intensity_interval_lower_bound[3][16]; | 
 
 
 
 
 | 70 | UCHAR   intensity_interval_upper_bound[3][16]; | 
 
 
 
 
 | 71 | SHORT   comp_model_value[3][16][8]; | 
 
 
 
 
 | 72 | } DXVA_FilmGrainChar_H264, *LPDXVA_FilmGrainChar_H264; | 
 
 
 
 
 | 73 |  | 
 
 
 
 
 | 74 | typedef struct _DXVA_PictureParameters | 
 
 
 
 
 | 75 | { | 
 
 
 
 
 | 76 | WORD wDecodedPictureIndex; | 
 
 
 
 
 | 77 | WORD wDeblockedPictureIndex; | 
 
 
 
 
 | 78 | WORD wForwardRefPictureIndex; | 
 
 
 
 
 | 79 | WORD wBackwardRefPictureIndex; | 
 
 
 
 
 | 80 | WORD wPicWidthInMBminus1; | 
 
 
 
 
 | 81 | WORD wPicHeightInMBminus1; | 
 
 
 
 
 | 82 | BYTE bMacroblockWidthMinus1; | 
 
 
 
 
 | 83 | BYTE bMacroblockHeightMinus1; | 
 
 
 
 
 | 84 | BYTE bBlockWidthMinus1; | 
 
 
 
 
 | 85 | BYTE bBlockHeightMinus1; | 
 
 
 
 
 | 86 | BYTE bBPPminus1; | 
 
 
 
 
 | 87 | BYTE bPicStructure; | 
 
 
 
 
 | 88 | BYTE bSecondField; | 
 
 
 
 
 | 89 | BYTE bPicIntra; | 
 
 
 
 
 | 90 | BYTE bPicBackwardPrediction; | 
 
 
 
 
 | 91 | BYTE bBidirectionalAveragingMode; | 
 
 
 
 
 | 92 | BYTE bMVprecisionAndChromaRelation; | 
 
 
 
 
 | 93 | BYTE bChromaFormat; | 
 
 
 
 
 | 94 | BYTE bPicScanFixed; | 
 
 
 
 
 | 95 | BYTE bPicScanMethod; | 
 
 
 
 
 | 96 | BYTE bPicReadbackRequests; | 
 
 
 
 
 | 97 | BYTE bRcontrol; | 
 
 
 
 
 | 98 | BYTE bPicSpatialResid8; | 
 
 
 
 
 | 99 | BYTE bPicOverflowBlocks; | 
 
 
 
 
 | 100 | BYTE bPicExtrapolation; | 
 
 
 
 
 | 101 | BYTE bPicDeblocked; | 
 
 
 
 
 | 102 | BYTE bPicDeblockConfined; | 
 
 
 
 
 | 103 | BYTE bPic4MVallowed; | 
 
 
 
 
 | 104 | BYTE bPicOBMC; | 
 
 
 
 
 | 105 | BYTE bPicBinPB; | 
 
 
 
 
 | 106 | BYTE bMV_RPS; | 
 
 
 
 
 | 107 | BYTE bReservedBits; | 
 
 
 
 
 | 108 | WORD wBitstreamFcodes; | 
 
 
 
 
 | 109 | WORD wBitstreamPCEelements; | 
 
 
 
 
 | 110 | BYTE bBitstreamConcealmentNeed; | 
 
 
 
 
 | 111 | BYTE bBitstreamConcealmentMethod; | 
 
 
 
 
 | 112 | } DXVA_PictureParameters, *LPDXVA_PictureParameters; | 
 
 
 
 
 | 113 |  | 
 
 
 
 
 | 114 | typedef struct _DXVA_SliceInfo | 
 
 
 
 
 | 115 | { | 
 
 
 
 
 | 116 | WORD wHorizontalPosition; | 
 
 
 
 
 | 117 | WORD wVerticalPosition; | 
 
 
 
 
 | 118 | DWORD dwSliceBitsInBuffer; | 
 
 
 
 
 | 119 | DWORD dwSliceDataLocation; | 
 
 
 
 
 | 120 | BYTE bStartCodeBitOffset; | 
 
 
 
 
 | 121 | BYTE bReservedBits; | 
 
 
 
 
 | 122 | WORD wMBbitOffset; | 
 
 
 
 
 | 123 | WORD wNumberMBsInSlice; | 
 
 
 
 
 | 124 | WORD wQuantizerScaleCode; | 
 
 
 
 
 | 125 | WORD wBadSliceChopping; | 
 
 
 
 
 | 126 | } DXVA_SliceInfo, *LPDXVA_SliceInfo; | 
 
 
 
 
 | 127 |  | 
 
 
 
 
 | 128 | typedef struct _DXVA_QmatrixData | 
 
 
 
 
 | 129 | { | 
 
 
 
 
 | 130 | BYTE bNewQmatrix[4]; | 
 
 
 
 
 | 131 | WORD Qmatrix[4][DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT]; | 
 
 
 
 
 | 132 | } DXVA_QmatrixData, *LPDXVA_QmatrixData; | 
 
 
 
 
 | 133 |  | 
 
 
 
 
 | 134 | typedef struct _DXVA_PicParams_H264 | 
 
 
 
 
 | 135 | { | 
 
 
 
 
 | 136 | USHORT wFrameWidthInMbsMinus1; | 
 
 
 
 
 | 137 | USHORT wFrameHeightInMbsMinus1; | 
 
 
 
 
 | 138 | DXVA_PicEntry_H264 CurrPic; | 
 
 
 
 
 | 139 | UCHAR num_ref_frames; | 
 
 
 
 
 | 140 | union | 
 
 
 
 
 | 141 | { | 
 
 
 
 
 | 142 | struct | 
 
 
 
 
 | 143 | { | 
 
 
 
 
 | 144 | USHORT field_pic_flag                   : 1; | 
 
 
 
 
 | 145 | USHORT MbaffFrameFlag                   : 1; | 
 
 
 
 
 | 146 | USHORT residual_colour_transform_flag   : 1; | 
 
 
 
 
 | 147 | USHORT sp_for_switch_flag               : 1; | 
 
 
 
 
 | 148 | USHORT chroma_format_idc                : 2; | 
 
 
 
 
 | 149 | USHORT RefPicFlag                       : 1; | 
 
 
 
 
 | 150 | USHORT constrained_intra_pred_flag      : 1; | 
 
 
 
 
 | 151 | USHORT weighted_pred_flag               : 1; | 
 
 
 
 
 | 152 | USHORT weighted_bipred_idc              : 2; | 
 
 
 
 
 | 153 | USHORT MbsConsecutiveFlag               : 1; | 
 
 
 
 
 | 154 | USHORT frame_mbs_only_flag              : 1; | 
 
 
 
 
 | 155 | USHORT transform_8x8_mode_flag          : 1; | 
 
 
 
 
 | 156 | USHORT MinLumaBipredSize8x8Flag         : 1; | 
 
 
 
 
 | 157 | USHORT IntraPicFlag                     : 1; | 
 
 
 
 
 | 158 | } DUMMYSTRUCTNAME; | 
 
 
 
 
 | 159 | USHORT wBitFields; | 
 
 
 
 
 | 160 | } DUMMYUNIONNAME; | 
 
 
 
 
 | 161 | UCHAR bit_depth_luma_minus8; | 
 
 
 
 
 | 162 | UCHAR bit_depth_chroma_minus8; | 
 
 
 
 
 | 163 | USHORT Reserved16Bits; | 
 
 
 
 
 | 164 | UINT StatusReportFeedbackNumber; | 
 
 
 
 
 | 165 | DXVA_PicEntry_H264 RefFrameList[16]; | 
 
 
 
 
 | 166 | INT CurrFieldOrderCnt[2]; | 
 
 
 
 
 | 167 | INT FieldOrderCntList[16][2]; | 
 
 
 
 
 | 168 | CHAR pic_init_qs_minus26; | 
 
 
 
 
 | 169 | CHAR chroma_qp_index_offset; | 
 
 
 
 
 | 170 | CHAR second_chroma_qp_index_offset; | 
 
 
 
 
 | 171 | UCHAR ContinuationFlag; | 
 
 
 
 
 | 172 | CHAR pic_init_qp_minus26; | 
 
 
 
 
 | 173 | UCHAR num_ref_idx_l0_active_minus1; | 
 
 
 
 
 | 174 | UCHAR num_ref_idx_l1_active_minus1; | 
 
 
 
 
 | 175 | UCHAR Reserved8BitsA; | 
 
 
 
 
 | 176 | USHORT FrameNumList[16]; | 
 
 
 
 
 | 177 |  | 
 
 
 
 
 | 178 | UINT UsedForReferenceFlags; | 
 
 
 
 
 | 179 | USHORT NonExistingFrameFlags; | 
 
 
 
 
 | 180 | USHORT frame_num; | 
 
 
 
 
 | 181 | UCHAR log2_max_frame_num_minus4; | 
 
 
 
 
 | 182 | UCHAR pic_order_cnt_type; | 
 
 
 
 
 | 183 | UCHAR log2_max_pic_order_cnt_lsb_minus4; | 
 
 
 
 
 | 184 | UCHAR delta_pic_order_always_zero_flag; | 
 
 
 
 
 | 185 | UCHAR direct_8x8_inference_flag; | 
 
 
 
 
 | 186 | UCHAR entropy_coding_mode_flag; | 
 
 
 
 
 | 187 | UCHAR pic_order_present_flag; | 
 
 
 
 
 | 188 | UCHAR num_slice_groups_minus1; | 
 
 
 
 
 | 189 | UCHAR slice_group_map_type; | 
 
 
 
 
 | 190 | UCHAR deblocking_filter_control_present_flag; | 
 
 
 
 
 | 191 | UCHAR redundant_pic_cnt_present_flag; | 
 
 
 
 
 | 192 | UCHAR Reserved8BitsB; | 
 
 
 
 
 | 193 | USHORT slice_group_change_rate_minus1; | 
 
 
 
 
 | 194 | UCHAR SliceGroupMap[810]; | 
 
 
 
 
 | 195 | } DXVA_PicParams_H264, *LPDXVA_PicParams_H264; | 
 
 
 
 
 | 196 |  | 
 
 
 
 
 | 197 | typedef struct _DXVA_Qmatrix_H264 | 
 
 
 
 
 | 198 | { | 
 
 
 
 
 | 199 | UCHAR bScalingLists4x4[6][16]; | 
 
 
 
 
 | 200 | UCHAR bScalingLists8x8[2][64]; | 
 
 
 
 
 | 201 | } DXVA_Qmatrix_H264, *LPDXVA_Qmatrix_H264; | 
 
 
 
 
 | 202 |  | 
 
 
 
 
 | 203 | typedef struct _DXVA_Slice_H264_Long | 
 
 
 
 
 | 204 | { | 
 
 
 
 
 | 205 | UINT BSNALunitDataLocation; | 
 
 
 
 
 | 206 | UINT SliceBytesInBuffer; | 
 
 
 
 
 | 207 | USHORT wBadSliceChopping; | 
 
 
 
 
 | 208 | USHORT first_mb_in_slice; | 
 
 
 
 
 | 209 | USHORT NumMbsForSlice; | 
 
 
 
 
 | 210 | USHORT BitOffsetToSliceData; | 
 
 
 
 
 | 211 | UCHAR slice_type; | 
 
 
 
 
 | 212 | UCHAR luma_log2_weight_denom; | 
 
 
 
 
 | 213 | UCHAR chroma_log2_weight_denom; | 
 
 
 
 
 | 214 |  | 
 
 
 
 
 | 215 | UCHAR num_ref_idx_l0_active_minus1; | 
 
 
 
 
 | 216 | UCHAR num_ref_idx_l1_active_minus1; | 
 
 
 
 
 | 217 | CHAR slice_alpha_c0_offset_div2; | 
 
 
 
 
 | 218 | CHAR slice_beta_offset_div2; | 
 
 
 
 
 | 219 | UCHAR Reserved8Bits; | 
 
 
 
 
 | 220 | DXVA_PicEntry_H264 RefPicList[2][32]; | 
 
 
 
 
 | 221 | SHORT Weights[2][32][3][2]; | 
 
 
 
 
 | 222 | CHAR slice_qs_delta; | 
 
 
 
 
 | 223 | CHAR slice_qp_delta; | 
 
 
 
 
 | 224 | UCHAR redundant_pic_cnt; | 
 
 
 
 
 | 225 | UCHAR direct_spatial_mv_pred_flag; | 
 
 
 
 
 | 226 | UCHAR cabac_init_idc; | 
 
 
 
 
 | 227 | UCHAR disable_deblocking_filter_idc; | 
 
 
 
 
 | 228 | USHORT slice_id; | 
 
 
 
 
 | 229 | } DXVA_Slice_H264_Long, *LPDXVA_Slice_H264_Long; | 
 
 
 
 
 | 230 |  | 
 
 
 
 
 | 231 | typedef struct _DXVA_Slice_H264_Short | 
 
 
 
 
 | 232 | { | 
 
 
 
 
 | 233 | UINT BSNALunitDataLocation; | 
 
 
 
 
 | 234 | UINT SliceBytesInBuffer; | 
 
 
 
 
 | 235 | USHORT wBadSliceChopping; | 
 
 
 
 
 | 236 | } DXVA_Slice_H264_Short, *LPDXVA_Slice_H264_Short; | 
 
 
 
 
 | 237 |  | 
 
 
 
 
 | 238 |  | 
 
 
 
 
 | 239 | typedef struct _DXVA_PicEntry_HEVC | 
 
 
 
 
 | 240 | { | 
 
 
 
 
 | 241 | union | 
 
 
 
 
 | 242 | { | 
 
 
 
 
 | 243 | struct | 
 
 
 
 
 | 244 | { | 
 
 
 
 
 | 245 | UCHAR Index7Bits : 7; | 
 
 
 
 
 | 246 | UCHAR AssociatedFlag : 1; | 
 
 
 
 
 | 247 | }; | 
 
 
 
 
 | 248 | UCHAR bPicEntry; | 
 
 
 
 
 | 249 | }; | 
 
 
 
 
 | 250 | } DXVA_PicEntry_HEVC, *LPDXVA_PicEntry_HEVC; | 
 
 
 
 
 | 251 |  | 
 
 
 
 
 | 252 | typedef struct _DXVA_PicParams_HEVC | 
 
 
 
 
 | 253 | { | 
 
 
 
 
 | 254 | USHORT      PicWidthInMinCbsY; | 
 
 
 
 
 | 255 | USHORT      PicHeightInMinCbsY; | 
 
 
 
 
 | 256 | union | 
 
 
 
 
 | 257 | { | 
 
 
 
 
 | 258 | struct | 
 
 
 
 
 | 259 | { | 
 
 
 
 
 | 260 | USHORT  chroma_format_idc                       : 2; | 
 
 
 
 
 | 261 | USHORT  separate_colour_plane_flag              : 1; | 
 
 
 
 
 | 262 | USHORT  bit_depth_luma_minus8                   : 3; | 
 
 
 
 
 | 263 | USHORT  bit_depth_chroma_minus8                 : 3; | 
 
 
 
 
 | 264 | USHORT  log2_max_pic_order_cnt_lsb_minus4       : 4; | 
 
 
 
 
 | 265 | USHORT  NoPicReorderingFlag                     : 1; | 
 
 
 
 
 | 266 | USHORT  NoBiPredFlag                            : 1; | 
 
 
 
 
 | 267 | USHORT  ReservedBits1                            : 1; | 
 
 
 
 
 | 268 | }; | 
 
 
 
 
 | 269 | USHORT wFormatAndSequenceInfoFlags; | 
 
 
 
 
 | 270 | }; | 
 
 
 
 
 | 271 | DXVA_PicEntry_HEVC  CurrPic; | 
 
 
 
 
 | 272 | UCHAR   sps_max_dec_pic_buffering_minus1; | 
 
 
 
 
 | 273 | UCHAR   log2_min_luma_coding_block_size_minus3; | 
 
 
 
 
 | 274 | UCHAR   log2_diff_max_min_luma_coding_block_size; | 
 
 
 
 
 | 275 | UCHAR   log2_min_transform_block_size_minus2; | 
 
 
 
 
 | 276 | UCHAR   log2_diff_max_min_transform_block_size; | 
 
 
 
 
 | 277 | UCHAR   max_transform_hierarchy_depth_inter; | 
 
 
 
 
 | 278 | UCHAR   max_transform_hierarchy_depth_intra; | 
 
 
 
 
 | 279 | UCHAR   num_short_term_ref_pic_sets; | 
 
 
 
 
 | 280 | UCHAR   num_long_term_ref_pics_sps; | 
 
 
 
 
 | 281 | UCHAR   num_ref_idx_l0_default_active_minus1; | 
 
 
 
 
 | 282 | UCHAR   num_ref_idx_l1_default_active_minus1; | 
 
 
 
 
 | 283 | CHAR    init_qp_minus26; | 
 
 
 
 
 | 284 | UCHAR   ucNumDeltaPocsOfRefRpsIdx; | 
 
 
 
 
 | 285 | USHORT  wNumBitsForShortTermRPSInSlice; | 
 
 
 
 
 | 286 | USHORT  ReservedBits2; | 
 
 
 
 
 | 287 |  | 
 
 
 
 
 | 288 | union | 
 
 
 
 
 | 289 | { | 
 
 
 
 
 | 290 | struct | 
 
 
 
 
 | 291 | { | 
 
 
 
 
 | 292 | UINT32  scaling_list_enabled_flag                    : 1; | 
 
 
 
 
 | 293 | UINT32  amp_enabled_flag                            : 1; | 
 
 
 
 
 | 294 | UINT32  sample_adaptive_offset_enabled_flag         : 1; | 
 
 
 
 
 | 295 | UINT32  pcm_enabled_flag                            : 1; | 
 
 
 
 
 | 296 | UINT32  pcm_sample_bit_depth_luma_minus1            : 4; | 
 
 
 
 
 | 297 | UINT32  pcm_sample_bit_depth_chroma_minus1          : 4; | 
 
 
 
 
 | 298 | UINT32  log2_min_pcm_luma_coding_block_size_minus3  : 2; | 
 
 
 
 
 | 299 | UINT32  log2_diff_max_min_pcm_luma_coding_block_size : 2; | 
 
 
 
 
 | 300 | UINT32  pcm_loop_filter_disabled_flag                : 1; | 
 
 
 
 
 | 301 | UINT32  long_term_ref_pics_present_flag             : 1; | 
 
 
 
 
 | 302 | UINT32  sps_temporal_mvp_enabled_flag               : 1; | 
 
 
 
 
 | 303 | UINT32  strong_intra_smoothing_enabled_flag         : 1; | 
 
 
 
 
 | 304 | UINT32  dependent_slice_segments_enabled_flag       : 1; | 
 
 
 
 
 | 305 | UINT32  output_flag_present_flag                    : 1; | 
 
 
 
 
 | 306 | UINT32  num_extra_slice_header_bits                 : 3; | 
 
 
 
 
 | 307 | UINT32  sign_data_hiding_enabled_flag               : 1; | 
 
 
 
 
 | 308 | UINT32  cabac_init_present_flag                     : 1; | 
 
 
 
 
 | 309 | UINT32  ReservedBits3                               : 5; | 
 
 
 
 
 | 310 | }; | 
 
 
 
 
 | 311 | UINT32 dwCodingParamToolFlags; | 
 
 
 
 
 | 312 | }; | 
 
 
 
 
 | 313 |  | 
 
 
 
 
 | 314 | union | 
 
 
 
 
 | 315 | { | 
 
 
 
 
 | 316 | struct | 
 
 
 
 
 | 317 | { | 
 
 
 
 
 | 318 | UINT32  constrained_intra_pred_flag                 : 1; | 
 
 
 
 
 | 319 | UINT32  transform_skip_enabled_flag                 : 1; | 
 
 
 
 
 | 320 | UINT32  cu_qp_delta_enabled_flag                    : 1; | 
 
 
 
 
 | 321 | UINT32  pps_slice_chroma_qp_offsets_present_flag    : 1; | 
 
 
 
 
 | 322 | UINT32  weighted_pred_flag                          : 1; | 
 
 
 
 
 | 323 | UINT32  weighted_bipred_flag                        : 1; | 
 
 
 
 
 | 324 | UINT32  transquant_bypass_enabled_flag              : 1; | 
 
 
 
 
 | 325 | UINT32  tiles_enabled_flag                          : 1; | 
 
 
 
 
 | 326 | UINT32  entropy_coding_sync_enabled_flag            : 1; | 
 
 
 
 
 | 327 | UINT32  uniform_spacing_flag                        : 1; | 
 
 
 
 
 | 328 | UINT32  loop_filter_across_tiles_enabled_flag       : 1; | 
 
 
 
 
 | 329 | UINT32  pps_loop_filter_across_slices_enabled_flag  : 1; | 
 
 
 
 
 | 330 | UINT32  deblocking_filter_override_enabled_flag     : 1; | 
 
 
 
 
 | 331 | UINT32  pps_deblocking_filter_disabled_flag         : 1; | 
 
 
 
 
 | 332 | UINT32  lists_modification_present_flag             : 1; | 
 
 
 
 
 | 333 | UINT32  slice_segment_header_extension_present_flag : 1; | 
 
 
 
 
 | 334 | UINT32  IrapPicFlag                                 : 1; | 
 
 
 
 
 | 335 | UINT32  IdrPicFlag                                  : 1; | 
 
 
 
 
 | 336 | UINT32  IntraPicFlag                                : 1; | 
 
 
 
 
 | 337 | UINT32  ReservedBits4                               : 13; | 
 
 
 
 
 | 338 | }; | 
 
 
 
 
 | 339 | UINT32 dwCodingSettingPicturePropertyFlags; | 
 
 
 
 
 | 340 | }; | 
 
 
 
 
 | 341 | CHAR    pps_cb_qp_offset; | 
 
 
 
 
 | 342 | CHAR    pps_cr_qp_offset; | 
 
 
 
 
 | 343 | UCHAR   num_tile_columns_minus1; | 
 
 
 
 
 | 344 | UCHAR   num_tile_rows_minus1; | 
 
 
 
 
 | 345 | USHORT  column_width_minus1[19]; | 
 
 
 
 
 | 346 | USHORT  row_height_minus1[21]; | 
 
 
 
 
 | 347 | UCHAR   diff_cu_qp_delta_depth; | 
 
 
 
 
 | 348 | CHAR    pps_beta_offset_div2; | 
 
 
 
 
 | 349 | CHAR    pps_tc_offset_div2; | 
 
 
 
 
 | 350 | UCHAR   log2_parallel_merge_level_minus2; | 
 
 
 
 
 | 351 | INT     CurrPicOrderCntVal; | 
 
 
 
 
 | 352 | DXVA_PicEntry_HEVC  RefPicList[15]; | 
 
 
 
 
 | 353 | UCHAR   ReservedBits5; | 
 
 
 
 
 | 354 | INT     PicOrderCntValList[15]; | 
 
 
 
 
 | 355 | UCHAR   RefPicSetStCurrBefore[8]; | 
 
 
 
 
 | 356 | UCHAR   RefPicSetStCurrAfter[8]; | 
 
 
 
 
 | 357 | UCHAR   RefPicSetLtCurr[8]; | 
 
 
 
 
 | 358 | USHORT  ReservedBits6; | 
 
 
 
 
 | 359 | USHORT  ReservedBits7; | 
 
 
 
 
 | 360 | UINT    StatusReportFeedbackNumber; | 
 
 
 
 
 | 361 | } DXVA_PicParams_HEVC, *LPDXVA_PicParams_HEVC; | 
 
 
 
 
 | 362 |  | 
 
 
 
 
 | 363 | typedef struct _DXVA_Qmatrix_HEVC | 
 
 
 
 
 | 364 | { | 
 
 
 
 
 | 365 | UCHAR ucScalingLists0[6][16]; | 
 
 
 
 
 | 366 | UCHAR ucScalingLists1[6][64]; | 
 
 
 
 
 | 367 | UCHAR ucScalingLists2[6][64]; | 
 
 
 
 
 | 368 | UCHAR ucScalingLists3[2][64]; | 
 
 
 
 
 | 369 | UCHAR ucScalingListDCCoefSizeID2[6]; | 
 
 
 
 
 | 370 | UCHAR ucScalingListDCCoefSizeID3[2]; | 
 
 
 
 
 | 371 | } DXVA_Qmatrix_HEVC, *LPDXVA_Qmatrix_HEVC; | 
 
 
 
 
 | 372 |  | 
 
 
 
 
 | 373 | typedef struct _DXVA_Slice_HEVC_Short | 
 
 
 
 
 | 374 | { | 
 
 
 
 
 | 375 | UINT    BSNALunitDataLocation; | 
 
 
 
 
 | 376 | UINT    SliceBytesInBuffer; | 
 
 
 
 
 | 377 | USHORT  wBadSliceChopping; | 
 
 
 
 
 | 378 | } DXVA_Slice_HEVC_Short, *LPDXVA_Slice_HEVC_Short; | 
 
 
 
 
 | 379 |  | 
 
 
 
 
 | 380 | typedef struct _DXVA_PicEntry_VPx | 
 
 
 
 
 | 381 | { | 
 
 
 
 
 | 382 | union | 
 
 
 
 
 | 383 | { | 
 
 
 
 
 | 384 | struct | 
 
 
 
 
 | 385 | { | 
 
 
 
 
 | 386 | UCHAR Index7Bits     : 7; | 
 
 
 
 
 | 387 | UCHAR AssociatedFlag : 1; | 
 
 
 
 
 | 388 | }; | 
 
 
 
 
 | 389 | UCHAR bPicEntry; | 
 
 
 
 
 | 390 | }; | 
 
 
 
 
 | 391 | } DXVA_PicEntry_VPx, *LPDXVA_PicEntry_VPx; | 
 
 
 
 
 | 392 |  | 
 
 
 
 
 | 393 | typedef struct _segmentation_VP9 | 
 
 
 
 
 | 394 | { | 
 
 
 
 
 | 395 | union | 
 
 
 
 
 | 396 | { | 
 
 
 
 
 | 397 | struct | 
 
 
 
 
 | 398 | { | 
 
 
 
 
 | 399 | UCHAR enabled                   : 1; | 
 
 
 
 
 | 400 | UCHAR update_map                : 1; | 
 
 
 
 
 | 401 | UCHAR temporal_update           : 1; | 
 
 
 
 
 | 402 | UCHAR abs_delta                 : 1; | 
 
 
 
 
 | 403 | UCHAR ReservedSegmentFlags4Bits : 4; | 
 
 
 
 
 | 404 | }; | 
 
 
 
 
 | 405 | UCHAR wSegmentInfoFlags; | 
 
 
 
 
 | 406 | }; | 
 
 
 
 
 | 407 | UCHAR tree_probs[7]; | 
 
 
 
 
 | 408 | UCHAR pred_probs[3]; | 
 
 
 
 
 | 409 | SHORT feature_data[8][4]; | 
 
 
 
 
 | 410 | UCHAR feature_mask[8]; | 
 
 
 
 
 | 411 | } DXVA_segmentation_VP9; | 
 
 
 
 
 | 412 |  | 
 
 
 
 
 | 413 | typedef struct _DXVA_PicParams_VP9 | 
 
 
 
 
 | 414 | { | 
 
 
 
 
 | 415 | DXVA_PicEntry_VPx    CurrPic; | 
 
 
 
 
 | 416 | UCHAR                profile; | 
 
 
 
 
 | 417 | union | 
 
 
 
 
 | 418 | { | 
 
 
 
 
 | 419 | struct | 
 
 
 
 
 | 420 | { | 
 
 
 
 
 | 421 | USHORT frame_type                   : 1; | 
 
 
 
 
 | 422 | USHORT show_frame                   : 1; | 
 
 
 
 
 | 423 | USHORT error_resilient_mode         : 1; | 
 
 
 
 
 | 424 | USHORT subsampling_x                : 1; | 
 
 
 
 
 | 425 | USHORT subsampling_y                : 1; | 
 
 
 
 
 | 426 | USHORT extra_plane                  : 1; | 
 
 
 
 
 | 427 | USHORT refresh_frame_context        : 1; | 
 
 
 
 
 | 428 | USHORT frame_parallel_decoding_mode : 1; | 
 
 
 
 
 | 429 | USHORT intra_only                   : 1; | 
 
 
 
 
 | 430 | USHORT frame_context_idx            : 2; | 
 
 
 
 
 | 431 | USHORT reset_frame_context          : 2; | 
 
 
 
 
 | 432 | USHORT allow_high_precision_mv      : 1; | 
 
 
 
 
 | 433 | USHORT ReservedFormatInfo2Bits      : 2; | 
 
 
 
 
 | 434 | }; | 
 
 
 
 
 | 435 | USHORT wFormatAndPictureInfoFlags; | 
 
 
 
 
 | 436 | }; | 
 
 
 
 
 | 437 | UINT  width; | 
 
 
 
 
 | 438 | UINT  height; | 
 
 
 
 
 | 439 | UCHAR BitDepthMinus8Luma; | 
 
 
 
 
 | 440 | UCHAR BitDepthMinus8Chroma; | 
 
 
 
 
 | 441 | UCHAR interp_filter; | 
 
 
 
 
 | 442 | UCHAR Reserved8Bits; | 
 
 
 
 
 | 443 | DXVA_PicEntry_VPx  ref_frame_map[8]; | 
 
 
 
 
 | 444 | UINT  ref_frame_coded_width[8]; | 
 
 
 
 
 | 445 | UINT  ref_frame_coded_height[8]; | 
 
 
 
 
 | 446 | DXVA_PicEntry_VPx  frame_refs[3]; | 
 
 
 
 
 | 447 | CHAR  ref_frame_sign_bias[4]; | 
 
 
 
 
 | 448 | CHAR  filter_level; | 
 
 
 
 
 | 449 | CHAR  sharpness_level; | 
 
 
 
 
 | 450 | union | 
 
 
 
 
 | 451 | { | 
 
 
 
 
 | 452 | struct | 
 
 
 
 
 | 453 | { | 
 
 
 
 
 | 454 | UCHAR mode_ref_delta_enabled   : 1; | 
 
 
 
 
 | 455 | UCHAR mode_ref_delta_update    : 1; | 
 
 
 
 
 | 456 | UCHAR use_prev_in_find_mv_refs : 1; | 
 
 
 
 
 | 457 | UCHAR ReservedControlInfo5Bits : 5; | 
 
 
 
 
 | 458 | }; | 
 
 
 
 
 | 459 | UCHAR wControlInfoFlags; | 
 
 
 
 
 | 460 | }; | 
 
 
 
 
 | 461 | CHAR   ref_deltas[4]; | 
 
 
 
 
 | 462 | CHAR   mode_deltas[2]; | 
 
 
 
 
 | 463 | SHORT  base_qindex; | 
 
 
 
 
 | 464 | CHAR   y_dc_delta_q; | 
 
 
 
 
 | 465 | CHAR   uv_dc_delta_q; | 
 
 
 
 
 | 466 | CHAR   uv_ac_delta_q; | 
 
 
 
 
 | 467 | DXVA_segmentation_VP9 stVP9Segments; | 
 
 
 
 
 | 468 | UCHAR  log2_tile_cols; | 
 
 
 
 
 | 469 | UCHAR  log2_tile_rows; | 
 
 
 
 
 | 470 | USHORT uncompressed_header_size_byte_aligned; | 
 
 
 
 
 | 471 | USHORT first_partition_size; | 
 
 
 
 
 | 472 | USHORT Reserved16Bits; | 
 
 
 
 
 | 473 | UINT   Reserved32Bits; | 
 
 
 
 
 | 474 | UINT   StatusReportFeedbackNumber; | 
 
 
 
 
 | 475 | } DXVA_PicParams_VP9, *LPDXVA_PicParams_VP9; | 
 
 
 
 
 | 476 |  | 
 
 
 
 
 | 477 | typedef struct _segmentation_VP8 | 
 
 
 
 
 | 478 | { | 
 
 
 
 
 | 479 | union | 
 
 
 
 
 | 480 | { | 
 
 
 
 
 | 481 | struct | 
 
 
 
 
 | 482 | { | 
 
 
 
 
 | 483 | UCHAR segmentation_enabled        : 1; | 
 
 
 
 
 | 484 | UCHAR update_mb_segmentation_map  : 1; | 
 
 
 
 
 | 485 | UCHAR update_mb_segmentation_data : 1; | 
 
 
 
 
 | 486 | UCHAR mb_segement_abs_delta       : 1; | 
 
 
 
 
 | 487 | UCHAR ReservedSegmentFlags4Bits   : 4; | 
 
 
 
 
 | 488 | }; | 
 
 
 
 
 | 489 | UCHAR wSegmentFlags; | 
 
 
 
 
 | 490 | }; | 
 
 
 
 
 | 491 | CHAR  segment_feature_data[2][4]; | 
 
 
 
 
 | 492 | UCHAR mb_segment_tree_probs[3]; | 
 
 
 
 
 | 493 | } DXVA_segmentation_VP8; | 
 
 
 
 
 | 494 |  | 
 
 
 
 
 | 495 | typedef struct _DXVA_PicParams_VP8 | 
 
 
 
 
 | 496 | { | 
 
 
 
 
 | 497 | UINT first_part_size; | 
 
 
 
 
 | 498 | UINT width; | 
 
 
 
 
 | 499 | UINT height; | 
 
 
 
 
 | 500 | DXVA_PicEntry_VPx  CurrPic; | 
 
 
 
 
 | 501 | union | 
 
 
 
 
 | 502 | { | 
 
 
 
 
 | 503 | struct | 
 
 
 
 
 | 504 | { | 
 
 
 
 
 | 505 | UCHAR frame_type            : 1; | 
 
 
 
 
 | 506 | UCHAR version               : 3; | 
 
 
 
 
 | 507 | UCHAR show_frame            : 1; | 
 
 
 
 
 | 508 | UCHAR clamp_type            : 1; | 
 
 
 
 
 | 509 | UCHAR ReservedFrameTag3Bits : 2; | 
 
 
 
 
 | 510 | }; | 
 
 
 
 
 | 511 | UCHAR wFrameTagFlags; | 
 
 
 
 
 | 512 | }; | 
 
 
 
 
 | 513 | DXVA_segmentation_VP8  stVP8Segments; | 
 
 
 
 
 | 514 | UCHAR  filter_type; | 
 
 
 
 
 | 515 | UCHAR  filter_level; | 
 
 
 
 
 | 516 | UCHAR  sharpness_level; | 
 
 
 
 
 | 517 | UCHAR  mode_ref_lf_delta_enabled; | 
 
 
 
 
 | 518 | UCHAR  mode_ref_lf_delta_update; | 
 
 
 
 
 | 519 | CHAR   ref_lf_deltas[4]; | 
 
 
 
 
 | 520 | CHAR   mode_lf_deltas[4]; | 
 
 
 
 
 | 521 | UCHAR  log2_nbr_of_dct_partitions; | 
 
 
 
 
 | 522 | UCHAR  base_qindex; | 
 
 
 
 
 | 523 | CHAR   y1dc_delta_q; | 
 
 
 
 
 | 524 | CHAR   y2dc_delta_q; | 
 
 
 
 
 | 525 | CHAR   y2ac_delta_q; | 
 
 
 
 
 | 526 | CHAR   uvdc_delta_q; | 
 
 
 
 
 | 527 | CHAR   uvac_delta_q; | 
 
 
 
 
 | 528 | DXVA_PicEntry_VPx alt_fb_idx; | 
 
 
 
 
 | 529 | DXVA_PicEntry_VPx gld_fb_idx; | 
 
 
 
 
 | 530 | DXVA_PicEntry_VPx lst_fb_idx; | 
 
 
 
 
 | 531 | UCHAR  ref_frame_sign_bias_golden; | 
 
 
 
 
 | 532 | UCHAR  ref_frame_sign_bias_altref; | 
 
 
 
 
 | 533 | UCHAR  refresh_entropy_probs; | 
 
 
 
 
 | 534 | UCHAR  vp8_coef_update_probs[4][8][3][11]; | 
 
 
 
 
 | 535 | UCHAR  mb_no_coeff_skip; | 
 
 
 
 
 | 536 | UCHAR  prob_skip_false; | 
 
 
 
 
 | 537 | UCHAR  prob_intra; | 
 
 
 
 
 | 538 | UCHAR  prob_last; | 
 
 
 
 
 | 539 | UCHAR  prob_golden; | 
 
 
 
 
 | 540 | UCHAR  intra_16x16_prob[4]; | 
 
 
 
 
 | 541 | UCHAR  intra_chroma_prob[3]; | 
 
 
 
 
 | 542 | UCHAR  vp8_mv_update_probs[2][19]; | 
 
 
 
 
 | 543 | USHORT ReservedBits1; | 
 
 
 
 
 | 544 | USHORT ReservedBits2; | 
 
 
 
 
 | 545 | USHORT ReservedBits3; | 
 
 
 
 
 | 546 | UINT   StatusReportFeedbackNumber; | 
 
 
 
 
 | 547 | } DXVA_PicParams_VP8, *LPDXVA_PicParams_VP8; | 
 
 
 
 
 | 548 |  | 
 
 
 
 
 | 549 | typedef struct _DXVA_Slice_VPx_Short | 
 
 
 
 
 | 550 | { | 
 
 
 
 
 | 551 | UINT   BSNALunitDataLocation; | 
 
 
 
 
 | 552 | UINT   SliceBytesInBuffer; | 
 
 
 
 
 | 553 | USHORT wBadSliceChopping; | 
 
 
 
 
 | 554 | } DXVA_Slice_VPx_Short, *LPDXVA_Slice_VPx_Short; | 
 
 
 
 
 | 555 |  | 
 
 
 
 
 | 556 | typedef struct _DXVA_Status_VPx | 
 
 
 
 
 | 557 | { | 
 
 
 
 
 | 558 | UINT   StatusReportFeedbackNumber; | 
 
 
 
 
 | 559 | DXVA_PicEntry_VPx CurrPic; | 
 
 
 
 
 | 560 | UCHAR  bBufType; | 
 
 
 
 
 | 561 | UCHAR  bStatus; | 
 
 
 
 
 | 562 | UCHAR  bReserved8Bits; | 
 
 
 
 
 | 563 | USHORT wNumMbsAffected; | 
 
 
 
 
 | 564 | } DXVA_Status_VPx, *LPDXVA_Status_VPx; | 
 
 
 
 
 | 565 |  | 
 
 
 
 
 | 566 |  | 
 
 
 
 
 | 567 | #define _DIRECTX_AV1_VA_ | 
 
 
 
 
 | 568 |  | 
 
 
 
 
 | 569 | /* AV1 decoder GUIDs */ | 
 
 
 
 
 | 570 | DEFINE_GUID(DXVA_ModeAV1_VLD_Profile0,           0xb8be4ccb, 0xcf53, 0x46ba, 0x8d, 0x59, 0xd6, 0xb8, 0xa6, 0xda, 0x5d, 0x2a); | 
 
 
 
 
 | 571 | DEFINE_GUID(DXVA_ModeAV1_VLD_Profile1,           0x6936ff0f, 0x45b1, 0x4163, 0x9c, 0xc1, 0x64, 0x6e, 0xf6, 0x94, 0x61, 0x08); | 
 
 
 
 
 | 572 | DEFINE_GUID(DXVA_ModeAV1_VLD_Profile2,           0x0c5f2aa1, 0xe541, 0x4089, 0xbb, 0x7b, 0x98, 0x11, 0x0a, 0x19, 0xd7, 0xc8); | 
 
 
 
 
 | 573 | DEFINE_GUID(DXVA_ModeAV1_VLD_12bit_Profile2,     0x17127009, 0xa00f, 0x4ce1, 0x99, 0x4e, 0xbf, 0x40, 0x81, 0xf6, 0xf3, 0xf0); | 
 
 
 
 
 | 574 | DEFINE_GUID(DXVA_ModeAV1_VLD_12bit_Profile2_420, 0x2d80bed6, 0x9cac, 0x4835, 0x9e, 0x91, 0x32, 0x7b, 0xbc, 0x4f, 0x9e, 0xe8); | 
 
 
 
 
 | 575 |  | 
 
 
 
 
 | 576 | /* AV1 picture entry data structure */ | 
 
 
 
 
 | 577 | typedef struct _DXVA_PicEntry_AV1 { | 
 
 
 
 
 | 578 | UINT width; | 
 
 
 
 
 | 579 | UINT height; | 
 
 
 
 
 | 580 |  | 
 
 
 
 
 | 581 | INT wmmat[6]; | 
 
 
 
 
 | 582 | __C89_NAMELESS union { | 
 
 
 
 
 | 583 | __C89_NAMELESS struct { | 
 
 
 
 
 | 584 | UCHAR wminvalid : 1; | 
 
 
 
 
 | 585 | UCHAR wmtype : 2; | 
 
 
 
 
 | 586 | UCHAR Reserved : 5; | 
 
 
 
 
 | 587 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 588 | UCHAR GlobalMotionFlags; | 
 
 
 
 
 | 589 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 590 | UCHAR Index; | 
 
 
 
 
 | 591 | UINT16 Reserved16Bits; | 
 
 
 
 
 | 592 | } DXVA_PicEntry_AV1, *LPDXVA_PicEntry_AV1; | 
 
 
 
 
 | 593 |  | 
 
 
 
 
 | 594 | /* AV1 picture parameters data structure */ | 
 
 
 
 
 | 595 | typedef struct _DXVA_PicParams_AV1 { | 
 
 
 
 
 | 596 | UINT width; | 
 
 
 
 
 | 597 | UINT height; | 
 
 
 
 
 | 598 |  | 
 
 
 
 
 | 599 | UINT max_width; | 
 
 
 
 
 | 600 | UINT max_height; | 
 
 
 
 
 | 601 |  | 
 
 
 
 
 | 602 | UCHAR CurrPicTextureIndex; | 
 
 
 
 
 | 603 | UCHAR superres_denom; | 
 
 
 
 
 | 604 | UCHAR bitdepth; | 
 
 
 
 
 | 605 | UCHAR seq_profile; | 
 
 
 
 
 | 606 |  | 
 
 
 
 
 | 607 | struct { | 
 
 
 
 
 | 608 | UCHAR cols; | 
 
 
 
 
 | 609 | UCHAR rows; | 
 
 
 
 
 | 610 | USHORT context_update_id; | 
 
 
 
 
 | 611 | USHORT widths[64]; | 
 
 
 
 
 | 612 | USHORT heights[64]; | 
 
 
 
 
 | 613 | } tiles; | 
 
 
 
 
 | 614 |  | 
 
 
 
 
 | 615 | union { | 
 
 
 
 
 | 616 | __C89_NAMELESS struct { | 
 
 
 
 
 | 617 | UINT use_128x128_superblock : 1; | 
 
 
 
 
 | 618 | UINT intra_edge_filter : 1; | 
 
 
 
 
 | 619 | UINT interintra_compound : 1; | 
 
 
 
 
 | 620 | UINT masked_compound : 1; | 
 
 
 
 
 | 621 | UINT warped_motion : 1; | 
 
 
 
 
 | 622 | UINT dual_filter : 1; | 
 
 
 
 
 | 623 | UINT jnt_comp : 1; | 
 
 
 
 
 | 624 | UINT screen_content_tools : 1; | 
 
 
 
 
 | 625 | UINT integer_mv : 1; | 
 
 
 
 
 | 626 | UINT cdef : 1; | 
 
 
 
 
 | 627 | UINT restoration : 1; | 
 
 
 
 
 | 628 | UINT film_grain : 1; | 
 
 
 
 
 | 629 | UINT intrabc : 1; | 
 
 
 
 
 | 630 | UINT high_precision_mv : 1; | 
 
 
 
 
 | 631 | UINT switchable_motion_mode : 1; | 
 
 
 
 
 | 632 | UINT filter_intra : 1; | 
 
 
 
 
 | 633 | UINT disable_frame_end_update_cdf : 1; | 
 
 
 
 
 | 634 | UINT disable_cdf_update : 1; | 
 
 
 
 
 | 635 | UINT reference_mode : 1; | 
 
 
 
 
 | 636 | UINT skip_mode : 1; | 
 
 
 
 
 | 637 | UINT reduced_tx_set : 1; | 
 
 
 
 
 | 638 | UINT superres : 1; | 
 
 
 
 
 | 639 | UINT tx_mode : 2; | 
 
 
 
 
 | 640 | UINT use_ref_frame_mvs : 1; | 
 
 
 
 
 | 641 | UINT enable_ref_frame_mvs : 1; | 
 
 
 
 
 | 642 | UINT reference_frame_update : 1; | 
 
 
 
 
 | 643 | UINT Reserved : 5; | 
 
 
 
 
 | 644 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 645 | UINT32 CodingParamToolFlags; | 
 
 
 
 
 | 646 | } coding; | 
 
 
 
 
 | 647 |  | 
 
 
 
 
 | 648 | union { | 
 
 
 
 
 | 649 | __C89_NAMELESS struct { | 
 
 
 
 
 | 650 | UCHAR frame_type : 2; | 
 
 
 
 
 | 651 | UCHAR show_frame : 1; | 
 
 
 
 
 | 652 | UCHAR showable_frame : 1; | 
 
 
 
 
 | 653 | UCHAR subsampling_x : 1; | 
 
 
 
 
 | 654 | UCHAR subsampling_y : 1; | 
 
 
 
 
 | 655 | UCHAR mono_chrome : 1; | 
 
 
 
 
 | 656 | UCHAR Reserved : 1; | 
 
 
 
 
 | 657 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 658 | UCHAR FormatAndPictureInfoFlags; | 
 
 
 
 
 | 659 | } format; | 
 
 
 
 
 | 660 |  | 
 
 
 
 
 | 661 | UCHAR primary_ref_frame; | 
 
 
 
 
 | 662 | UCHAR order_hint; | 
 
 
 
 
 | 663 | UCHAR order_hint_bits; | 
 
 
 
 
 | 664 |  | 
 
 
 
 
 | 665 | DXVA_PicEntry_AV1 frame_refs[7]; | 
 
 
 
 
 | 666 | UCHAR RefFrameMapTextureIndex[8]; | 
 
 
 
 
 | 667 |  | 
 
 
 
 
 | 668 | struct { | 
 
 
 
 
 | 669 | UCHAR filter_level[2]; | 
 
 
 
 
 | 670 | UCHAR filter_level_u; | 
 
 
 
 
 | 671 | UCHAR filter_level_v; | 
 
 
 
 
 | 672 |  | 
 
 
 
 
 | 673 | UCHAR sharpness_level; | 
 
 
 
 
 | 674 | __C89_NAMELESS union { | 
 
 
 
 
 | 675 | __C89_NAMELESS struct { | 
 
 
 
 
 | 676 | UCHAR mode_ref_delta_enabled : 1; | 
 
 
 
 
 | 677 | UCHAR mode_ref_delta_update : 1; | 
 
 
 
 
 | 678 | UCHAR delta_lf_multi : 1; | 
 
 
 
 
 | 679 | UCHAR delta_lf_present : 1; | 
 
 
 
 
 | 680 | UCHAR Reserved : 4; | 
 
 
 
 
 | 681 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 682 | UCHAR ControlFlags; | 
 
 
 
 
 | 683 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 684 | CHAR ref_deltas[8]; | 
 
 
 
 
 | 685 | CHAR mode_deltas[2]; | 
 
 
 
 
 | 686 | UCHAR delta_lf_res; | 
 
 
 
 
 | 687 | UCHAR frame_restoration_type[3]; | 
 
 
 
 
 | 688 | USHORT log2_restoration_unit_size[3]; | 
 
 
 
 
 | 689 | UINT16 Reserved16Bits; | 
 
 
 
 
 | 690 | } loop_filter; | 
 
 
 
 
 | 691 |  | 
 
 
 
 
 | 692 | struct { | 
 
 
 
 
 | 693 | __C89_NAMELESS union { | 
 
 
 
 
 | 694 | __C89_NAMELESS struct { | 
 
 
 
 
 | 695 | UCHAR delta_q_present : 1; | 
 
 
 
 
 | 696 | UCHAR delta_q_res : 2; | 
 
 
 
 
 | 697 | UCHAR Reserved : 5; | 
 
 
 
 
 | 698 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 699 | UCHAR ControlFlags; | 
 
 
 
 
 | 700 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 701 |  | 
 
 
 
 
 | 702 | UCHAR base_qindex; | 
 
 
 
 
 | 703 | CHAR y_dc_delta_q; | 
 
 
 
 
 | 704 | CHAR u_dc_delta_q; | 
 
 
 
 
 | 705 | CHAR v_dc_delta_q; | 
 
 
 
 
 | 706 | CHAR u_ac_delta_q; | 
 
 
 
 
 | 707 | CHAR v_ac_delta_q; | 
 
 
 
 
 | 708 | UCHAR qm_y; | 
 
 
 
 
 | 709 | UCHAR qm_u; | 
 
 
 
 
 | 710 | UCHAR qm_v; | 
 
 
 
 
 | 711 | UINT16 Reserved16Bits; | 
 
 
 
 
 | 712 | } quantization; | 
 
 
 
 
 | 713 |  | 
 
 
 
 
 | 714 | struct { | 
 
 
 
 
 | 715 | __C89_NAMELESS union { | 
 
 
 
 
 | 716 | __C89_NAMELESS struct { | 
 
 
 
 
 | 717 | UCHAR damping : 2; | 
 
 
 
 
 | 718 | UCHAR bits : 2; | 
 
 
 
 
 | 719 | UCHAR Reserved : 4; | 
 
 
 
 
 | 720 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 721 | UCHAR ControlFlags; | 
 
 
 
 
 | 722 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 723 |  | 
 
 
 
 
 | 724 | union { | 
 
 
 
 
 | 725 | __C89_NAMELESS struct { | 
 
 
 
 
 | 726 | UCHAR primary : 6; | 
 
 
 
 
 | 727 | UCHAR secondary : 2; | 
 
 
 
 
 | 728 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 729 | UCHAR combined; | 
 
 
 
 
 | 730 | } y_strengths[8]; | 
 
 
 
 
 | 731 |  | 
 
 
 
 
 | 732 | union { | 
 
 
 
 
 | 733 | __C89_NAMELESS struct { | 
 
 
 
 
 | 734 | UCHAR primary : 6; | 
 
 
 
 
 | 735 | UCHAR secondary : 2; | 
 
 
 
 
 | 736 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 737 | UCHAR combined; | 
 
 
 
 
 | 738 | } uv_strengths[8]; | 
 
 
 
 
 | 739 |  | 
 
 
 
 
 | 740 | } cdef; | 
 
 
 
 
 | 741 |  | 
 
 
 
 
 | 742 | UCHAR interp_filter; | 
 
 
 
 
 | 743 |  | 
 
 
 
 
 | 744 | struct { | 
 
 
 
 
 | 745 | __C89_NAMELESS union { | 
 
 
 
 
 | 746 | __C89_NAMELESS struct { | 
 
 
 
 
 | 747 | UCHAR enabled : 1; | 
 
 
 
 
 | 748 | UCHAR update_map : 1; | 
 
 
 
 
 | 749 | UCHAR update_data : 1; | 
 
 
 
 
 | 750 | UCHAR temporal_update : 1; | 
 
 
 
 
 | 751 | UCHAR Reserved : 4; | 
 
 
 
 
 | 752 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 753 | UCHAR ControlFlags; | 
 
 
 
 
 | 754 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 755 | UCHAR Reserved24Bits[3]; | 
 
 
 
 
 | 756 |  | 
 
 
 
 
 | 757 | union { | 
 
 
 
 
 | 758 | __C89_NAMELESS struct { | 
 
 
 
 
 | 759 | UCHAR alt_q : 1; | 
 
 
 
 
 | 760 | UCHAR alt_lf_y_v : 1; | 
 
 
 
 
 | 761 | UCHAR alt_lf_y_h : 1; | 
 
 
 
 
 | 762 | UCHAR alt_lf_u : 1; | 
 
 
 
 
 | 763 | UCHAR alt_lf_v : 1; | 
 
 
 
 
 | 764 | UCHAR ref_frame : 1; | 
 
 
 
 
 | 765 | UCHAR skip : 1; | 
 
 
 
 
 | 766 | UCHAR globalmv : 1; | 
 
 
 
 
 | 767 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 768 | UCHAR mask; | 
 
 
 
 
 | 769 | } feature_mask[8]; | 
 
 
 
 
 | 770 |  | 
 
 
 
 
 | 771 | SHORT feature_data[8][8]; | 
 
 
 
 
 | 772 |  | 
 
 
 
 
 | 773 | } segmentation; | 
 
 
 
 
 | 774 |  | 
 
 
 
 
 | 775 | struct { | 
 
 
 
 
 | 776 | __C89_NAMELESS union { | 
 
 
 
 
 | 777 | __C89_NAMELESS struct { | 
 
 
 
 
 | 778 | USHORT apply_grain : 1; | 
 
 
 
 
 | 779 | USHORT scaling_shift_minus8 : 2; | 
 
 
 
 
 | 780 | USHORT chroma_scaling_from_luma : 1; | 
 
 
 
 
 | 781 | USHORT ar_coeff_lag : 2; | 
 
 
 
 
 | 782 | USHORT ar_coeff_shift_minus6 : 2; | 
 
 
 
 
 | 783 | USHORT grain_scale_shift : 2; | 
 
 
 
 
 | 784 | USHORT overlap_flag : 1; | 
 
 
 
 
 | 785 | USHORT clip_to_restricted_range : 1; | 
 
 
 
 
 | 786 | USHORT matrix_coeff_is_identity : 1; | 
 
 
 
 
 | 787 | USHORT Reserved : 3; | 
 
 
 
 
 | 788 | } __C89_NAMELESSSTRUCTNAME; | 
 
 
 
 
 | 789 | USHORT ControlFlags; | 
 
 
 
 
 | 790 | } __C89_NAMELESSUNIONNAME; | 
 
 
 
 
 | 791 |  | 
 
 
 
 
 | 792 | USHORT grain_seed; | 
 
 
 
 
 | 793 | UCHAR scaling_points_y[14][2]; | 
 
 
 
 
 | 794 | UCHAR num_y_points; | 
 
 
 
 
 | 795 | UCHAR scaling_points_cb[10][2]; | 
 
 
 
 
 | 796 | UCHAR num_cb_points; | 
 
 
 
 
 | 797 | UCHAR scaling_points_cr[10][2]; | 
 
 
 
 
 | 798 | UCHAR num_cr_points; | 
 
 
 
 
 | 799 | UCHAR ar_coeffs_y[24]; | 
 
 
 
 
 | 800 | UCHAR ar_coeffs_cb[25]; | 
 
 
 
 
 | 801 | UCHAR ar_coeffs_cr[25]; | 
 
 
 
 
 | 802 | UCHAR cb_mult; | 
 
 
 
 
 | 803 | UCHAR cb_luma_mult; | 
 
 
 
 
 | 804 | UCHAR cr_mult; | 
 
 
 
 
 | 805 | UCHAR cr_luma_mult; | 
 
 
 
 
 | 806 | UCHAR Reserved8Bits; | 
 
 
 
 
 | 807 | SHORT cb_offset; | 
 
 
 
 
 | 808 | SHORT cr_offset; | 
 
 
 
 
 | 809 | } film_grain; | 
 
 
 
 
 | 810 |  | 
 
 
 
 
 | 811 | UINT   Reserved32Bits; | 
 
 
 
 
 | 812 | UINT   StatusReportFeedbackNumber; | 
 
 
 
 
 | 813 | } DXVA_PicParams_AV1, *LPDXVA_PicParams_AV1; | 
 
 
 
 
 | 814 |  | 
 
 
 
 
 | 815 | /* AV1 tile data structure */ | 
 
 
 
 
 | 816 | typedef struct _DXVA_Tile_AV1 { | 
 
 
 
 
 | 817 | UINT   DataOffset; | 
 
 
 
 
 | 818 | UINT   DataSize; | 
 
 
 
 
 | 819 | USHORT row; | 
 
 
 
 
 | 820 | USHORT column; | 
 
 
 
 
 | 821 | UINT16 Reserved16Bits; | 
 
 
 
 
 | 822 | UCHAR  anchor_frame; | 
 
 
 
 
 | 823 | UCHAR  Reserved8Bits; | 
 
 
 
 
 | 824 | } DXVA_Tile_AV1, *LPDXVA_Tile_AV1; | 
 
 
 
 
 | 825 |  | 
 
 
 
 
 | 826 | typedef struct _DXVA_Status_AV1 { | 
 
 
 
 
 | 827 | UINT  StatusReportFeedbackNumber; | 
 
 
 
 
 | 828 | DXVA_PicEntry_AV1 CurrPic; | 
 
 
 
 
 | 829 | UCHAR  BufType; | 
 
 
 
 
 | 830 | UCHAR  Status; | 
 
 
 
 
 | 831 | UCHAR  Reserved8Bits; | 
 
 
 
 
 | 832 | USHORT NumMbsAffected; | 
 
 
 
 
 | 833 | } DXVA_Status_AV1, *LPDXVA_Status_AV1; | 
 
 
 
 
 | 834 |  | 
 
 
 
 
 | 835 | #include <poppack.h> | 
 
 
 
 
 | 836 |  | 
 
 
 
 
 | 837 | typedef enum _DXVA_VideoChromaSubsampling | 
 
 
 
 
 | 838 | { | 
 
 
 
 
 | 839 | DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes  = 0x1, | 
 
 
 
 
 | 840 | DXVA_VideoChromaSubsampling_Vertically_Cosited              = 0x2, | 
 
 
 
 
 | 841 | DXVA_VideoChromaSubsampling_Horizontally_Cosited            = 0x4, | 
 
 
 
 
 | 842 | DXVA_VideoChromaSubsampling_ProgressiveChroma               = 0x8, | 
 
 
 
 
 | 843 |  | 
 
 
 
 
 | 844 | DXVA_VideoChromaSubsampling_Unknown = 0, | 
 
 
 
 
 | 845 | DXVA_VideoChromaSubsampling_Cosited = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes | 
 
 
 
 
 | 846 | | DXVA_VideoChromaSubsampling_Vertically_Cosited | 
 
 
 
 
 | 847 | | DXVA_VideoChromaSubsampling_Horizontally_Cosited, | 
 
 
 
 
 | 848 | DXVA_VideoChromaSubsampling_DV_PAL = DXVA_VideoChromaSubsampling_Vertically_Cosited | 
 
 
 
 
 | 849 | | DXVA_VideoChromaSubsampling_Horizontally_Cosited, | 
 
 
 
 
 | 850 | DXVA_VideoChromaSubsampling_MPEG1 = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes, | 
 
 
 
 
 | 851 | DXVA_VideoChromaSubsampling_MPEG2 = DXVA_VideoChromaSubsampling_Vertically_AlignedChromaPlanes | 
 
 
 
 
 | 852 | | DXVA_VideoChromaSubsampling_Horizontally_Cosited, | 
 
 
 
 
 | 853 | } DXVA_VideoChromaSubsampling; | 
 
 
 
 
 | 854 |  | 
 
 
 
 
 | 855 | typedef enum _DXVA_NominalRange | 
 
 
 
 
 | 856 | { | 
 
 
 
 
 | 857 | DXVA_NominalRange_Unknown = 0, | 
 
 
 
 
 | 858 | DXVA_NominalRange_0_255 = 1, | 
 
 
 
 
 | 859 | DXVA_NominalRange_16_235 = 2, | 
 
 
 
 
 | 860 | DXVA_NominalRange_48_208 = 3, | 
 
 
 
 
 | 861 | DXVA_NominalRange_Normal = DXVA_NominalRange_0_255, | 
 
 
 
 
 | 862 | DXVA_NominalRange_Wide = DXVA_NominalRange_16_235, | 
 
 
 
 
 | 863 | } DXVA_NominalRange; | 
 
 
 
 
 | 864 |  | 
 
 
 
 
 | 865 | typedef enum _DXVA_VideoTransferMatrix | 
 
 
 
 
 | 866 | { | 
 
 
 
 
 | 867 | DXVA_VideoTransferMatrix_Unknown = 0, | 
 
 
 
 
 | 868 | DXVA_VideoTransferMatrix_BT709 = 1, | 
 
 
 
 
 | 869 | DXVA_VideoTransferMatrix_BT601 = 2, | 
 
 
 
 
 | 870 | DXVA_VideoTransferMatrix_SMPTE240M = 3, | 
 
 
 
 
 | 871 | } DXVA_VideoTransferMatrix; | 
 
 
 
 
 | 872 |  | 
 
 
 
 
 | 873 | typedef enum _DXVA_VideoLighting | 
 
 
 
 
 | 874 | { | 
 
 
 
 
 | 875 | DXVA_VideoLighting_Unknown = 0, | 
 
 
 
 
 | 876 | DXVA_VideoLighting_bright = 1, | 
 
 
 
 
 | 877 | DXVA_VideoLighting_office = 2, | 
 
 
 
 
 | 878 | DXVA_VideoLighting_dim = 3, | 
 
 
 
 
 | 879 | DXVA_VideoLighting_dark = 4, | 
 
 
 
 
 | 880 | } DXVA_VideoLighting; | 
 
 
 
 
 | 881 |  | 
 
 
 
 
 | 882 | typedef enum _DXVA_VideoPrimaries | 
 
 
 
 
 | 883 | { | 
 
 
 
 
 | 884 | DXVA_VideoPrimaries_Unknown = 0, | 
 
 
 
 
 | 885 | DXVA_VideoPrimaries_reserved = 1, | 
 
 
 
 
 | 886 | DXVA_VideoPrimaries_BT709 = 2, | 
 
 
 
 
 | 887 | DXVA_VideoPrimaries_BT470_2_SysM = 3, | 
 
 
 
 
 | 888 | DXVA_VideoPrimaries_BT470_2_SysBG = 4, | 
 
 
 
 
 | 889 | DXVA_VideoPrimaries_SMPTE170M = 5, | 
 
 
 
 
 | 890 | DXVA_VideoPrimaries_SMPTE420M = 6, | 
 
 
 
 
 | 891 | DXVA_VideoPrimaries_EBU3213 = 7, | 
 
 
 
 
 | 892 | DXVA_VideoPrimaries_SMPTE_C = 8, | 
 
 
 
 
 | 893 | } DXVA_VideoPrimaries; | 
 
 
 
 
 | 894 |  | 
 
 
 
 
 | 895 | typedef enum _DXVA_VideoTransferFunction | 
 
 
 
 
 | 896 | { | 
 
 
 
 
 | 897 | DXVA_VideoTransFunc_Unknown = 0, | 
 
 
 
 
 | 898 | DXVA_VideoTransFunc_10 = 1, | 
 
 
 
 
 | 899 | DXVA_VideoTransFunc_18 = 2, | 
 
 
 
 
 | 900 | DXVA_VideoTransFunc_20 = 3, | 
 
 
 
 
 | 901 | DXVA_VideoTransFunc_22 = 4, | 
 
 
 
 
 | 902 | DXVA_VideoTransFunc_22_709 = 5, | 
 
 
 
 
 | 903 | DXVA_VideoTransFunc_22_240M = 6, | 
 
 
 
 
 | 904 | DXVA_VideoTransFunc_22_8bit_sRGB = 7, | 
 
 
 
 
 | 905 | DXVA_VideoTransFunc_28 = 8, | 
 
 
 
 
 | 906 | } DXVA_VideoTransferFunction; | 
 
 
 
 
 | 907 |  | 
 
 
 
 
 | 908 | typedef struct _DXVA_ExtendedFormat | 
 
 
 
 
 | 909 | { | 
 
 
 
 
 | 910 | UINT SampleFormat : 8; | 
 
 
 
 
 | 911 | UINT VideoChromaSubsampling : 4; | 
 
 
 
 
 | 912 | DXVA_NominalRange NominalRange : 3; | 
 
 
 
 
 | 913 | DXVA_VideoTransferMatrix VideoTransferMatrix : 3; | 
 
 
 
 
 | 914 | DXVA_VideoLighting VideoLighting : 4; | 
 
 
 
 
 | 915 | DXVA_VideoPrimaries VideoPrimaries : 5; | 
 
 
 
 
 | 916 | DXVA_VideoTransferFunction VideoTransferFunction : 5; | 
 
 
 
 
 | 917 | } DXVA_ExtendedFormat; | 
 
 
 
 
 | 918 |  | 
 
 
 
 
 | 919 | #ifdef __cplusplus | 
 
 
 
 
 | 920 | } | 
 
 
 
 
 | 921 | #endif | 
 
 
 
 
 | 922 |  | 
 
 
 
 
 | 923 | #endif /* __WINE_DXVA_H */ |