headers: Import dxva.h from Wine.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
This commit is contained in:
Biswapriyo Nath 2020-03-20 14:00:42 +01:00 committed by Jacek Caban
parent 41bcbb8900
commit c8e562e943
2 changed files with 266 additions and 222 deletions

View File

@ -1,32 +1,51 @@
/**
* This file has no copyright assigned and is placed in the Public Domain.
* This file is part of the mingw-w64 runtime package.
* No warranty is given; refer to the file DISCLAIMER.PD within this package.
/*
* Copyright 2015 Michael Müller
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
#ifndef _INC_DXVA
#define _INC_DXVA
#include <objbase.h>
#include <guiddef.h>
#ifndef __WINE_DXVA_H
#define __WINE_DXVA_H
#ifdef __cplusplus
extern "C" {
#endif
DEFINE_GUID(DXVA_NoEncrypt, 0x1b81bed0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);
/* DXVA H264 */
typedef struct {
__C89_NAMELESS union {
__C89_NAMELESS struct {
#define DXVA_USUAL_BLOCK_WIDTH 8
#define DXVA_USUAL_BLOCK_HEIGHT 8
#define DXVA_USUAL_BLOCK_SIZE (DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT)
#include <pshpack1.h>
typedef struct _DXVA_PicEntry_H264
{
union
{
struct
{
UCHAR Index7Bits : 7;
UCHAR AssociatedFlag : 1;
};
} DUMMYSTRUCTNAME;
UCHAR bPicEntry;
};
} DXVA_PicEntry_H264;
} DUMMYUNIONNAME;
} DXVA_PicEntry_H264, *LPDXVA_PicEntry_H264;
#pragma pack(push, 1)
typedef struct {
typedef struct _DXVA_FilmGrainCharacteristics
{
USHORT wFrameWidthInMbsMinus1;
USHORT wFrameHeightInMbsMinus1;
DXVA_PicEntry_H264 InPic;
@ -50,188 +69,197 @@ typedef struct {
UCHAR intensity_interval_lower_bound[3][16];
UCHAR intensity_interval_upper_bound[3][16];
SHORT comp_model_value[3][16][8];
} DXVA_FilmGrainChar_H264;
#pragma pack(pop)
} DXVA_FilmGrainChar_H264, *LPDXVA_FilmGrainChar_H264;
/* DXVA MPEG-I/II and VC-1 */
typedef struct _DXVA_PictureParameters {
USHORT wDecodedPictureIndex;
USHORT wDeblockedPictureIndex;
USHORT wForwardRefPictureIndex;
USHORT wBackwardRefPictureIndex;
USHORT wPicWidthInMBminus1;
USHORT wPicHeightInMBminus1;
UCHAR bMacroblockWidthMinus1;
UCHAR bMacroblockHeightMinus1;
UCHAR bBlockWidthMinus1;
UCHAR bBlockHeightMinus1;
UCHAR bBPPminus1;
UCHAR bPicStructure;
UCHAR bSecondField;
UCHAR bPicIntra;
UCHAR bPicBackwardPrediction;
UCHAR bBidirectionalAveragingMode;
UCHAR bMVprecisionAndChromaRelation;
UCHAR bChromaFormat;
UCHAR bPicScanFixed;
UCHAR bPicScanMethod;
UCHAR bPicReadbackRequests;
UCHAR bRcontrol;
UCHAR bPicSpatialResid8;
UCHAR bPicOverflowBlocks;
UCHAR bPicExtrapolation;
UCHAR bPicDeblocked;
UCHAR bPicDeblockConfined;
UCHAR bPic4MVallowed;
UCHAR bPicOBMC;
UCHAR bPicBinPB;
UCHAR bMV_RPS;
UCHAR bReservedBits;
USHORT wBitstreamFcodes;
USHORT wBitstreamPCEelements;
UCHAR bBitstreamConcealmentNeed;
UCHAR bBitstreamConcealmentMethod;
typedef struct _DXVA_PictureParameters
{
WORD wDecodedPictureIndex;
WORD wDeblockedPictureIndex;
WORD wForwardRefPictureIndex;
WORD wBackwardRefPictureIndex;
WORD wPicWidthInMBminus1;
WORD wPicHeightInMBminus1;
BYTE bMacroblockWidthMinus1;
BYTE bMacroblockHeightMinus1;
BYTE bBlockWidthMinus1;
BYTE bBlockHeightMinus1;
BYTE bBPPminus1;
BYTE bPicStructure;
BYTE bSecondField;
BYTE bPicIntra;
BYTE bPicBackwardPrediction;
BYTE bBidirectionalAveragingMode;
BYTE bMVprecisionAndChromaRelation;
BYTE bChromaFormat;
BYTE bPicScanFixed;
BYTE bPicScanMethod;
BYTE bPicReadbackRequests;
BYTE bRcontrol;
BYTE bPicSpatialResid8;
BYTE bPicOverflowBlocks;
BYTE bPicExtrapolation;
BYTE bPicDeblocked;
BYTE bPicDeblockConfined;
BYTE bPic4MVallowed;
BYTE bPicOBMC;
BYTE bPicBinPB;
BYTE bMV_RPS;
BYTE bReservedBits;
WORD wBitstreamFcodes;
WORD wBitstreamPCEelements;
BYTE bBitstreamConcealmentNeed;
BYTE bBitstreamConcealmentMethod;
} DXVA_PictureParameters, *LPDXVA_PictureParameters;
typedef struct _DXVA_QmatrixData {
BYTE bNewQmatrix[4];
WORD Qmatrix[4][8 * 8];
typedef struct _DXVA_SliceInfo
{
WORD wHorizontalPosition;
WORD wVerticalPosition;
DWORD dwSliceBitsInBuffer;
DWORD dwSliceDataLocation;
BYTE bStartCodeBitOffset;
BYTE bReservedBits;
WORD wMBbitOffset;
WORD wNumberMBsInSlice;
WORD wQuantizerScaleCode;
WORD wBadSliceChopping;
} DXVA_SliceInfo, *LPDXVA_SliceInfo;
typedef struct _DXVA_QmatrixData
{
BYTE bNewQmatrix[4];
WORD Qmatrix[4][DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT];
} DXVA_QmatrixData, *LPDXVA_QmatrixData;
#pragma pack(push, 1)
typedef struct _DXVA_SliceInfo {
USHORT wHorizontalPosition;
USHORT wVerticalPosition;
UINT dwSliceBitsInBuffer;
UINT dwSliceDataLocation;
UCHAR bStartCodeBitOffset;
UCHAR bReservedBits;
USHORT wMBbitOffset;
USHORT wNumberMBsInSlice;
USHORT wQuantizerScaleCode;
USHORT wBadSliceChopping;
} DXVA_SliceInfo, *LPDXVA_SliceInfo;
#pragma pack(pop)
typedef struct {
typedef struct _DXVA_PicParams_H264
{
USHORT wFrameWidthInMbsMinus1;
USHORT wFrameHeightInMbsMinus1;
DXVA_PicEntry_H264 CurrPic;
UCHAR num_ref_frames;
__C89_NAMELESS union {
__C89_NAMELESS struct {
USHORT field_pic_flag : 1;
USHORT MbaffFrameFlag : 1;
USHORT residual_colour_transform_flag : 1;
USHORT sp_for_switch_flag : 1;
USHORT chroma_format_idc : 2;
USHORT RefPicFlag : 1;
USHORT constrained_intra_pred_flag : 1;
USHORT weighted_pred_flag : 1;
USHORT weighted_bipred_idc : 2;
USHORT MbsConsecutiveFlag : 1;
USHORT frame_mbs_only_flag : 1;
USHORT transform_8x8_mode_flag : 1;
USHORT MinLumaBipredSize8x8Flag : 1;
USHORT IntraPicFlag : 1;
};
UCHAR num_ref_frames;
union
{
struct
{
USHORT field_pic_flag : 1;
USHORT MbaffFrameFlag : 1;
USHORT residual_colour_transform_flag : 1;
USHORT sp_for_switch_flag : 1;
USHORT chroma_format_idc : 2;
USHORT RefPicFlag : 1;
USHORT constrained_intra_pred_flag : 1;
USHORT weighted_pred_flag : 1;
USHORT weighted_bipred_idc : 2;
USHORT MbsConsecutiveFlag : 1;
USHORT frame_mbs_only_flag : 1;
USHORT transform_8x8_mode_flag : 1;
USHORT MinLumaBipredSize8x8Flag : 1;
USHORT IntraPicFlag : 1;
} DUMMYSTRUCTNAME;
USHORT wBitFields;
};
UCHAR bit_depth_luma_minus8;
UCHAR bit_depth_chroma_minus8;
USHORT Reserved16Bits;
UINT StatusReportFeedbackNumber;
} DUMMYUNIONNAME;
UCHAR bit_depth_luma_minus8;
UCHAR bit_depth_chroma_minus8;
USHORT Reserved16Bits;
UINT StatusReportFeedbackNumber;
DXVA_PicEntry_H264 RefFrameList[16];
INT CurrFieldOrderCnt[2];
INT FieldOrderCntList[16][2];
CHAR pic_init_qs_minus26;
CHAR chroma_qp_index_offset;
CHAR second_chroma_qp_index_offset;
UCHAR ContinuationFlag;
CHAR pic_init_qp_minus26;
UCHAR num_ref_idx_l0_active_minus1;
UCHAR num_ref_idx_l1_active_minus1;
UCHAR Reserved8BitsA;
USHORT FrameNumList[16];
UINT UsedForReferenceFlags;
USHORT NonExistingFrameFlags;
USHORT frame_num;
UCHAR log2_max_frame_num_minus4;
UCHAR pic_order_cnt_type;
UCHAR log2_max_pic_order_cnt_lsb_minus4;
UCHAR delta_pic_order_always_zero_flag;
UCHAR direct_8x8_inference_flag;
UCHAR entropy_coding_mode_flag;
UCHAR pic_order_present_flag;
UCHAR num_slice_groups_minus1;
UCHAR slice_group_map_type;
UCHAR deblocking_filter_control_present_flag;
UCHAR redundant_pic_cnt_present_flag;
UCHAR Reserved8BitsB;
USHORT slice_group_change_rate_minus1;
UCHAR SliceGroupMap[810];
} DXVA_PicParams_H264;
INT CurrFieldOrderCnt[2];
INT FieldOrderCntList[16][2];
CHAR pic_init_qs_minus26;
CHAR chroma_qp_index_offset;
CHAR second_chroma_qp_index_offset;
UCHAR ContinuationFlag;
CHAR pic_init_qp_minus26;
UCHAR num_ref_idx_l0_active_minus1;
UCHAR num_ref_idx_l1_active_minus1;
UCHAR Reserved8BitsA;
USHORT FrameNumList[16];
typedef struct {
UCHAR bScalingLists4x4[6][16];
UCHAR bScalingLists8x8[2][64];
} DXVA_Qmatrix_H264;
UINT UsedForReferenceFlags;
USHORT NonExistingFrameFlags;
USHORT frame_num;
UCHAR log2_max_frame_num_minus4;
UCHAR pic_order_cnt_type;
UCHAR log2_max_pic_order_cnt_lsb_minus4;
UCHAR delta_pic_order_always_zero_flag;
UCHAR direct_8x8_inference_flag;
UCHAR entropy_coding_mode_flag;
UCHAR pic_order_present_flag;
UCHAR num_slice_groups_minus1;
UCHAR slice_group_map_type;
UCHAR deblocking_filter_control_present_flag;
UCHAR redundant_pic_cnt_present_flag;
UCHAR Reserved8BitsB;
USHORT slice_group_change_rate_minus1;
UCHAR SliceGroupMap[810];
} DXVA_PicParams_H264, *LPDXVA_PicParams_H264;
typedef struct {
UINT BSNALunitDataLocation;
UINT SliceBytesInBuffer;
USHORT wBadSliceChopping;
USHORT first_mb_in_slice;
USHORT NumMbsForSlice;
USHORT BitOffsetToSliceData;
UCHAR slice_type;
UCHAR luma_log2_weight_denom;
UCHAR chroma_log2_weight_denom;
UCHAR num_ref_idx_l0_active_minus1;
UCHAR num_ref_idx_l1_active_minus1;
CHAR slice_alpha_c0_offset_div2;
CHAR slice_beta_offset_div2;
UCHAR Reserved8Bits;
typedef struct _DXVA_Qmatrix_H264
{
UCHAR bScalingLists4x4[6][16];
UCHAR bScalingLists8x8[2][64];
} DXVA_Qmatrix_H264, *LPDXVA_Qmatrix_H264;
typedef struct _DXVA_Slice_H264_Long
{
UINT BSNALunitDataLocation;
UINT SliceBytesInBuffer;
USHORT wBadSliceChopping;
USHORT first_mb_in_slice;
USHORT NumMbsForSlice;
USHORT BitOffsetToSliceData;
UCHAR slice_type;
UCHAR luma_log2_weight_denom;
UCHAR chroma_log2_weight_denom;
UCHAR num_ref_idx_l0_active_minus1;
UCHAR num_ref_idx_l1_active_minus1;
CHAR slice_alpha_c0_offset_div2;
CHAR slice_beta_offset_div2;
UCHAR Reserved8Bits;
DXVA_PicEntry_H264 RefPicList[2][32];
SHORT Weights[2][32][3][2];
CHAR slice_qs_delta;
CHAR slice_qp_delta;
UCHAR redundant_pic_cnt;
UCHAR direct_spatial_mv_pred_flag;
UCHAR cabac_init_idc;
UCHAR disable_deblocking_filter_idc;
USHORT slice_id;
} DXVA_Slice_H264_Long;
SHORT Weights[2][32][3][2];
CHAR slice_qs_delta;
CHAR slice_qp_delta;
UCHAR redundant_pic_cnt;
UCHAR direct_spatial_mv_pred_flag;
UCHAR cabac_init_idc;
UCHAR disable_deblocking_filter_idc;
USHORT slice_id;
} DXVA_Slice_H264_Long, *LPDXVA_Slice_H264_Long;
#pragma pack(push, 1)
typedef struct {
UINT BSNALunitDataLocation;
UINT SliceBytesInBuffer;
USHORT wBadSliceChopping;
} DXVA_Slice_H264_Short;
#pragma pack(pop)
typedef struct _DXVA_Slice_H264_Short
{
UINT BSNALunitDataLocation;
UINT SliceBytesInBuffer;
USHORT wBadSliceChopping;
} DXVA_Slice_H264_Short, *LPDXVA_Slice_H264_Short;
/* HEVC Picture Entry structure */
typedef struct {
__C89_NAMELESS union {
__C89_NAMELESS struct {
UCHAR Index7Bits : 7;
UCHAR AssociatedFlag : 1;
};
UCHAR bPicEntry;
};
typedef struct _DXVA_PicEntry_HEVC
{
union
{
struct
{
UCHAR Index7Bits : 7;
UCHAR AssociatedFlag : 1;
};
UCHAR bPicEntry;
};
} DXVA_PicEntry_HEVC, *LPDXVA_PicEntry_HEVC;
/* HEVC Picture Parameter structure */
#pragma pack(push, 1)
typedef struct _DXVA_PicParams_HEVC {
typedef struct _DXVA_PicParams_HEVC
{
USHORT PicWidthInMinCbsY;
USHORT PicHeightInMinCbsY;
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
USHORT chroma_format_idc : 2;
USHORT separate_colour_plane_flag : 1;
USHORT bit_depth_luma_minus8 : 3;
USHORT bit_depth_luma_minus8 : 3;
USHORT bit_depth_chroma_minus8 : 3;
USHORT log2_max_pic_order_cnt_lsb_minus4 : 4;
USHORT NoPicReorderingFlag : 1;
@ -257,8 +285,10 @@ typedef struct _DXVA_PicParams_HEVC {
USHORT wNumBitsForShortTermRPSInSlice;
USHORT ReservedBits2;
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
UINT32 scaling_list_enabled_flag : 1;
UINT32 amp_enabled_flag : 1;
UINT32 sample_adaptive_offset_enabled_flag : 1;
@ -281,8 +311,10 @@ typedef struct _DXVA_PicParams_HEVC {
UINT32 dwCodingParamToolFlags;
};
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
UINT32 constrained_intra_pred_flag : 1;
UINT32 transform_skip_enabled_flag : 1;
UINT32 cu_qp_delta_enabled_flag : 1;
@ -328,28 +360,29 @@ typedef struct _DXVA_PicParams_HEVC {
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];
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;
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 {
__C89_NAMELESS union {
__C89_NAMELESS struct {
typedef struct _DXVA_PicEntry_VPx
{
union
{
struct
{
UCHAR Index7Bits : 7;
UCHAR AssociatedFlag : 1;
};
@ -357,10 +390,12 @@ typedef struct _DXVA_PicEntry_VPx {
};
} DXVA_PicEntry_VPx, *LPDXVA_PicEntry_VPx;
/* VP9 segmentation structure */
typedef struct _segmentation_VP9 {
__C89_NAMELESS union {
__C89_NAMELESS struct {
typedef struct _segmentation_VP9
{
union
{
struct
{
UCHAR enabled : 1;
UCHAR update_map : 1;
UCHAR temporal_update : 1;
@ -375,12 +410,14 @@ typedef struct _segmentation_VP9 {
UCHAR feature_mask[8];
} DXVA_segmentation_VP9;
/* VP9 picture parameters structure */
typedef struct _DXVA_PicParams_VP9 {
typedef struct _DXVA_PicParams_VP9
{
DXVA_PicEntry_VPx CurrPic;
UCHAR profile;
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
USHORT frame_type : 1;
USHORT show_frame : 1;
USHORT error_resilient_mode : 1;
@ -410,8 +447,10 @@ typedef struct _DXVA_PicParams_VP9 {
CHAR ref_frame_sign_bias[4];
CHAR filter_level;
CHAR sharpness_level;
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
UCHAR mode_ref_delta_enabled : 1;
UCHAR mode_ref_delta_update : 1;
UCHAR use_prev_in_find_mv_refs : 1;
@ -435,10 +474,12 @@ typedef struct _DXVA_PicParams_VP9 {
UINT StatusReportFeedbackNumber;
} DXVA_PicParams_VP9, *LPDXVA_PicParams_VP9;
/* VP8 segmentation structure */
typedef struct _segmentation_VP8 {
__C89_NAMELESS union {
__C89_NAMELESS struct {
typedef struct _segmentation_VP8
{
union
{
struct
{
UCHAR segmentation_enabled : 1;
UCHAR update_mb_segmentation_map : 1;
UCHAR update_mb_segmentation_data : 1;
@ -451,14 +492,16 @@ typedef struct _segmentation_VP8 {
UCHAR mb_segment_tree_probs[3];
} DXVA_segmentation_VP8;
/* VP8 picture parameters structure */
typedef struct _DXVA_PicParams_VP8 {
typedef struct _DXVA_PicParams_VP8
{
UINT first_part_size;
UINT width;
UINT height;
DXVA_PicEntry_VPx CurrPic;
__C89_NAMELESS union {
__C89_NAMELESS struct {
union
{
struct
{
UCHAR frame_type : 1;
UCHAR version : 3;
UCHAR show_frame : 1;
@ -503,15 +546,15 @@ typedef struct _DXVA_PicParams_VP8 {
UINT StatusReportFeedbackNumber;
} DXVA_PicParams_VP8, *LPDXVA_PicParams_VP8;
/* VPx slice control data structure - short form */
typedef struct _DXVA_Slice_VPx_Short {
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 {
typedef struct _DXVA_Status_VPx
{
UINT StatusReportFeedbackNumber;
DXVA_PicEntry_VPx CurrPic;
UCHAR bBufType;
@ -520,10 +563,10 @@ typedef struct _DXVA_Status_VPx {
USHORT wNumMbsAffected;
} DXVA_Status_VPx, *LPDXVA_Status_VPx;
#pragma pack(pop)
#include <poppack.h>
#ifdef __cplusplus
}
#endif
#endif /*_INC_DXVA */
#endif /* __WINE_DXVA_H */

View File

@ -102,6 +102,7 @@ for f in \
dxerr8.h \
dxerr9.h \
dxfile.h \
dxva.h \
errors.h \
evcode.h \
mediaerr.h \