[vlc-commits] contrib: wine-headers: bring back HEVC/VPx in dxva.h

Steve Lhomme git at videolan.org
Tue Mar 10 10:59:00 CET 2020


vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Tue Mar 10 10:50:15 2020 +0100| [754002efdb7c972bbf9675c6d0cb722f8c3faf2e] | committer: Steve Lhomme

contrib: wine-headers: bring back HEVC/VPx in dxva.h

Wine currently doesn't have support for these.

Regression from:
Revision: 17cfa33e208f4ca504aad827365ec2820998c87d
Author: Steve Lhomme <robux4 at ycbcr.xyz>
Date: 2020-03-01 12:57:53
Message:
contrib: wine-headers: install dxva.h headers from wine

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=754002efdb7c972bbf9675c6d0cb722f8c3faf2e
---

 ...de-add-HEVC-and-VP8-VP9-support-to-dxva.h.patch | 332 +++++++++++++++++++++
 contrib/src/wine-headers/rules.mak                 |   1 +
 2 files changed, 333 insertions(+)

diff --git a/contrib/src/wine-headers/0001-include-add-HEVC-and-VP8-VP9-support-to-dxva.h.patch b/contrib/src/wine-headers/0001-include-add-HEVC-and-VP8-VP9-support-to-dxva.h.patch
new file mode 100644
index 0000000000..0ec4e5d2bb
--- /dev/null
+++ b/contrib/src/wine-headers/0001-include-add-HEVC-and-VP8-VP9-support-to-dxva.h.patch
@@ -0,0 +1,332 @@
+From 58c9d0911bbbcf788ef06af884ff0f8d38e7bb1c Mon Sep 17 00:00:00 2001
+From: Steve Lhomme <robux4 at gmail.com>
+Date: Tue, 10 Mar 2020 10:33:32 +0100
+Subject: [PATCH] include: add HEVC and VP8/VP9 support to dxva.h
+
+Copied from mingw64.
+---
+ include/dxva.h | 308 +++++++++++++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 308 insertions(+)
+
+diff --git a/include/dxva.h b/include/dxva.h
+index 1260d75b37..8c8bec62b6 100644
+--- a/include/dxva.h
++++ b/include/dxva.h
+@@ -206,6 +206,314 @@ typedef struct
+     USHORT wBadSliceChopping;
+ } DXVA_Slice_H264_Short;
+ 
++
++typedef struct {
++    union {
++        struct {
++            UCHAR Index7Bits : 7; 
++            UCHAR AssociatedFlag : 1; 
++        }; 
++        UCHAR bPicEntry; 
++    }; 
++} DXVA_PicEntry_HEVC, *LPDXVA_PicEntry_HEVC;
++
++/* HEVC Picture Parameter structure */
++typedef struct _DXVA_PicParams_HEVC {
++    USHORT      PicWidthInMinCbsY;
++    USHORT      PicHeightInMinCbsY;
++    union {
++        struct {
++            USHORT  chroma_format_idc                       : 2;
++            USHORT  separate_colour_plane_flag              : 1;
++            USHORT  bit_depth_luma_minus8                   : 3; 
++            USHORT  bit_depth_chroma_minus8                 : 3;
++            USHORT  log2_max_pic_order_cnt_lsb_minus4       : 4;
++            USHORT  NoPicReorderingFlag                     : 1;
++            USHORT  NoBiPredFlag                            : 1;
++            USHORT  ReservedBits1                            : 1;
++        };
++        USHORT wFormatAndSequenceInfoFlags;
++    };
++    DXVA_PicEntry_HEVC  CurrPic;
++    UCHAR   sps_max_dec_pic_buffering_minus1;
++    UCHAR   log2_min_luma_coding_block_size_minus3;
++    UCHAR   log2_diff_max_min_luma_coding_block_size;
++    UCHAR   log2_min_transform_block_size_minus2;
++    UCHAR   log2_diff_max_min_transform_block_size;
++    UCHAR   max_transform_hierarchy_depth_inter;
++    UCHAR   max_transform_hierarchy_depth_intra;
++    UCHAR   num_short_term_ref_pic_sets;
++    UCHAR   num_long_term_ref_pics_sps;
++    UCHAR   num_ref_idx_l0_default_active_minus1;
++    UCHAR   num_ref_idx_l1_default_active_minus1;
++    CHAR    init_qp_minus26;
++    UCHAR   ucNumDeltaPocsOfRefRpsIdx;
++    USHORT  wNumBitsForShortTermRPSInSlice;
++    USHORT  ReservedBits2;
++
++    union {
++        struct {
++            UINT32  scaling_list_enabled_flag                    : 1;
++            UINT32  amp_enabled_flag                            : 1;
++            UINT32  sample_adaptive_offset_enabled_flag         : 1;
++            UINT32  pcm_enabled_flag                            : 1;
++            UINT32  pcm_sample_bit_depth_luma_minus1            : 4;
++            UINT32  pcm_sample_bit_depth_chroma_minus1          : 4;
++            UINT32  log2_min_pcm_luma_coding_block_size_minus3  : 2;
++            UINT32  log2_diff_max_min_pcm_luma_coding_block_size : 2;
++            UINT32  pcm_loop_filter_disabled_flag                : 1;
++            UINT32  long_term_ref_pics_present_flag             : 1;
++            UINT32  sps_temporal_mvp_enabled_flag               : 1;
++            UINT32  strong_intra_smoothing_enabled_flag         : 1;
++            UINT32  dependent_slice_segments_enabled_flag       : 1;
++            UINT32  output_flag_present_flag                    : 1;
++            UINT32  num_extra_slice_header_bits                 : 3;
++            UINT32  sign_data_hiding_enabled_flag               : 1;
++            UINT32  cabac_init_present_flag                     : 1;
++            UINT32  ReservedBits3                               : 5;
++        };
++        UINT32 dwCodingParamToolFlags;
++    };
++
++    union {
++        struct {
++            UINT32  constrained_intra_pred_flag                 : 1;
++            UINT32  transform_skip_enabled_flag                 : 1;
++            UINT32  cu_qp_delta_enabled_flag                    : 1;
++            UINT32  pps_slice_chroma_qp_offsets_present_flag    : 1;
++            UINT32  weighted_pred_flag                          : 1;
++            UINT32  weighted_bipred_flag                        : 1;
++            UINT32  transquant_bypass_enabled_flag              : 1;
++            UINT32  tiles_enabled_flag                          : 1;
++            UINT32  entropy_coding_sync_enabled_flag            : 1;
++            UINT32  uniform_spacing_flag                        : 1;
++            UINT32  loop_filter_across_tiles_enabled_flag       : 1;
++            UINT32  pps_loop_filter_across_slices_enabled_flag  : 1;
++            UINT32  deblocking_filter_override_enabled_flag     : 1;
++            UINT32  pps_deblocking_filter_disabled_flag         : 1;
++            UINT32  lists_modification_present_flag             : 1;
++            UINT32  slice_segment_header_extension_present_flag : 1;
++            UINT32  IrapPicFlag                                 : 1;
++            UINT32  IdrPicFlag                                  : 1;
++            UINT32  IntraPicFlag                                : 1;
++            UINT32  ReservedBits4                               : 13;
++        };
++        UINT32 dwCodingSettingPicturePropertyFlags;
++    };
++    CHAR    pps_cb_qp_offset;
++    CHAR    pps_cr_qp_offset;
++    UCHAR   num_tile_columns_minus1;
++    UCHAR   num_tile_rows_minus1;
++    USHORT  column_width_minus1[19];
++    USHORT  row_height_minus1[21];
++    UCHAR   diff_cu_qp_delta_depth;
++    CHAR    pps_beta_offset_div2;
++    CHAR    pps_tc_offset_div2;
++    UCHAR   log2_parallel_merge_level_minus2;
++    INT     CurrPicOrderCntVal;
++    DXVA_PicEntry_HEVC	RefPicList[15];
++    UCHAR   ReservedBits5;
++    INT     PicOrderCntValList[15];
++    UCHAR   RefPicSetStCurrBefore[8];
++    UCHAR   RefPicSetStCurrAfter[8];
++    UCHAR   RefPicSetLtCurr[8];
++    USHORT  ReservedBits6;
++    USHORT  ReservedBits7;
++    UINT    StatusReportFeedbackNumber;
++} DXVA_PicParams_HEVC, *LPDXVA_PicParams_HEVC;
++
++/* HEVC Quantizatiuon Matrix structure */
++typedef struct _DXVA_Qmatrix_HEVC {
++    UCHAR ucScalingLists0[6][16]; 
++    UCHAR ucScalingLists1[6][64]; 
++    UCHAR ucScalingLists2[6][64]; 
++    UCHAR ucScalingLists3[2][64]; 
++    UCHAR ucScalingListDCCoefSizeID2[6];
++    UCHAR ucScalingListDCCoefSizeID3[2];
++} DXVA_Qmatrix_HEVC, *LPDXVA_Qmatrix_HEVC;
++
++
++/* HEVC Slice Control Structure */
++typedef struct _DXVA_Slice_HEVC_Short {
++    UINT    BSNALunitDataLocation; 
++    UINT    SliceBytesInBuffer; 
++    USHORT  wBadSliceChopping; 
++} DXVA_Slice_HEVC_Short, *LPDXVA_Slice_HEVC_Short;
++
++/* VPx picture entry data structure */
++typedef struct _DXVA_PicEntry_VPx {
++    union {
++        struct {
++            UCHAR Index7Bits     : 7;
++            UCHAR AssociatedFlag : 1;
++        };
++        UCHAR bPicEntry;
++    };
++} DXVA_PicEntry_VPx, *LPDXVA_PicEntry_VPx;
++
++/* VP9 segmentation structure */
++typedef struct _segmentation_VP9 {
++    union {
++        struct {
++            UCHAR enabled                   : 1;
++            UCHAR update_map                : 1;
++            UCHAR temporal_update           : 1;
++            UCHAR abs_delta                 : 1;
++            UCHAR ReservedSegmentFlags4Bits : 4;
++        };
++        UCHAR wSegmentInfoFlags;
++    };
++    UCHAR tree_probs[7];
++    UCHAR pred_probs[3];
++    SHORT feature_data[8][4];
++    UCHAR feature_mask[8];
++} DXVA_segmentation_VP9;
++
++/* VP9 picture parameters structure */
++typedef struct _DXVA_PicParams_VP9 {
++    DXVA_PicEntry_VPx    CurrPic;
++    UCHAR                profile;
++    union {
++        struct {
++            USHORT frame_type                   : 1;
++            USHORT show_frame                   : 1;
++            USHORT error_resilient_mode         : 1;
++            USHORT subsampling_x                : 1;
++            USHORT subsampling_y                : 1;
++            USHORT extra_plane                  : 1;
++            USHORT refresh_frame_context        : 1;
++            USHORT frame_parallel_decoding_mode : 1;
++            USHORT intra_only                   : 1;
++            USHORT frame_context_idx            : 2;
++            USHORT reset_frame_context          : 2;
++            USHORT allow_high_precision_mv      : 1;
++            USHORT ReservedFormatInfo2Bits      : 2;
++        };
++        USHORT wFormatAndPictureInfoFlags;
++    };
++    UINT  width;
++    UINT  height;
++    UCHAR BitDepthMinus8Luma;
++    UCHAR BitDepthMinus8Chroma;
++    UCHAR interp_filter;
++    UCHAR Reserved8Bits;
++    DXVA_PicEntry_VPx  ref_frame_map[8];
++    UINT  ref_frame_coded_width[8];
++    UINT  ref_frame_coded_height[8];
++    DXVA_PicEntry_VPx  frame_refs[3];
++    CHAR  ref_frame_sign_bias[4];
++    CHAR  filter_level;
++    CHAR  sharpness_level;
++    union {
++        struct {
++            UCHAR mode_ref_delta_enabled   : 1;
++            UCHAR mode_ref_delta_update    : 1;
++            UCHAR use_prev_in_find_mv_refs : 1;
++            UCHAR ReservedControlInfo5Bits : 5;
++        };
++        UCHAR wControlInfoFlags;
++    };
++    CHAR   ref_deltas[4];
++    CHAR   mode_deltas[2];
++    SHORT  base_qindex;
++    CHAR   y_dc_delta_q;
++    CHAR   uv_dc_delta_q;
++    CHAR   uv_ac_delta_q;
++    DXVA_segmentation_VP9 stVP9Segments;
++    UCHAR  log2_tile_cols;
++    UCHAR  log2_tile_rows;
++    USHORT uncompressed_header_size_byte_aligned;
++    USHORT first_partition_size;
++    USHORT Reserved16Bits;
++    UINT   Reserved32Bits;
++    UINT   StatusReportFeedbackNumber;
++} DXVA_PicParams_VP9, *LPDXVA_PicParams_VP9;
++
++/* VP8 segmentation structure */
++typedef struct _segmentation_VP8 {
++    union {
++        struct {
++            UCHAR segmentation_enabled        : 1;
++            UCHAR update_mb_segmentation_map  : 1;
++            UCHAR update_mb_segmentation_data : 1;
++            UCHAR mb_segement_abs_delta       : 1;
++            UCHAR ReservedSegmentFlags4Bits   : 4;
++        };
++        UCHAR wSegmentFlags;
++    };
++    CHAR  segment_feature_data[2][4];
++    UCHAR mb_segment_tree_probs[3];
++} DXVA_segmentation_VP8;
++
++/* VP8 picture parameters structure */
++typedef struct _DXVA_PicParams_VP8 {
++    UINT first_part_size;
++    UINT width;
++    UINT height;
++    DXVA_PicEntry_VPx  CurrPic;
++    union {
++        struct {
++            UCHAR frame_type            : 1;
++            UCHAR version               : 3;
++            UCHAR show_frame            : 1;
++            UCHAR clamp_type            : 1;
++            UCHAR ReservedFrameTag3Bits : 2;
++        };
++        UCHAR wFrameTagFlags;
++    };
++    DXVA_segmentation_VP8  stVP8Segments;
++    UCHAR  filter_type;
++    UCHAR  filter_level;
++    UCHAR  sharpness_level;
++    UCHAR  mode_ref_lf_delta_enabled;
++    UCHAR  mode_ref_lf_delta_update;
++    CHAR   ref_lf_deltas[4];
++    CHAR   mode_lf_deltas[4];
++    UCHAR  log2_nbr_of_dct_partitions;
++    UCHAR  base_qindex;
++    CHAR   y1dc_delta_q;
++    CHAR   y2dc_delta_q;
++    CHAR   y2ac_delta_q;
++    CHAR   uvdc_delta_q;
++    CHAR   uvac_delta_q;
++    DXVA_PicEntry_VPx alt_fb_idx;
++    DXVA_PicEntry_VPx gld_fb_idx;
++    DXVA_PicEntry_VPx lst_fb_idx;
++    UCHAR  ref_frame_sign_bias_golden;
++    UCHAR  ref_frame_sign_bias_altref;
++    UCHAR  refresh_entropy_probs;
++    UCHAR  vp8_coef_update_probs[4][8][3][11];
++    UCHAR  mb_no_coeff_skip;
++    UCHAR  prob_skip_false;
++    UCHAR  prob_intra;
++    UCHAR  prob_last;
++    UCHAR  prob_golden;
++    UCHAR  intra_16x16_prob[4];
++    UCHAR  intra_chroma_prob[3];
++    UCHAR  vp8_mv_update_probs[2][19];
++    USHORT ReservedBits1;
++    USHORT ReservedBits2;
++    USHORT ReservedBits3;
++    UINT   StatusReportFeedbackNumber;
++} DXVA_PicParams_VP8, *LPDXVA_PicParams_VP8;
++
++/* VPx slice control data structure - short form */
++typedef struct _DXVA_Slice_VPx_Short {
++    UINT   BSNALunitDataLocation;
++    UINT   SliceBytesInBuffer;
++    USHORT wBadSliceChopping;
++} DXVA_Slice_VPx_Short, *LPDXVA_Slice_VPx_Short;
++
++/* VPx status reporting data structure */
++typedef struct _DXVA_Status_VPx {
++    UINT   StatusReportFeedbackNumber;
++    DXVA_PicEntry_VPx CurrPic;
++    UCHAR  bBufType;
++    UCHAR  bStatus;
++    UCHAR  bReserved8Bits;
++    USHORT wNumMbsAffected;
++} DXVA_Status_VPx, *LPDXVA_Status_VPx;
++
+ #include <poppack.h>
+ 
+ #ifdef __cplusplus
+-- 
+2.19.1.windows.1
+
diff --git a/contrib/src/wine-headers/rules.mak b/contrib/src/wine-headers/rules.mak
index 47a36086be..2bde511009 100644
--- a/contrib/src/wine-headers/rules.mak
+++ b/contrib/src/wine-headers/rules.mak
@@ -27,6 +27,7 @@ $(TARBALLS)/wine-$(WINE_VERSION).tar.xz:
 
 wine-headers: wine-$(WINE_VERSION).tar.xz .sum-wine-headers
 	$(UNPACK)
+	$(APPLY) $(SRC)/wine-headers/0001-include-add-HEVC-and-VP8-VP9-support-to-dxva.h.patch
 	$(MOVE)
 
 wine_widl = echo "GEN $(1)" && \



More information about the vlc-commits mailing list