This file is indexed.

/usr/include/wine/windows/dxva2api.idl is in libwine-dev 1.8.7-2.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
/*
 * Copyright 2014 Michael Müller for Pipelight
 *
 * 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
 */

import "unknwn.idl";

cpp_quote("#if 0")
typedef DWORD IDirect3DDevice9;
typedef DWORD IDirect3DSurface9;

typedef DWORD D3DFORMAT;
typedef DWORD D3DPOOL;
cpp_quote("#endif")

/* MPEG2 */
cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_MoComp, 0xe6a9f44b, 0x61b0,0x4563, 0x9e,0xa4,0x63,0xd2,0xa3,0xc6,0xfe,0x66);")
cpp_quote("#define DXVA2_ModeMPEG2_MOCOMP      DXVA2_ModeMPEG2_MoComp")

cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_IDCT,   0xbf22ad00, 0x03ea,0x4690, 0x80,0x77,0x47,0x33,0x46,0x20,0x9b,0x7e);")

cpp_quote("DEFINE_GUID(DXVA2_ModeMPEG2_VLD,    0xee27417f, 0x5e28,0x4e65, 0xbe,0xea,0x1d,0x26,0xb5,0x08,0xad,0xc9);")

/* H264 */
cpp_quote("DEFINE_GUID(DXVA2_ModeH264_A,       0x1b81be64, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_MoComp_NoFGT DXVA2_ModeH264_A")

cpp_quote("DEFINE_GUID(DXVA2_ModeH264_B,       0x1b81be65, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_MoComp_FGT   DXVA2_ModeH264_B")

cpp_quote("DEFINE_GUID(DXVA2_ModeH264_C,       0x1b81be66, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_IDCT_NoFGT   DXVA2_ModeH264_C")

cpp_quote("DEFINE_GUID(DXVA2_ModeH264_D,       0x1b81be67, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_IDCT_FGT     DXVA2_ModeH264_D")

cpp_quote("DEFINE_GUID(DXVA2_ModeH264_E,       0x1b81be68, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_VLD_NoFGT    DXVA2_ModeH264_E")

cpp_quote("DEFINE_GUID(DXVA2_ModeH264_F,       0x1b81be69, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeH264_VLD_FGT      DXVA2_ModeH264_F")

/* WMV8 */
cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_A,       0x1b81be80, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeWMV8_PostProc     DXVA2_ModeWMV8_A")

cpp_quote("DEFINE_GUID(DXVA2_ModeWMV8_B,       0x1b81be81, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeWMV8_MoComp       DXVA2_ModeWMV8_B")

/* WMV9 */
cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_A,       0x1b81be90, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeWMV9_PostProc     DXVA2_ModeWMV9_A")

cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_B,       0x1b81be91, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeWMV9_MoComp       DXVA2_ModeWMV9_B")

cpp_quote("DEFINE_GUID(DXVA2_ModeWMV9_C,       0x1b81be94, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeWMV9_IDCT         DXVA2_ModeWMV9_C")

/* VC1 */
cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_A,        0x1b81beA0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeVC1_PostProc      DXVA2_ModeVC1_A")

cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_B,        0x1b81beA1, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeVC1_MoComp        DXVA2_ModeVC1_B")

cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_C,        0x1b81beA2, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeVC1_IDCT          DXVA2_ModeVC1_C")

cpp_quote("DEFINE_GUID(DXVA2_ModeVC1_D,        0x1b81beA3, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")
cpp_quote("#define DXVA2_ModeVC1_VLD           DXVA2_ModeVC1_D")

/* Encryption */
cpp_quote("DEFINE_GUID(DXVA_NoEncrypt,         0x1b81bed0, 0xa0c7,0x11d3, 0xb9,0x84,0x00,0xc0,0x4f,0x2e,0x73,0xc5);")

typedef LONGLONG REFERENCE_TIME;

enum
{
    DXVA2_PictureParametersBufferType,
    DXVA2_MacroBlockControlBufferType,
    DXVA2_ResidualDifferenceBufferType,
    DXVA2_DeblockingControlBufferType,
    DXVA2_InverseQuantizationMatrixBufferType,
    DXVA2_SliceControlBufferType,
    DXVA2_BitStreamDateBufferType,
    DXVA2_MotionVectorBuffer,
    DXVA2_FilmGrainBuffer
};

enum
{
    DXVA2_VideoDecoderRenderTarget,
    DXVA2_VideoProcessorRenderTarget,
    DXVA2_VideoSoftwareRenderTarget
};

typedef struct _DXVA2_ExtendedFormat
{
    union
    {
        struct
        {
            UINT SampleFormat           :8;
            UINT VideoChromaSubsampling :4;
            UINT NominalRange           :3;
            UINT VideoTransferMatrix    :3;
            UINT VideoLighting          :4;
            UINT VideoPrimaries         :5;
            UINT VideoTransferFunction  :5;
        };
        UINT value;
    };
} DXVA2_ExtendedFormat;

typedef struct _DXVA2_Frequency
{
    UINT Numerator;
    UINT Denominator;
} DXVA2_Frequency;

typedef struct _DXVA2_ConfigPictureDecode
{
    GUID guidConfigBitstreamEncryption;
    GUID guidConfigMBcontrolEncryption;
    GUID guidConfigResidDiffEncryption;
    UINT ConfigBitstreamRaw;
    UINT ConfigMBcontrolRasterOrder;
    UINT ConfigResidDiffHost;
    UINT ConfigSpatialResid8;
    UINT ConfigResid8Subtraction;
    UINT ConfigSpatialHost8or9Clipping;
    UINT ConfigSpatialResidInterleaved;
    UINT ConfigIntraResidUnsigned;
    UINT ConfigResidDiffAccelerator;
    UINT ConfigHostInverseScan;
    UINT ConfigSpecificIDCT;
    UINT Config4GroupedCoefs;
    UINT ConfigMinRenderTargetBuffCount;
    USHORT ConfigDecoderSpecific;
} DXVA2_ConfigPictureDecode;

typedef struct _DXVA2_VideoDesc
{
    UINT SampleWidth;
    UINT SampleHeight;
    DXVA2_ExtendedFormat SampleFormat;
    D3DFORMAT Format;
    DXVA2_Frequency InputSampleFreq;
    DXVA2_Frequency OutputFrameFreq;
    UINT UABProtectionLevel;
    UINT Reserved;
} DXVA2_VideoDesc;

typedef struct _DXVA2_DecodeBufferDesc
{
    DWORD CompressedBufferType;
    UINT BufferIndex;
    UINT DataOffset;
    UINT DataSize;
    UINT FirstMBaddress;
    UINT NumMBsInBuffer;
    UINT Width;
    UINT Height;
    UINT Stride;
    UINT ReservedBits;
    PVOID pvPVPState;
} DXVA2_DecodeBufferDesc;

typedef struct _DXVA2_DecodeExtensionData
{
    UINT Function;
    PVOID pPrivateInputData;
    UINT PrivateInputDataSize;
    PVOID pPrivateOutputData;
    UINT PrivateOutputDataSize;
} DXVA2_DecodeExtensionData;

typedef struct _DXVA2_DecodeExecuteParams
{
    UINT NumCompBuffers;
    DXVA2_DecodeBufferDesc* pCompressedBuffers;
    DXVA2_DecodeExtensionData* pExtensionData;
} DXVA2_DecodeExecuteParams;

typedef struct _DXVA2_VideoProcessorCaps
{
    UINT DeviceCaps;
    D3DPOOL InputPool;
    UINT NumForwardRefSamples;
    UINT NumBackwardRefSamples;
    UINT Reserved;
    UINT DeinterlaceTechnology;
    UINT ProcAmpControlCaps;
    UINT VideoProcessorOperations;
    UINT NoiseFilterTechnology;
    UINT DetailFilterTechnology;
} DXVA2_VideoProcessorCaps;

typedef struct _DXVA2_Fixed32
{
    union
    {
        struct
        {
            USHORT Fraction;
            SHORT Value;
        };
        LONG ll;
    };
} DXVA2_Fixed32;

typedef struct _DXVA2_ValueRange
{
    DXVA2_Fixed32 MinValue;
    DXVA2_Fixed32 MaxValue;
    DXVA2_Fixed32 DefaultValue;
    DXVA2_Fixed32 StepSize;
} DXVA2_ValueRange;

typedef struct _DXVA2_AYUVSample8
{
    UCHAR Cr;
    UCHAR Cb;
    UCHAR Y;
    UCHAR Alpha;
} DXVA2_AYUVSample8;

typedef struct _DXVA2_AYUVSample16
{
    USHORT Cr;
    USHORT Cb;
    USHORT Y;
    USHORT Alpha;
} DXVA2_AYUVSample16;

typedef struct _DXVA2_ProcAmpValues
{
    DXVA2_Fixed32 Brightness;
    DXVA2_Fixed32 Contrast;
    DXVA2_Fixed32 Hue;
    DXVA2_Fixed32 Saturation;
} DXVA2_ProcAmpValues;

typedef struct _DXVA2_FilterValues
{
    DXVA2_Fixed32 Level;
    DXVA2_Fixed32 Threshold;
    DXVA2_Fixed32 Radius;
} DXVA2_FilterValues;

typedef struct _DXVA2_VideoProcessBltParams
{
    REFERENCE_TIME TargetFrame;
    RECT TargetRect;
    SIZE ConstrictionSize;
    UINT StreamingFlags;
    DXVA2_AYUVSample16 BackgroundColor;
    DXVA2_ExtendedFormat DestFormat;
    DXVA2_ProcAmpValues ProcAmpValues;
    DXVA2_Fixed32 Alpha;
    DXVA2_FilterValues NoiseFilterLuma;
    DXVA2_FilterValues NoiseFilterChroma;
    DXVA2_FilterValues DetailFilterLuma;
    DXVA2_FilterValues DetailFilterChroma;
    DWORD DestData;
} DXVA2_VideoProcessBltParams;

typedef struct _DXVA2_VideoSample
{
    REFERENCE_TIME Start;
    REFERENCE_TIME End;
    DXVA2_ExtendedFormat SampleFormat;
    IDirect3DSurface9* SrcSurface;
    RECT SrcRect;
    RECT DstRect;
    DXVA2_AYUVSample8 Pal[16];
    DXVA2_Fixed32 PlanarAlpha;
    DWORD SampleData;
} DXVA2_VideoSample;

interface IDirectXVideoDecoder;
interface IDirectXVideoProcessor;

/*****************************************************************************
 * IDirect3DDeviceManager9 interface
 */
[
    object,
    uuid(a0cade0f-06d5-4cf4-a1c7-f3cdd725aa75),
    local
]
interface IDirect3DDeviceManager9 : IUnknown
{
    HRESULT ResetDevice(
        [in] IDirect3DDevice9* pDevice,
        [in] UINT resetToken);

    HRESULT OpenDeviceHandle(
        [out] HANDLE* phDevice);

    HRESULT CloseDeviceHandle(
        [in] HANDLE hDevice);

    HRESULT TestDevice(
        [in] HANDLE hDevice);

    HRESULT LockDevice(
        [in] HANDLE hDevice,
        [out] IDirect3DDevice9** ppDevice,
        [in] BOOL fBlock);

    HRESULT UnlockDevice(
        [in] HANDLE hDevice,
        [in] BOOL fSaveState);

    HRESULT GetVideoService(
        [in] HANDLE hDevice,
        [in] REFIID riid,
        [out] void** ppService);
};

/*****************************************************************************
 * IDirectXVideoAccelerationService interface
 */
[
    object,
    uuid(fc51a550-d5e7-11d9-af55-00054e43ff02),
    local
]
interface IDirectXVideoAccelerationService : IUnknown
{
    HRESULT CreateSurface(
        [in] UINT width,
        [in] UINT height,
        [in] UINT backBuffers,
        [in] D3DFORMAT format,
        [in] D3DPOOL pool,
        [in] DWORD usage,
        [in] DWORD dxvaType,
        [out] IDirect3DSurface9 **ppSurface,
        [in, out] HANDLE *pSharedHandle);
};

/*****************************************************************************
 * IDirectXVideoDecoderService interface
 */
[
    object,
    uuid(fc51a551-d5e7-11d9-af55-00054e43ff02),
    local
]
interface IDirectXVideoDecoderService : IDirectXVideoAccelerationService
{
    HRESULT GetDecoderDeviceGuids(
        [out] UINT *count,
        [out] GUID **pGuids);

    HRESULT GetDecoderRenderTargets(
        [in] REFGUID guid,
        [out] UINT *pCount,
        [out] D3DFORMAT **pFormats);

    HRESULT GetDecoderConfigurations(
        [in] REFGUID guid,
        [in] const DXVA2_VideoDesc *pVideoDesc,
        [in] IUnknown *pReserved,
        [out] UINT *pCount,
        [out] DXVA2_ConfigPictureDecode **ppConfigs);

    HRESULT CreateVideoDecoder(
        [in] REFGUID guid,
        [in] const DXVA2_VideoDesc *pVideoDesc,
        [in] DXVA2_ConfigPictureDecode *pConfig,
        [in] IDirect3DSurface9 **ppDecoderRenderTargets,
        [in] UINT NumSurfaces,
        [out] IDirectXVideoDecoder **ppDecode);
};

/*****************************************************************************
 * IDirectXVideoDecoder interface
 */
[
    object,
    uuid(f2b0810a-fd00-43c9-918c-df94e2d8ef7d),
    local
]
interface IDirectXVideoDecoder : IUnknown
{
    HRESULT GetVideoDecoderService(
        [out] IDirectXVideoDecoderService** ppService);

    HRESULT GetCreationParameters(
        [out] GUID* pDeviceGuid,
        [out] DXVA2_VideoDesc* pVideoDesc,
        [out] DXVA2_ConfigPictureDecode* pConfig,
        [out] IDirect3DSurface9*** pDecoderRenderTargets,
        [out] UINT* pNumSurfaces);

    HRESULT GetBuffer(
        [in] UINT BufferType,
        [out] void** ppBuffer,
        [out] UINT* pBufferSize);

    HRESULT ReleaseBuffer(
        [in] UINT BufferType);

    HRESULT BeginFrame(
        [in] IDirect3DSurface9* pRenderTarget,
        [in] void* pvPVPData);

    HRESULT EndFrame(
        [out] HANDLE* pHandleComplete);

    HRESULT Execute(
        [in] const DXVA2_DecodeExecuteParams* pExecuteParams);
};

/*****************************************************************************
 * IDirectXVideoProcessorService interface
 */
[
    object,
    uuid(fc51a551-d5e7-11d9-af55-00054e43ff02),
    local
]
interface IDirectXVideoProcessorService : IDirectXVideoAccelerationService
{
    HRESULT RegisterVideoProcessorSoftwareDevice(
        [in] void* pCallbacks);

    HRESULT GetVideoProcessorDeviceGuids(
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [out] UINT* pCount,
        [out] GUID** pGuids);

    HRESULT GetVideoProcessorRenderTargets(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [out] UINT* pCount,
        [out] D3DFORMAT** pFormats);

    HRESULT GetVideoProcessorSubStreamFormats(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [in] D3DFORMAT RenderTargetFormat,
        [out] UINT* pCount,
        [out] D3DFORMAT** pFormats);

    HRESULT GetVideoProcessorCaps(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [in] D3DFORMAT RenderTargetFormat,
        [out] DXVA2_VideoProcessorCaps* pCaps);

    HRESULT GetProcAmpRange(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [in] D3DFORMAT RenderTargetFormat,
        [in] UINT ProcAmpCap,
        [out] DXVA2_ValueRange* pRange);

    HRESULT GetFilterPropertyRange(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [in] D3DFORMAT renderTargetFormat,
        [in] UINT FilterSetting,
        [out] DXVA2_ValueRange* pRange);

    HRESULT CreateVideoProcessor(
        [in] REFGUID VideoProcDeviceGuid,
        [in] const DXVA2_VideoDesc* pVideoDesc,
        [in] D3DFORMAT RenderTargetFormat,
        [in] UINT MaxNumSubStreams,
        [out] IDirectXVideoProcessor** ppVidProcess);
};

/*****************************************************************************
 * IDirectXVideoProcessor interface
 */
[
    object,
    uuid(8c3a39f0-916e-4690-804f-4c8001355d25),
    local
]
interface IDirectXVideoProcessor : IUnknown
{
    HRESULT GetVideoProcessorService(
        [out] IDirectXVideoProcessorService** ppService);

    HRESULT GetCreationParameters(
        [out] GUID* pDeviceGuid,
        [out] DXVA2_VideoDesc* pVideoDesc,
        [out] D3DFORMAT* pRenderTargetFormat,
        [out] UINT* pMaxNumSubStreams);

    HRESULT GetVideoProcessorCaps(
        [out] DXVA2_VideoProcessorCaps* pCaps);

    HRESULT GetProcAmpRange(
        [in] UINT ProcAmpCap,
        [out] DXVA2_ValueRange* pRange);

    HRESULT GetFilterPropertyRange(
        [in] UINT FilterSetting,
        [out] DXVA2_ValueRange* pRange);

    HRESULT VideoProcessBlt(
        [in] IDirect3DSurface9* pRenderTarget,
        [in] const DXVA2_VideoProcessBltParams* pBltParams,
        [in] const DXVA2_VideoSample* pSamples,
        [in] UINT NumSamples,
        [out] HANDLE* pHandleCompleteIDirect3DDeviceManager9);
};