• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1/**
2 * This file has no copyright assigned and is placed in the Public Domain.
3 * This file is part of the mingw-w64 runtime package.
4 * No warranty is given; refer to the file DISCLAIMER.PD within this package.
5 */
6
7import "unknwn.idl";
8
9/* Fake widl types */
10cpp_quote("#if 0")
11typedef DWORD IDirect3DDevice9;
12typedef DWORD IDirect3DSurface9;
13typedef DWORD D3DFORMAT;
14typedef DWORD D3DPOOL;
15cpp_quote("#endif")
16
17interface IDirectXVideoDecoderService;
18
19cpp_quote("#ifndef __REFERENCE_TIME_DEFINED")
20cpp_quote("#define __REFERENCE_TIME_DEFINED")
21cpp_quote("typedef LONGLONG REFERENCE_TIME;")
22cpp_quote("#endif /*__REFERENCE_TIME_DEFINED*/")
23
24cpp_quote("#define DXVA2_ProcAmp_None 0x0000")
25cpp_quote("#define DXVA2_ProcAmp_Brightness 0x0001")
26cpp_quote("#define DXVA2_ProcAmp_Contrast 0x0002")
27cpp_quote("#define DXVA2_ProcAmp_Hue 0x0004")
28cpp_quote("#define DXVA2_ProcAmp_Saturation 0x0008")
29cpp_quote("")
30cpp_quote("#define DXVA2_E_NOT_INITIALIZED     MAKE_HRESULT(1, 4, 4096)")
31cpp_quote("#define DXVA2_E_NEW_VIDEO_DEVICE    MAKE_HRESULT(1, 4, 4097)")
32cpp_quote("#define DXVA2_E_VIDEO_DEVICE_LOCKED MAKE_HRESULT(1, 4, 4098)")
33cpp_quote("#define DXVA2_E_NOT_AVAILABLE       MAKE_HRESULT(1, 4, 4099)")
34cpp_quote("")
35cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0,0x4563, 0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);")
36cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_IDCT, 0xbf22ad00, 0x03ea,0x4690, 0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);")
37cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65, 0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);")
38cpp_quote("DEFINE_GUID(DXVA2_ModeH264_A, 0x1b81be64, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
39cpp_quote("DEFINE_GUID(DXVA2_ModeH264_B, 0x1b81be65, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
40cpp_quote("DEFINE_GUID(DXVA2_ModeH264_C, 0x1b81be66, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
41cpp_quote("DEFINE_GUID(DXVA2_ModeH264_D, 0x1b81be67, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
42cpp_quote("DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
43cpp_quote("DEFINE_GUID(DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
44cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_A, 0x1b81be80, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
45cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_B, 0x1b81be81, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
46cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_A, 0x1b81be90, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
47cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_B, 0x1b81be91, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
48cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_C, 0x1b81be94, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
49cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_A, 0x1b81beA0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
50cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_B, 0x1b81beA1, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
51cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_C, 0x1b81beA2, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
52cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
53cpp_quote("")
54cpp_quote("typedef enum _DXVA2_SampleFormat {")
55cpp_quote("  DXVA2_SampleFormatMask                  = 0x00FF,")
56cpp_quote("  DXVA2_SampleUnknown                     = 0,")
57cpp_quote("  DXVA2_SampleProgressiveFrame            = 2,")
58cpp_quote("  DXVA2_SampleFieldInterleavedEvenFirst   = 3,")
59cpp_quote("  DXVA2_SampleFieldInterleavedOddFirst    = 4,")
60cpp_quote("  DXVA2_SampleFieldSingleEven             = 5,")
61cpp_quote("  DXVA2_SampleFieldSingleOdd              = 6,")
62cpp_quote("  DXVA2_SampleSubStream                   = 7 ")
63cpp_quote("} DXVA2_SampleFormat;")
64cpp_quote("")
65cpp_quote("typedef enum _DXVA2_VideoChromaSubSampling {")
66cpp_quote("  DXVA2_VideoChromaSubsamplingMask                              = 0x0F,")
67cpp_quote("  DXVA2_VideoChromaSubsampling_Unknown                          = 0,")
68cpp_quote("  DXVA2_VideoChromaSubsampling_ProgressiveChroma                = 0x8,")
69cpp_quote("  DXVA2_VideoChromaSubsampling_Horizontally_Cosited             = 0x4,")
70cpp_quote("  DXVA2_VideoChromaSubsampling_Vertically_Cosited               = 0x2,")
71cpp_quote("  DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes   = 0x1,")
72cpp_quote("  DXVA2_VideoChromaSubsampling_MPEG2                            = ")
73cpp_quote("              DXVA2_VideoChromaSubsampling_Horizontally_Cosited |")
74cpp_quote("              DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,")
75cpp_quote("  DXVA2_VideoChromaSubsampling_MPEG1                            = ")
76cpp_quote("              DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,")
77cpp_quote("  DXVA2_VideoChromaSubsampling_DV_PAL                           = ")
78cpp_quote("              DXVA2_VideoChromaSubsampling_Horizontally_Cosited | ")
79cpp_quote("              DXVA2_VideoChromaSubsampling_Vertically_Cosited,")
80cpp_quote("  DXVA2_VideoChromaSubsampling_Cosited                          = ")
81cpp_quote("              DXVA2_VideoChromaSubsampling_Horizontally_Cosited | ")
82cpp_quote("              DXVA2_VideoChromaSubsampling_Vertically_Cosited | ")
83cpp_quote("              DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes ")
84cpp_quote("} DXVA2_VideoChromaSubSampling;")
85cpp_quote("")
86cpp_quote("typedef enum _DXVA2_NominalRange {")
87cpp_quote("  DXVA2_NominalRangeMask       = 0x07,")
88cpp_quote("  DXVA2_NominalRange_Unknown   = 0,")
89cpp_quote("  DXVA2_NominalRange_Normal    = 1,")
90cpp_quote("  DXVA2_NominalRange_Wide      = 2,")
91cpp_quote("  DXVA2_NominalRange_0_255     = 1,")
92cpp_quote("  DXVA2_NominalRange_16_235    = 2,")
93cpp_quote("  DXVA2_NominalRange_48_208    = 3 ")
94cpp_quote("} DXVA2_NominalRange;")
95cpp_quote("")
96cpp_quote("typedef enum _DXVA2_VideoLighting {")
97cpp_quote("  DXVA2_VideoLightingMask       = 0x0F,")
98cpp_quote("  DXVA2_VideoLighting_Unknown   = 0,")
99cpp_quote("  DXVA2_VideoLighting_bright    = 1,")
100cpp_quote("  DXVA2_VideoLighting_office    = 2,")
101cpp_quote("  DXVA2_VideoLighting_dim       = 3,")
102cpp_quote("  DXVA2_VideoLighting_dark      = 4 ")
103cpp_quote("} DXVA2_VideoLighting;")
104cpp_quote("")
105cpp_quote("typedef enum _DXVA2_VideoPrimaries {")
106cpp_quote("  DXVA2_VideoPrimariesMask             = 0x001f,")
107cpp_quote("  DXVA2_VideoPrimaries_Unknown         = 0,")
108cpp_quote("  DXVA2_VideoPrimaries_reserved        = 1,")
109cpp_quote("  DXVA2_VideoPrimaries_BT709           = 2,")
110cpp_quote("  DXVA2_VideoPrimaries_BT470_2_SysM    = 3,")
111cpp_quote("  DXVA2_VideoPrimaries_BT470_2_SysBG   = 4,")
112cpp_quote("  DXVA2_VideoPrimaries_SMPTE170M       = 5,")
113cpp_quote("  DXVA2_VideoPrimaries_SMPTE240M       = 6,")
114cpp_quote("  DXVA2_VideoPrimaries_EBU3213         = 7,")
115cpp_quote("  DXVA2_VideoPrimaries_SMPTE_C         = 8 ")
116cpp_quote("} DXVA2_VideoPrimaries;")
117cpp_quote("")
118cpp_quote("typedef enum _DXVA2_VideoTransferFunction {")
119cpp_quote("  DXVA2_VideoTransFuncMask       = 0x001f,")
120cpp_quote("  DXVA2_VideoTransFunc_Unknown   = 0,")
121cpp_quote("  DXVA2_VideoTransFunc_10        = 1,")
122cpp_quote("  DXVA2_VideoTransFunc_18        = 2,")
123cpp_quote("  DXVA2_VideoTransFunc_20        = 3,")
124cpp_quote("  DXVA2_VideoTransFunc_22        = 4,")
125cpp_quote("  DXVA2_VideoTransFunc_709       = 5,")
126cpp_quote("  DXVA2_VideoTransFunc_240M      = 6,")
127cpp_quote("  DXVA2_VideoTransFunc_sRGB      = 7,")
128cpp_quote("  DXVA2_VideoTransFunc_28        = 8 ")
129cpp_quote("} DXVA2_VideoTransferFunction;")
130cpp_quote("")
131cpp_quote("typedef enum  {")
132cpp_quote("  DXVA2_SurfaceType_DecoderRenderTarget      = 0,")
133cpp_quote("  DXVA2_SurfaceType_ProcessorRenderTarget    = 1,")
134cpp_quote("  DXVA2_SurfaceType_D3DRenderTargetTexture   = 2 ")
135cpp_quote("} DXVA2_SurfaceType;")
136cpp_quote("")
137cpp_quote("typedef enum _DXVA2_VideoTransferMatrix {")
138cpp_quote("  DXVA2_VideoTransferMatrixMask         = 0x07,")
139cpp_quote("  DXVA2_VideoTransferMatrix_Unknown     = 0,")
140cpp_quote("  DXVA2_VideoTransferMatrix_BT709       = 1,")
141cpp_quote("  DXVA2_VideoTransferMatrix_BT601       = 2,")
142cpp_quote("  DXVA2_VideoTransferMatrix_SMPTE240M   = 3 ")
143cpp_quote("} DXVA2_VideoTransferMatrix;")
144cpp_quote("")
145cpp_quote("typedef struct _DXVA2_AYUVSample16 {")
146cpp_quote("  USHORT Cr;")
147cpp_quote("  USHORT Cb;")
148cpp_quote("  USHORT Y;")
149cpp_quote("  USHORT Alpha;")
150cpp_quote("} DXVA2_AYUVSample16;")
151cpp_quote("")
152cpp_quote("typedef struct _DXVA2_AYUVSample8 {")
153cpp_quote("  UCHAR Cr;")
154cpp_quote("  UCHAR Cb;")
155cpp_quote("  UCHAR Y;")
156cpp_quote("  UCHAR Alpha;")
157cpp_quote("} DXVA2_AYUVSample8;")
158
159typedef struct _DXVA2_ConfigPictureDecode {
160  GUID   guidConfigBitstreamEncryption;
161  GUID   guidConfigMBcontrolEncryption;
162  GUID   guidConfigResidDiffEncryption;
163  UINT   ConfigBitstreamRaw;
164  UINT   ConfigMBcontrolRasterOrder;
165  UINT   ConfigResidDiffHost;
166  UINT   ConfigSpatialResid8;
167  UINT   ConfigResid8Subtraction;
168  UINT   ConfigSpatialHost8or9Clipping;
169  UINT   ConfigSpatialResidInterleaved;
170  UINT   ConfigIntraResidUnsigned;
171  UINT   ConfigResidDiffAccelerator;
172  UINT   ConfigHostInverseScan;
173  UINT   ConfigSpecificIDCT;
174  UINT   Config4GroupedCoefs;
175  USHORT ConfigMinRenderTargetBuffCount;
176  USHORT ConfigDecoderSpecific;
177} DXVA2_ConfigPictureDecode;
178
179typedef struct _DXVA2_DecodeBufferDesc {
180  DWORD CompressedBufferType;
181  UINT  BufferIndex;
182  UINT  DataOffset;
183  UINT  DataSize;
184  UINT  FirstMBaddress;
185  UINT  NumMBsInBuffer;
186  UINT  Width;
187  UINT  Height;
188  UINT  Stride;
189  UINT  ReservedBits;
190  PVOID pvPVPState;
191} DXVA2_DecodeBufferDesc;
192
193typedef struct _DXVA2_DecodeExtensionData {
194  UINT  Function;
195  PVOID pPrivateInputData;
196  UINT  PrivateInputDataSize;
197  PVOID pPrivateOutputData;
198  UINT  PrivateOutputDataSize;
199} DXVA2_DecodeExtensionData;
200
201typedef struct _DXVA2_DecodeExecuteParams {
202  UINT                      NumCompBuffers;
203  DXVA2_DecodeBufferDesc    *pCompressedBuffers;
204  DXVA2_DecodeExtensionData *pExtensionData;
205} DXVA2_DecodeExecuteParams;
206
207typedef struct _DXVA2_ExtendedFormat {
208  union {
209    struct {
210      UINT SampleFormat            :8;
211      UINT VideoChromaSubsampling  :4;
212      UINT NominalRange            :3;
213      UINT VideoTransferMatrix     :3;
214      UINT VideoLighting           :4;
215      UINT VideoPrimaries          :5;
216      UINT VideoTransferFunction   :5;
217    };
218    UINT   value;
219  };
220} DXVA2_ExtendedFormat;
221
222cpp_quote("typedef struct _DXVA2_Fixed32 {")
223cpp_quote("  __C89_NAMELESS union {")
224cpp_quote("    __C89_NAMELESS struct {")
225cpp_quote("      USHORT Fraction;")
226cpp_quote("      SHORT  Value;")
227cpp_quote("    } DUMMYSTRUCTNAME;")
228cpp_quote("    LONG   ll;")
229cpp_quote("  } DUMMYUNIONNAME;")
230cpp_quote("} DXVA2_Fixed32;")
231cpp_quote("")
232cpp_quote("typedef struct _DXVA2_FilterValues {")
233cpp_quote("  DXVA2_Fixed32 Level;")
234cpp_quote("  DXVA2_Fixed32 Threshold;")
235cpp_quote("  DXVA2_Fixed32 Radius;")
236cpp_quote("} DXVA2_FilterValues;")
237
238typedef struct _DXVA2_Frequency {
239  UINT Numerator;
240  UINT Denominator;
241} DXVA2_Frequency;
242
243cpp_quote("typedef struct _DXVA2_ProcAmpValues {")
244cpp_quote("  DXVA2_Fixed32 Brightness;")
245cpp_quote("  DXVA2_Fixed32 Contrast;")
246cpp_quote("  DXVA2_Fixed32 Hue;")
247cpp_quote("  DXVA2_Fixed32 Saturation;")
248cpp_quote("} DXVA2_ProcAmpValues;")
249cpp_quote("")
250cpp_quote("typedef struct _DXVA2_ValueRange {")
251cpp_quote("  DXVA2_Fixed32 MinValue;")
252cpp_quote("  DXVA2_Fixed32 MaxValue;")
253cpp_quote("  DXVA2_Fixed32 DefaultValue;")
254cpp_quote("  DXVA2_Fixed32 StepSize;")
255cpp_quote("} DXVA2_ValueRange;")
256
257typedef struct _DXVA2_VideoDesc {
258  UINT                 SampleWidth;
259  UINT                 SampleHeight;
260  DXVA2_ExtendedFormat SampleFormat;
261  D3DFORMAT            Format;
262  DXVA2_Frequency      InputSampleFreq;
263  DXVA2_Frequency      OutputFrameFreq;
264  UINT                 UABProtectionLevel;
265  UINT                 Reserved;
266} DXVA2_VideoDesc;
267
268cpp_quote("/* DeviceCaps")
269cpp_quote("DXVA2_VPDev_EmulatedDXVA1")
270cpp_quote("DXVA2_VPDev_HardwareDevice")
271cpp_quote("DXVA2_VPDev_SoftwareDevice")
272cpp_quote("*/")
273cpp_quote("/* DeinterlaceTechnology")
274cpp_quote("DXVA2_DeinterlaceTech_Unknown")
275cpp_quote("DXVA2_DeinterlaceTech_BOBLineReplicate")
276cpp_quote("DXVA2_DeinterlaceTech_BOBVerticalStretch")
277cpp_quote("DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap")
278cpp_quote("DXVA2_DeinterlaceTech_MedianFiltering")
279cpp_quote("DXVA2_DeinterlaceTech_EdgeFiltering")
280cpp_quote("DXVA2_DeinterlaceTech_FieldAdaptive")
281cpp_quote("DXVA2_DeinterlaceTech_PixelAdaptive")
282cpp_quote("DXVA2_DeinterlaceTech_MotionVectorSteered")
283cpp_quote("DXVA2_DeinterlaceTech_InverseTelecine")
284cpp_quote("*/")
285cpp_quote("")
286cpp_quote("/* VideoProcessorOperations")
287cpp_quote("DXVA2_VideoProcess_YUV2RGB")
288cpp_quote("DXVA2_VideoProcess_StretchX")
289cpp_quote("DXVA2_VideoProcess_StretchY")
290cpp_quote("DXVA2_VideoProcess_AlphaBlend")
291cpp_quote("DXVA2_VideoProcess_SubRects")
292cpp_quote("DXVA2_VideoProcess_SubStreams")
293cpp_quote("DXVA2_VideoProcess_SubStreamsExtended")
294cpp_quote("DXVA2_VideoProcess_YUV2RGBExtended")
295cpp_quote("DXVA2_VideoProcess_AlphaBlendExtended")
296cpp_quote("DXVA2_VideoProcess_Constriction")
297cpp_quote("DXVA2_VideoProcess_NoiseFilter")
298cpp_quote("DXVA2_VideoProcess_DetailFilter")
299cpp_quote("DXVA2_VideoProcess_PlanarAlpha")
300cpp_quote("DXVA2_VideoProcess_LinearScaling")
301cpp_quote("DXVA2_VideoProcess_GammaCompensated")
302cpp_quote("DXVA2_VideoProcess_MaintainsOriginalFieldData")
303cpp_quote("*/")
304cpp_quote("")
305cpp_quote("/*NoiseFilterTechnology")
306cpp_quote("DXVA2_NoiseFilterTech_Unsupported")
307cpp_quote("DXVA2_NoiseFilterTech_Unknown")
308cpp_quote("DXVA2_NoiseFilterTech_Median")
309cpp_quote("DXVA2_NoiseFilterTech_Temporal")
310cpp_quote("DXVA2_NoiseFilterTech_BlockNoise")
311cpp_quote("DXVA2_NoiseFilterTech_MosquitoNoise")
312cpp_quote("*/")
313cpp_quote("")
314cpp_quote("/* DetailFilterTechnology")
315cpp_quote("DXVA2_DetailFilterTech_Unsupported")
316cpp_quote("DXVA2_DetailFilterTech_Unknown")
317cpp_quote("DXVA2_DetailFilterTech_Edge")
318cpp_quote("DXVA2_DetailFilterTech_Sharpening")
319cpp_quote("*/")
320cpp_quote("typedef struct _DXVA2_VideoProcessBltParams {")
321cpp_quote("  REFERENCE_TIME       TargetFrame;")
322cpp_quote("  RECT                 TargetRect;")
323cpp_quote("  SIZE                 ConstrictionSize;")
324cpp_quote("  UINT                 StreamingFlags;")
325cpp_quote("  DXVA2_AYUVSample16   BackgroundColor;")
326cpp_quote("  DXVA2_ExtendedFormat DestFormat;")
327cpp_quote("  DXVA2_ProcAmpValues  ProcAmpValues;")
328cpp_quote("  DXVA2_Fixed32        Alpha;")
329cpp_quote("  DXVA2_FilterValues   NoiseFilterLuma;")
330cpp_quote("  DXVA2_FilterValues   NoiseFilterChroma;")
331cpp_quote("  DXVA2_FilterValues   DetailFilterLuma;")
332cpp_quote("  DXVA2_FilterValues   DetailFilterChroma;")
333cpp_quote("  DWORD                DestData;")
334cpp_quote("} DXVA2_VideoProcessBltParams;")
335cpp_quote("")
336cpp_quote("#ifdef _D3D9_H_")
337cpp_quote("typedef struct _DXVA2_VideoProcessorCaps {")
338cpp_quote("  UINT    DeviceCaps;")
339cpp_quote("  D3DPOOL InputPool;")
340cpp_quote("  UINT    NumForwardRefSamples;")
341cpp_quote("  UINT    NumBackwardRefSamples;")
342cpp_quote("  UINT    Reserved;")
343cpp_quote("  UINT    DeinterlaceTechnology;")
344cpp_quote("  UINT    ProcAmpControlCaps;")
345cpp_quote("  UINT    VideoProcessorOperations;")
346cpp_quote("  UINT    NoiseFilterTechnology;")
347cpp_quote("  UINT    DetailFilterTechnology;")
348cpp_quote("} DXVA2_VideoProcessorCaps;")
349cpp_quote("#endif")
350cpp_quote("")
351cpp_quote("/* SampleData")
352cpp_quote("DXVA2_SampleData_RFF")
353cpp_quote("DXVA2_SampleData_TFF")
354cpp_quote("DXVA2_SampleData_RFF_TFF_Present")
355cpp_quote("*/")
356cpp_quote("")
357cpp_quote("#ifdef _D3D9_H_")
358cpp_quote("typedef struct _DXVA2_VideoSample {")
359cpp_quote("  REFERENCE_TIME       Start;")
360cpp_quote("  REFERENCE_TIME       End;")
361cpp_quote("  DXVA2_ExtendedFormat SampleFormat;")
362cpp_quote("  IDirect3DSurface9*   SrcSurface;")
363cpp_quote("  RECT                 SrcRect;")
364cpp_quote("  RECT                 DstRect;")
365cpp_quote("  DXVA2_AYUVSample8    Pal[16];")
366cpp_quote("  DXVA2_Fixed32        PlanarAlpha;")
367cpp_quote("  DWORD                SampleData;")
368cpp_quote("} DXVA2_VideoSample;")
369cpp_quote("#endif")
370cpp_quote("")
371cpp_quote("/* Constants */")
372cpp_quote("")
373cpp_quote("#define DXVA2_VideoDecoderRenderTarget 0")
374cpp_quote("#define DXVA2_VideoProcessorRenderTarget 1")
375cpp_quote("#define DXVA2_VideoSoftwareRenderTarget 2")
376cpp_quote("")
377cpp_quote("/* CompressedBufferType */")
378cpp_quote("#define DXVA2_PictureParametersBufferType 0")
379cpp_quote("#define DXVA2_MacroBlockControlBufferType 1")
380cpp_quote("#define DXVA2_ResidualDifferenceBufferType 2")
381cpp_quote("#define DXVA2_DeblockingControlBufferType 3")
382cpp_quote("#define DXVA2_InverseQuantizationMatrixBufferType 4")
383cpp_quote("#define DXVA2_SliceControlBufferType 5")
384cpp_quote("#define DXVA2_BitStreamDateBufferType 6")
385cpp_quote("#define DXVA2_MotionVectorBuffer 7")
386cpp_quote("#define DXVA2_FilmGrainBuffer 8")
387cpp_quote("")
388cpp_quote("__forceinline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {")
389cpp_quote("  DXVA2_Fixed32 f32;")
390cpp_quote("  f32.ll = 0 + (1 << 16);")
391cpp_quote("  return f32;")
392cpp_quote("}")
393cpp_quote("")
394cpp_quote("__forceinline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {")
395cpp_quote("  DXVA2_Fixed32 f32;")
396cpp_quote("  f32.ll = 0;")
397cpp_quote("  return f32;")
398cpp_quote("}")
399cpp_quote("")
400cpp_quote("__forceinline float DXVA2FixedToFloat (const DXVA2_Fixed32 f32) {")
401cpp_quote("  return (float)f32.Value + (float)f32.Fraction / (1 << 16);")
402cpp_quote("}")
403cpp_quote("")
404cpp_quote("__forceinline DXVA2_Fixed32 DXVA2FloatToFixed (const float f) {")
405cpp_quote("  DXVA2_Fixed32 f32;")
406cpp_quote("  f32.Value    = ((ULONG) (f * (1 << 16))) >> 16;")
407cpp_quote("  f32.Fraction = ((ULONG) (f * (1 << 16))) & 0xFFFF;")
408cpp_quote("  return f32;")
409cpp_quote("}")
410
411cpp_quote("#ifdef _D3D9_H_")
412
413cpp_quote("HRESULT WINAPI DXVA2CreateDirect3DDeviceManager9(UINT *pResetToken,IDirect3DDeviceManager9 **ppDXVAManager);")
414cpp_quote("HRESULT WINAPI DXVA2CreateVideoService(IDirect3DDevice9 *pDD,REFIID riid,void **ppService);")
415
416[
417    object,
418    uuid(a0cade0f-06d5-4cf4-a1c7-f3cdd725aa75),
419    local
420]
421interface IDirect3DDeviceManager9 : IUnknown
422{
423    HRESULT ResetDevice([in] IDirect3DDevice9 *pDevice, [in] UINT resetToken);
424    HRESULT OpenDeviceHandle([out] HANDLE *phDevice);
425    HRESULT CloseDeviceHandle([in] HANDLE hDevice);
426    HRESULT TestDevice([in] HANDLE hDevice);
427    HRESULT LockDevice([in] HANDLE hDevice, [out] IDirect3DDevice9 **ppDevice, [in] BOOL fBlock);
428    HRESULT UnlockDevice([in] HANDLE hDevice, [in] BOOL fSaveState);
429    HRESULT GetVideoService([in] HANDLE hDevice, [in] REFIID riid, [out] void **ppService);
430}
431
432[
433    object,
434    uuid(f2b0810a-fd00-43c9-918c-df94e2d8ef7d),
435    local
436]
437interface IDirectXVideoDecoder : IUnknown
438{
439    HRESULT GetVideoDecoderService([out] IDirectXVideoDecoderService **ppService);
440    HRESULT GetCreationParameters([out] GUID *pDeviceGuid, [out] DXVA2_VideoDesc *pVideoDesc,
441            [out] DXVA2_ConfigPictureDecode *pConfig,
442            [out, unique, size_is(*pNumSurfaces)] IDirect3DSurface9 ***pDecoderRenderTargets,
443            [out] UINT *pNumSurfaces);
444
445    HRESULT GetBuffer([in] UINT BufferType, [out] void **ppBuffer, [out] UINT *pBufferSize);
446    HRESULT ReleaseBuffer([in] UINT BufferType);
447    HRESULT BeginFrame([in] IDirect3DSurface9 *pRenderTarget, [in] void *pvPVPData);
448    HRESULT EndFrame([out] HANDLE *pHandleComplete);
449    HRESULT Execute([in] const DXVA2_DecodeExecuteParams *pExecuteParams);
450}
451
452[
453    object,
454    uuid(fc51a550-d5e7-11d9-af55-00054e43ff02),
455    local
456]
457interface IDirectXVideoAccelerationService : IUnknown
458{
459    HRESULT CreateSurface([in] UINT Width, [in] UINT Height, [in] UINT BackBuffers, [in] D3DFORMAT Format,
460            [in] D3DPOOL Pool, [in] DWORD Usage, [in] DWORD DxvaType, [out, size_is(BackBuffers+1)] IDirect3DSurface9 **ppSurface,
461            [in, out] HANDLE *pSharedHandle);
462}
463
464[
465    object,
466    uuid(fc51a551-d5e7-11d9-af55-00054e43ff02),
467    local
468]
469interface IDirectXVideoDecoderService : IDirectXVideoAccelerationService
470{
471    HRESULT GetDecoderDeviceGuids([out] UINT *pCount, [out, unique, size_is(*pCount)] GUID **pGuids);
472
473    HRESULT GetDecoderRenderTargets([in] REFGUID Guid, [out] UINT *pCount, [out, unique, size_is(*pCount)] D3DFORMAT **pFormats);
474
475    HRESULT GetDecoderConfigurations([in] REFGUID Guid, [in] const DXVA2_VideoDesc *pVideoDesc, [in] void *pReserved,
476            [out] UINT *pCount, [out, unique, size_is(*pCount)] DXVA2_ConfigPictureDecode **ppConfigs);
477
478    HRESULT CreateVideoDecoder([in] REFGUID Guid, [in] const DXVA2_VideoDesc *pVideoDesc,
479            [in] const DXVA2_ConfigPictureDecode *pConfig,
480            [in, size_is(NumRenderTargets)] IDirect3DSurface9 **ppDecoderRenderTargets,
481            [in] UINT NumRenderTargets, [out] IDirectXVideoDecoder **ppDecode);
482}
483
484cpp_quote("#endif /* _D3D9_H_ */")
485