webservices: Add support for reading float values.
[wine.git] / include / dxva2api.idl
blob7a291570368cf8efc0b9ee84bcb1000fff4b9e86
1 /*
2 * Copyright 2014 Michael Müller for Pipelight
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
19 import "unknwn.idl";
21 cpp_quote("#if 0")
22 typedef DWORD IDirect3DDevice9;
23 typedef DWORD IDirect3DSurface9;
25 typedef DWORD D3DFORMAT;
26 typedef DWORD D3DPOOL;
27 cpp_quote("#endif")
29 /* MPEG2 */
30 cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0,0x4563, 0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);")
31 cpp_quote("#define DXVA2_ModeMPEG2_MOCOMP DXVA2_ModeMPEG2_MoComp")
33 cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_IDCT, 0xbf22ad00, 0x03ea,0x4690, 0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);")
35 cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_VLD, 0xee27417f, 0x5e28,0x4e65, 0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);")
37 /* H264 */
38 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_A, 0x1b81be64, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
39 cpp_quote("#define DXVA2_ModeH264_MoComp_NoFGT DXVA2_ModeH264_A")
41 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_B, 0x1b81be65, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
42 cpp_quote("#define DXVA2_ModeH264_MoComp_FGT DXVA2_ModeH264_B")
44 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_C, 0x1b81be66, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
45 cpp_quote("#define DXVA2_ModeH264_IDCT_NoFGT DXVA2_ModeH264_C")
47 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_D, 0x1b81be67, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
48 cpp_quote("#define DXVA2_ModeH264_IDCT_FGT DXVA2_ModeH264_D")
50 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_E, 0x1b81be68, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
51 cpp_quote("#define DXVA2_ModeH264_VLD_NoFGT DXVA2_ModeH264_E")
53 cpp_quote("DEFINE_GUID(DXVA2_ModeH264_F, 0x1b81be69, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
54 cpp_quote("#define DXVA2_ModeH264_VLD_FGT DXVA2_ModeH264_F")
56 /* WMV8 */
57 cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_A, 0x1b81be80, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
58 cpp_quote("#define DXVA2_ModeWMV8_PostProc DXVA2_ModeWMV8_A")
60 cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_B, 0x1b81be81, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
61 cpp_quote("#define DXVA2_ModeWMV8_MoComp DXVA2_ModeWMV8_B")
63 /* WMV9 */
64 cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_A, 0x1b81be90, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
65 cpp_quote("#define DXVA2_ModeWMV9_PostProc DXVA2_ModeWMV9_A")
67 cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_B, 0x1b81be91, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
68 cpp_quote("#define DXVA2_ModeWMV9_MoComp DXVA2_ModeWMV9_B")
70 cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_C, 0x1b81be94, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
71 cpp_quote("#define DXVA2_ModeWMV9_IDCT DXVA2_ModeWMV9_C")
73 /* VC1 */
74 cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_A, 0x1b81beA0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
75 cpp_quote("#define DXVA2_ModeVC1_PostProc DXVA2_ModeVC1_A")
77 cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_B, 0x1b81beA1, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
78 cpp_quote("#define DXVA2_ModeVC1_MoComp DXVA2_ModeVC1_B")
80 cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_C, 0x1b81beA2, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
81 cpp_quote("#define DXVA2_ModeVC1_IDCT DXVA2_ModeVC1_C")
83 cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_D, 0x1b81beA3, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
84 cpp_quote("#define DXVA2_ModeVC1_VLD DXVA2_ModeVC1_D")
86 /* Encryption */
87 cpp_quote("DEFINE_GUID(DXVA_NoEncrypt, 0x1b81bed0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
89 typedef LONGLONG REFERENCE_TIME;
91 enum
93 DXVA2_PictureParametersBufferType,
94 DXVA2_MacroBlockControlBufferType,
95 DXVA2_ResidualDifferenceBufferType,
96 DXVA2_DeblockingControlBufferType,
97 DXVA2_InverseQuantizationMatrixBufferType,
98 DXVA2_SliceControlBufferType,
99 DXVA2_BitStreamDateBufferType,
100 DXVA2_MotionVectorBuffer,
101 DXVA2_FilmGrainBuffer
104 enum
106 DXVA2_VideoDecoderRenderTarget,
107 DXVA2_VideoProcessorRenderTarget,
108 DXVA2_VideoSoftwareRenderTarget
111 typedef struct _DXVA2_ExtendedFormat
113 union
115 struct
117 UINT SampleFormat :8;
118 UINT VideoChromaSubsampling :4;
119 UINT NominalRange :3;
120 UINT VideoTransferMatrix :3;
121 UINT VideoLighting :4;
122 UINT VideoPrimaries :5;
123 UINT VideoTransferFunction :5;
125 UINT value;
127 } DXVA2_ExtendedFormat;
129 typedef struct _DXVA2_Frequency
131 UINT Numerator;
132 UINT Denominator;
133 } DXVA2_Frequency;
135 typedef struct _DXVA2_ConfigPictureDecode
137 GUID guidConfigBitstreamEncryption;
138 GUID guidConfigMBcontrolEncryption;
139 GUID guidConfigResidDiffEncryption;
140 UINT ConfigBitstreamRaw;
141 UINT ConfigMBcontrolRasterOrder;
142 UINT ConfigResidDiffHost;
143 UINT ConfigSpatialResid8;
144 UINT ConfigResid8Subtraction;
145 UINT ConfigSpatialHost8or9Clipping;
146 UINT ConfigSpatialResidInterleaved;
147 UINT ConfigIntraResidUnsigned;
148 UINT ConfigResidDiffAccelerator;
149 UINT ConfigHostInverseScan;
150 UINT ConfigSpecificIDCT;
151 UINT Config4GroupedCoefs;
152 UINT ConfigMinRenderTargetBuffCount;
153 USHORT ConfigDecoderSpecific;
154 } DXVA2_ConfigPictureDecode;
156 typedef struct _DXVA2_VideoDesc
158 UINT SampleWidth;
159 UINT SampleHeight;
160 DXVA2_ExtendedFormat SampleFormat;
161 D3DFORMAT Format;
162 DXVA2_Frequency InputSampleFreq;
163 DXVA2_Frequency OutputFrameFreq;
164 UINT UABProtectionLevel;
165 UINT Reserved;
166 } DXVA2_VideoDesc;
168 typedef struct _DXVA2_DecodeBufferDesc
170 DWORD CompressedBufferType;
171 UINT BufferIndex;
172 UINT DataOffset;
173 UINT DataSize;
174 UINT FirstMBaddress;
175 UINT NumMBsInBuffer;
176 UINT Width;
177 UINT Height;
178 UINT Stride;
179 UINT ReservedBits;
180 PVOID pvPVPState;
181 } DXVA2_DecodeBufferDesc;
183 typedef struct _DXVA2_DecodeExtensionData
185 UINT Function;
186 PVOID pPrivateInputData;
187 UINT PrivateInputDataSize;
188 PVOID pPrivateOutputData;
189 UINT PrivateOutputDataSize;
190 } DXVA2_DecodeExtensionData;
192 typedef struct _DXVA2_DecodeExecuteParams
194 UINT NumCompBuffers;
195 DXVA2_DecodeBufferDesc* pCompressedBuffers;
196 DXVA2_DecodeExtensionData* pExtensionData;
197 } DXVA2_DecodeExecuteParams;
199 typedef struct _DXVA2_VideoProcessorCaps
201 UINT DeviceCaps;
202 D3DPOOL InputPool;
203 UINT NumForwardRefSamples;
204 UINT NumBackwardRefSamples;
205 UINT Reserved;
206 UINT DeinterlaceTechnology;
207 UINT ProcAmpControlCaps;
208 UINT VideoProcessorOperations;
209 UINT NoiseFilterTechnology;
210 UINT DetailFilterTechnology;
211 } DXVA2_VideoProcessorCaps;
213 typedef struct _DXVA2_Fixed32
215 union
217 struct
219 USHORT Fraction;
220 SHORT Value;
222 LONG ll;
224 } DXVA2_Fixed32;
226 typedef struct _DXVA2_ValueRange
228 DXVA2_Fixed32 MinValue;
229 DXVA2_Fixed32 MaxValue;
230 DXVA2_Fixed32 DefaultValue;
231 DXVA2_Fixed32 StepSize;
232 } DXVA2_ValueRange;
234 typedef struct _DXVA2_AYUVSample8
236 UCHAR Cr;
237 UCHAR Cb;
238 UCHAR Y;
239 UCHAR Alpha;
240 } DXVA2_AYUVSample8;
242 typedef struct _DXVA2_AYUVSample16
244 USHORT Cr;
245 USHORT Cb;
246 USHORT Y;
247 USHORT Alpha;
248 } DXVA2_AYUVSample16;
250 typedef struct _DXVA2_ProcAmpValues
252 DXVA2_Fixed32 Brightness;
253 DXVA2_Fixed32 Contrast;
254 DXVA2_Fixed32 Hue;
255 DXVA2_Fixed32 Saturation;
256 } DXVA2_ProcAmpValues;
258 typedef struct _DXVA2_FilterValues
260 DXVA2_Fixed32 Level;
261 DXVA2_Fixed32 Threshold;
262 DXVA2_Fixed32 Radius;
263 } DXVA2_FilterValues;
265 typedef struct _DXVA2_VideoProcessBltParams
267 REFERENCE_TIME TargetFrame;
268 RECT TargetRect;
269 SIZE ConstrictionSize;
270 UINT StreamingFlags;
271 DXVA2_AYUVSample16 BackgroundColor;
272 DXVA2_ExtendedFormat DestFormat;
273 DXVA2_ProcAmpValues ProcAmpValues;
274 DXVA2_Fixed32 Alpha;
275 DXVA2_FilterValues NoiseFilterLuma;
276 DXVA2_FilterValues NoiseFilterChroma;
277 DXVA2_FilterValues DetailFilterLuma;
278 DXVA2_FilterValues DetailFilterChroma;
279 DWORD DestData;
280 } DXVA2_VideoProcessBltParams;
282 typedef struct _DXVA2_VideoSample
284 REFERENCE_TIME Start;
285 REFERENCE_TIME End;
286 DXVA2_ExtendedFormat SampleFormat;
287 IDirect3DSurface9* SrcSurface;
288 RECT SrcRect;
289 RECT DstRect;
290 DXVA2_AYUVSample8 Pal[16];
291 DXVA2_Fixed32 PlanarAlpha;
292 DWORD SampleData;
293 } DXVA2_VideoSample;
295 interface IDirectXVideoDecoder;
296 interface IDirectXVideoProcessor;
298 /*****************************************************************************
299 * IDirect3DDeviceManager9 interface
302 object,
303 uuid(a0cade0f-06d5-4cf4-a1c7-f3cdd725aa75),
304 local
306 interface IDirect3DDeviceManager9 : IUnknown
308 HRESULT ResetDevice(
309 [in] IDirect3DDevice9* pDevice,
310 [in] UINT resetToken);
312 HRESULT OpenDeviceHandle(
313 [out] HANDLE* phDevice);
315 HRESULT CloseDeviceHandle(
316 [in] HANDLE hDevice);
318 HRESULT TestDevice(
319 [in] HANDLE hDevice);
321 HRESULT LockDevice(
322 [in] HANDLE hDevice,
323 [out] IDirect3DDevice9** ppDevice,
324 [in] BOOL fBlock);
326 HRESULT UnlockDevice(
327 [in] HANDLE hDevice,
328 [in] BOOL fSaveState);
330 HRESULT GetVideoService(
331 [in] HANDLE hDevice,
332 [in] REFIID riid,
333 [out] void** ppService);
336 /*****************************************************************************
337 * IDirectXVideoAccelerationService interface
340 object,
341 uuid(fc51a550-d5e7-11d9-af55-00054e43ff02),
342 local
344 interface IDirectXVideoAccelerationService : IUnknown
346 HRESULT CreateSurface(
347 [in] UINT width,
348 [in] UINT height,
349 [in] UINT backBuffers,
350 [in] D3DFORMAT format,
351 [in] D3DPOOL pool,
352 [in] DWORD usage,
353 [in] DWORD dxvaType,
354 [out] IDirect3DSurface9 **ppSurface,
355 [in, out] HANDLE *pSharedHandle);
358 /*****************************************************************************
359 * IDirectXVideoDecoderService interface
362 object,
363 uuid(fc51a551-d5e7-11d9-af55-00054e43ff02),
364 local
366 interface IDirectXVideoDecoderService : IDirectXVideoAccelerationService
368 HRESULT GetDecoderDeviceGuids(
369 [out] UINT *count,
370 [out] GUID **pGuids);
372 HRESULT GetDecoderRenderTargets(
373 [in] REFGUID guid,
374 [out] UINT *pCount,
375 [out] D3DFORMAT **pFormats);
377 HRESULT GetDecoderConfigurations(
378 [in] REFGUID guid,
379 [in] const DXVA2_VideoDesc *pVideoDesc,
380 [in] IUnknown *pReserved,
381 [out] UINT *pCount,
382 [out] DXVA2_ConfigPictureDecode **ppConfigs);
384 HRESULT CreateVideoDecoder(
385 [in] REFGUID guid,
386 [in] const DXVA2_VideoDesc *pVideoDesc,
387 [in] DXVA2_ConfigPictureDecode *pConfig,
388 [in] IDirect3DSurface9 **ppDecoderRenderTargets,
389 [in] UINT NumSurfaces,
390 [out] IDirectXVideoDecoder **ppDecode);
393 /*****************************************************************************
394 * IDirectXVideoDecoder interface
397 object,
398 uuid(f2b0810a-fd00-43c9-918c-df94e2d8ef7d),
399 local
401 interface IDirectXVideoDecoder : IUnknown
403 HRESULT GetVideoDecoderService(
404 [out] IDirectXVideoDecoderService** ppService);
406 HRESULT GetCreationParameters(
407 [out] GUID* pDeviceGuid,
408 [out] DXVA2_VideoDesc* pVideoDesc,
409 [out] DXVA2_ConfigPictureDecode* pConfig,
410 [out] IDirect3DSurface9*** pDecoderRenderTargets,
411 [out] UINT* pNumSurfaces);
413 HRESULT GetBuffer(
414 [in] UINT BufferType,
415 [out] void** ppBuffer,
416 [out] UINT* pBufferSize);
418 HRESULT ReleaseBuffer(
419 [in] UINT BufferType);
421 HRESULT BeginFrame(
422 [in] IDirect3DSurface9* pRenderTarget,
423 [in] void* pvPVPData);
425 HRESULT EndFrame(
426 [out] HANDLE* pHandleComplete);
428 HRESULT Execute(
429 [in] const DXVA2_DecodeExecuteParams* pExecuteParams);
432 /*****************************************************************************
433 * IDirectXVideoProcessorService interface
436 object,
437 uuid(fc51a552-d5e7-11d9-af55-00054e43ff02),
438 local
440 interface IDirectXVideoProcessorService : IDirectXVideoAccelerationService
442 HRESULT RegisterVideoProcessorSoftwareDevice(
443 [in] void* pCallbacks);
445 HRESULT GetVideoProcessorDeviceGuids(
446 [in] const DXVA2_VideoDesc* pVideoDesc,
447 [out] UINT* pCount,
448 [out] GUID** pGuids);
450 HRESULT GetVideoProcessorRenderTargets(
451 [in] REFGUID VideoProcDeviceGuid,
452 [in] const DXVA2_VideoDesc* pVideoDesc,
453 [out] UINT* pCount,
454 [out] D3DFORMAT** pFormats);
456 HRESULT GetVideoProcessorSubStreamFormats(
457 [in] REFGUID VideoProcDeviceGuid,
458 [in] const DXVA2_VideoDesc* pVideoDesc,
459 [in] D3DFORMAT RenderTargetFormat,
460 [out] UINT* pCount,
461 [out] D3DFORMAT** pFormats);
463 HRESULT GetVideoProcessorCaps(
464 [in] REFGUID VideoProcDeviceGuid,
465 [in] const DXVA2_VideoDesc* pVideoDesc,
466 [in] D3DFORMAT RenderTargetFormat,
467 [out] DXVA2_VideoProcessorCaps* pCaps);
469 HRESULT GetProcAmpRange(
470 [in] REFGUID VideoProcDeviceGuid,
471 [in] const DXVA2_VideoDesc* pVideoDesc,
472 [in] D3DFORMAT RenderTargetFormat,
473 [in] UINT ProcAmpCap,
474 [out] DXVA2_ValueRange* pRange);
476 HRESULT GetFilterPropertyRange(
477 [in] REFGUID VideoProcDeviceGuid,
478 [in] const DXVA2_VideoDesc* pVideoDesc,
479 [in] D3DFORMAT renderTargetFormat,
480 [in] UINT FilterSetting,
481 [out] DXVA2_ValueRange* pRange);
483 HRESULT CreateVideoProcessor(
484 [in] REFGUID VideoProcDeviceGuid,
485 [in] const DXVA2_VideoDesc* pVideoDesc,
486 [in] D3DFORMAT RenderTargetFormat,
487 [in] UINT MaxNumSubStreams,
488 [out] IDirectXVideoProcessor** ppVidProcess);
491 /*****************************************************************************
492 * IDirectXVideoProcessor interface
495 object,
496 uuid(8c3a39f0-916e-4690-804f-4c8001355d25),
497 local
499 interface IDirectXVideoProcessor : IUnknown
501 HRESULT GetVideoProcessorService(
502 [out] IDirectXVideoProcessorService** ppService);
504 HRESULT GetCreationParameters(
505 [out] GUID* pDeviceGuid,
506 [out] DXVA2_VideoDesc* pVideoDesc,
507 [out] D3DFORMAT* pRenderTargetFormat,
508 [out] UINT* pMaxNumSubStreams);
510 HRESULT GetVideoProcessorCaps(
511 [out] DXVA2_VideoProcessorCaps* pCaps);
513 HRESULT GetProcAmpRange(
514 [in] UINT ProcAmpCap,
515 [out] DXVA2_ValueRange* pRange);
517 HRESULT GetFilterPropertyRange(
518 [in] UINT FilterSetting,
519 [out] DXVA2_ValueRange* pRange);
521 HRESULT VideoProcessBlt(
522 [in] IDirect3DSurface9* pRenderTarget,
523 [in] const DXVA2_VideoProcessBltParams* pBltParams,
524 [in] const DXVA2_VideoSample* pSamples,
525 [in] UINT NumSamples,
526 [out] HANDLE* pHandleCompleteIDirect3DDeviceManager9);