dxva.h 29 KB

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