2 * Copyright 2015 Michael Müller
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.
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.
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
26 #define DXVA_USUAL_BLOCK_WIDTH 8
27 #define DXVA_USUAL_BLOCK_HEIGHT 8
28 #define DXVA_USUAL_BLOCK_SIZE (DXVA_USUAL_BLOCK_WIDTH * DXVA_USUAL_BLOCK_HEIGHT)
32 typedef struct _DXVA_PictureParameters
34 WORD wDecodedPictureIndex
;
35 WORD wDeblockedPictureIndex
;
36 WORD wForwardRefPictureIndex
;
37 WORD wBackwardRefPictureIndex
;
38 WORD wPicWidthInMBminus1
;
39 WORD wPicHeightInMBminus1
;
40 BYTE bMacroblockWidthMinus1
;
41 BYTE bMacroblockHeightMinus1
;
42 BYTE bBlockWidthMinus1
;
43 BYTE bBlockHeightMinus1
;
48 BYTE bPicBackwardPrediction
;
49 BYTE bBidirectionalAveragingMode
;
50 BYTE bMVprecisionAndChromaRelation
;
54 BYTE bPicReadbackRequests
;
56 BYTE bPicSpatialResid8
;
57 BYTE bPicOverflowBlocks
;
58 BYTE bPicExtrapolation
;
60 BYTE bPicDeblockConfined
;
66 WORD wBitstreamFcodes
;
67 WORD wBitstreamPCEelements
;
68 BYTE bBitstreamConcealmentNeed
;
69 BYTE bBitstreamConcealmentMethod
;
70 } DXVA_PictureParameters
, *LPDXVA_PictureParameters
;
72 typedef struct _DXVA_SliceInfo
74 WORD wHorizontalPosition
;
75 WORD wVerticalPosition
;
76 DWORD dwSliceBitsInBuffer
;
77 DWORD dwSliceDataLocation
;
78 BYTE bStartCodeBitOffset
;
81 WORD wNumberMBsInSlice
;
82 WORD wQuantizerScaleCode
;
83 WORD wBadSliceChopping
;
84 } DXVA_SliceInfo
, *LPDXVA_SliceInfo
;
86 typedef struct _DXVA_QmatrixData
89 WORD Qmatrix
[4][DXVA_USUAL_BLOCK_WIDTH
* DXVA_USUAL_BLOCK_HEIGHT
];
90 } DXVA_QmatrixData
, *LPDXVA_QmatrixData
;
99 UCHAR AssociatedFlag
: 1;
103 } DXVA_PicEntry_H264
;
107 USHORT wFrameWidthInMbsMinus1
;
108 USHORT wFrameHeightInMbsMinus1
;
109 DXVA_PicEntry_H264 CurrPic
;
110 UCHAR num_ref_frames
;
115 USHORT field_pic_flag
: 1;
116 USHORT MbaffFrameFlag
: 1;
117 USHORT residual_colour_transform_flag
: 1;
118 USHORT sp_for_switch_flag
: 1;
119 USHORT chroma_format_idc
: 2;
120 USHORT RefPicFlag
: 1;
121 USHORT constrained_intra_pred_flag
: 1;
122 USHORT weighted_pred_flag
: 1;
123 USHORT weighted_bipred_idc
: 2;
124 USHORT MbsConsecutiveFlag
: 1;
125 USHORT frame_mbs_only_flag
: 1;
126 USHORT transform_8x8_mode_flag
: 1;
127 USHORT MinLumaBipredSize8x8Flag
: 1;
128 USHORT IntraPicFlag
: 1;
132 UCHAR bit_depth_luma_minus8
;
133 UCHAR bit_depth_chroma_minus8
;
134 USHORT Reserved16Bits
;
135 UINT StatusReportFeedbackNumber
;
136 DXVA_PicEntry_H264 RefFrameList
[16];
137 INT CurrFieldOrderCnt
[2];
138 INT FieldOrderCntList
[16][2];
139 CHAR pic_init_qs_minus26
;
140 CHAR chroma_qp_index_offset
;
141 CHAR second_chroma_qp_index_offset
;
142 UCHAR ContinuationFlag
;
143 CHAR pic_init_qp_minus26
;
144 UCHAR num_ref_idx_l0_active_minus1
;
145 UCHAR num_ref_idx_l1_active_minus1
;
146 UCHAR Reserved8BitsA
;
147 USHORT FrameNumList
[16];
149 UINT UsedForReferenceFlags
;
150 USHORT NonExistingFrameFlags
;
152 UCHAR log2_max_frame_num_minus4
;
153 UCHAR pic_order_cnt_type
;
154 UCHAR log2_max_pic_order_cnt_lsb_minus4
;
155 UCHAR delta_pic_order_always_zero_flag
;
156 UCHAR direct_8x8_inference_flag
;
157 UCHAR entropy_coding_mode_flag
;
158 UCHAR pic_order_present_flag
;
159 UCHAR num_slice_groups_minus1
;
160 UCHAR slice_group_map_type
;
161 UCHAR deblocking_filter_control_present_flag
;
162 UCHAR redundant_pic_cnt_present_flag
;
163 UCHAR Reserved8BitsB
;
164 USHORT slice_group_change_rate_minus1
;
165 UCHAR SliceGroupMap
[810];
166 } DXVA_PicParams_H264
;
170 UCHAR bScalingLists4x4
[6][16];
171 UCHAR bScalingLists8x8
[2][64];
176 UINT BSNALunitDataLocation
;
177 UINT SliceBytesInBuffer
;
178 USHORT wBadSliceChopping
;
179 USHORT first_mb_in_slice
;
180 USHORT NumMbsForSlice
;
181 USHORT BitOffsetToSliceData
;
183 UCHAR luma_log2_weight_denom
;
184 UCHAR chroma_log2_weight_denom
;
186 UCHAR num_ref_idx_l0_active_minus1
;
187 UCHAR num_ref_idx_l1_active_minus1
;
188 CHAR slice_alpha_c0_offset_div2
;
189 CHAR slice_beta_offset_div2
;
191 DXVA_PicEntry_H264 RefPicList
[2][32];
192 SHORT Weights
[2][32][3][2];
195 UCHAR redundant_pic_cnt
;
196 UCHAR direct_spatial_mv_pred_flag
;
197 UCHAR cabac_init_idc
;
198 UCHAR disable_deblocking_filter_idc
;
200 } DXVA_Slice_H264_Long
;
204 UINT BSNALunitDataLocation
;
205 UINT SliceBytesInBuffer
;
206 USHORT wBadSliceChopping
;
207 } DXVA_Slice_H264_Short
;
215 #endif /* __WINE_DXVA_H */