1354 lines
54 KiB
Diff
1354 lines
54 KiB
Diff
From 9fc65fb4feda041b745bb0e15994537f2ad5b400 Mon Sep 17 00:00:00 2001
|
|
From: Alexey Pavlov <alexpux@gmail.com>
|
|
Date: Thu, 14 Sep 2017 11:18:59 +0300
|
|
Subject: [PATCH] DirectX 9 fixes for VLC
|
|
|
|
---
|
|
mingw-w64-headers/direct-x/include/d3d9.h | 37 ++
|
|
mingw-w64-headers/direct-x/include/d3d9caps.h | 7 +
|
|
mingw-w64-headers/include/dxva2api.h | 735 ++++++++++++++++++++++----
|
|
mingw-w64-headers/include/dxva2api.idl | 317 +++++++----
|
|
4 files changed, 907 insertions(+), 189 deletions(-)
|
|
|
|
diff --git a/mingw-w64-headers/direct-x/include/d3d9.h b/mingw-w64-headers/direct-x/include/d3d9.h
|
|
index aea02f4e..27bb2833 100644
|
|
--- a/mingw-w64-headers/direct-x/include/d3d9.h
|
|
+++ b/mingw-w64-headers/direct-x/include/d3d9.h
|
|
@@ -2201,6 +2201,43 @@ DECLARE_INTERFACE_(IDirect3DDevice9Ex, IDirect3DDevice9)
|
|
|
|
#endif /* !defined(D3D_DISABLE_9EX) */
|
|
|
|
+/*****************************************************************************
|
|
+ * IDirect3D9ExOverlayExtension interface
|
|
+ */
|
|
+#define INTERFACE IDirect3D9ExOverlayExtension
|
|
+DECLARE_INTERFACE_(IDirect3D9ExOverlayExtension,IUnknown)
|
|
+{
|
|
+ /*** IUnknown methods ***/
|
|
+ STDMETHOD_(HRESULT,QueryInterface)(THIS_ REFIID riid, void** ppvObject) PURE;
|
|
+ STDMETHOD_(ULONG,AddRef)(THIS) PURE;
|
|
+ STDMETHOD_(ULONG,Release)(THIS) PURE;
|
|
+ /*** IDirect3D9ExOverlayExtension methods ***/
|
|
+ STDMETHOD(CheckDeviceOverlayType)(THIS_ UINT Adapter, D3DDEVTYPE DevType, UINT OverlayWidth, UINT OverlayHeight,
|
|
+ D3DFORMAT OverlayFormat, D3DDISPLAYMODEEX* pDisplayMode, D3DDISPLAYROTATION DisplayRotation, D3DOVERLAYCAPS* pOverlayCaps) PURE;
|
|
+};
|
|
+#undef INTERFACE
|
|
+
|
|
+#ifdef __CRT_UUID_DECL
|
|
+__CRT_UUID_DECL(IDirect3D9ExOverlayExtension, 0x187aeb13, 0xaaf5, 0x4c59, 0x87, 0x6d, 0xe0, 0x59, 0x8, 0x8c, 0xd, 0xf8);
|
|
+#endif
|
|
+
|
|
+#if !defined(__cplusplus) || defined(CINTERFACE)
|
|
+/*** IUnknown methods ***/
|
|
+#define IDirect3D9ExOverlayExtension_QueryInterface(p,a,b) (p)->lpVtbl->QueryInterface(p,a,b)
|
|
+#define IDirect3D9ExOverlayExtension_AddRef(p) (p)->lpVtbl->AddRef(p)
|
|
+#define IDirect3D9ExOverlayExtension_Release(p) (p)->lpVtbl->Release(p)
|
|
+/*** IDirect3D9ExOverlayExtension ***/
|
|
+#define IDirect3D9ExOverlayExtension_CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h) (p)->lpVtbl->CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h)
|
|
+#else
|
|
+/*** IUnknown methods ***/
|
|
+#define IDirect3D9ExOverlayExtension_QueryInterface(p,a,b) (p)->QueryInterface(a,b)
|
|
+#define IDirect3D9ExOverlayExtension_AddRef(p) (p)->AddRef()
|
|
+#define IDirect3D9ExOverlayExtension_Release(p) (p)->Release()
|
|
+/*** IDirect3D9ExOverlayExtension ***/
|
|
+#define IDirect3D9ExOverlayExtension_CheckDeviceOverlayType(p,a,b,c,d,e,f,g,h) (p)->CheckDeviceOverlayType(a,b,c,d,e,f,g,h)
|
|
+#endif
|
|
+
|
|
+
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif /* defined(__cplusplus) */
|
|
diff --git a/mingw-w64-headers/direct-x/include/d3d9caps.h b/mingw-w64-headers/direct-x/include/d3d9caps.h
|
|
index 424b20cd..72c65cdb 100644
|
|
--- a/mingw-w64-headers/direct-x/include/d3d9caps.h
|
|
+++ b/mingw-w64-headers/direct-x/include/d3d9caps.h
|
|
@@ -399,6 +399,13 @@ typedef struct _D3DCAPS9 {
|
|
|
|
} D3DCAPS9;
|
|
|
|
+typedef struct _D3DOVERLAYCAPS {
|
|
+ UINT Caps;
|
|
+ UINT MaxOverlayDisplayWidth;
|
|
+ UINT MaxOverlayDisplayHeight;
|
|
+
|
|
+} D3DOVERLAYCAPS;
|
|
+
|
|
#ifdef __i386__
|
|
#include <poppack.h>
|
|
#endif
|
|
diff --git a/mingw-w64-headers/include/dxva2api.h b/mingw-w64-headers/include/dxva2api.h
|
|
index d4c54462..81015b80 100644
|
|
--- a/mingw-w64-headers/include/dxva2api.h
|
|
+++ b/mingw-w64-headers/include/dxva2api.h
|
|
@@ -37,6 +37,22 @@ typedef interface IDirectXVideoAccelerationService IDirectXVideoAccelerationServ
|
|
interface IDirectXVideoDecoderService;
|
|
#endif /* __cplusplus */
|
|
#endif
|
|
+
|
|
+#ifndef __IDirectXVideoProcessor_FWD_DEFINED__
|
|
+#define __IDirectXVideoProcessor_FWD_DEFINED__
|
|
+typedef interface IDirectXVideoProcessor IDirectXVideoProcessor;
|
|
+#ifdef __cplusplus
|
|
+interface IDirectXVideoProcessor;
|
|
+#endif /* __cplusplus */
|
|
+#endif
|
|
+
|
|
+#ifndef __IDirectXVideoProcessorService_FWD_DEFINED__
|
|
+#define __IDirectXVideoProcessorService_FWD_DEFINED__
|
|
+typedef interface IDirectXVideoProcessorService IDirectXVideoProcessorService;
|
|
+#ifdef __cplusplus
|
|
+interface IDirectXVideoProcessorService;
|
|
+#endif /* __cplusplus */
|
|
+#endif
|
|
|
|
/* Headers for imported files */
|
|
|
|
@@ -45,24 +55,31 @@ typedef interface IDirectXVideoDecoderService IDirectXVideoDecoderService;
|
|
extern "C" {
|
|
#endif
|
|
|
|
+#include <winapifamily.h>
|
|
#if 0
|
|
typedef DWORD IDirect3DDevice9;
|
|
typedef DWORD IDirect3DSurface9;
|
|
typedef DWORD D3DFORMAT;
|
|
typedef DWORD D3DPOOL;
|
|
#endif
|
|
+#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
#ifndef __IDirectXVideoDecoderService_FWD_DEFINED__
|
|
#define __IDirectXVideoDecoderService_FWD_DEFINED__
|
|
typedef interface IDirectXVideoDecoderService IDirectXVideoDecoderService;
|
|
#ifdef __cplusplus
|
|
interface IDirectXVideoDecoderService;
|
|
#endif /* __cplusplus */
|
|
#endif
|
|
|
|
-#ifndef __REFERENCE_TIME_DEFINED
|
|
-#define __REFERENCE_TIME_DEFINED
|
|
+#ifndef __IDirectXVideoProcessorService_FWD_DEFINED__
|
|
+#define __IDirectXVideoProcessorService_FWD_DEFINED__
|
|
+typedef interface IDirectXVideoProcessorService IDirectXVideoProcessorService;
|
|
+#ifdef __cplusplus
|
|
+interface IDirectXVideoProcessorService;
|
|
+#endif /* __cplusplus */
|
|
+#endif
|
|
+
|
|
typedef LONGLONG REFERENCE_TIME;
|
|
-#endif /*__REFERENCE_TIME_DEFINED*/
|
|
#define DXVA2_ProcAmp_None 0x0000
|
|
#define DXVA2_ProcAmp_Brightness 0x0001
|
|
#define DXVA2_ProcAmp_Contrast 0x0002
|
|
@@ -98,7 +112,7 @@ typedef enum _DXVA2_SampleFormat {
|
|
DXVA2_SampleFieldInterleavedOddFirst = 4,
|
|
DXVA2_SampleFieldSingleEven = 5,
|
|
DXVA2_SampleFieldSingleOdd = 6,
|
|
- DXVA2_SampleSubStream = 7
|
|
+ DXVA2_SampleSubStream = 7
|
|
} DXVA2_SampleFormat;
|
|
|
|
typedef enum _DXVA2_VideoChromaSubSampling {
|
|
@@ -108,18 +122,18 @@ typedef enum _DXVA2_VideoChromaSubSampling {
|
|
DXVA2_VideoChromaSubsampling_Horizontally_Cosited = 0x4,
|
|
DXVA2_VideoChromaSubsampling_Vertically_Cosited = 0x2,
|
|
DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes = 0x1,
|
|
- DXVA2_VideoChromaSubsampling_MPEG2 =
|
|
+ DXVA2_VideoChromaSubsampling_MPEG2 =
|
|
DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
|
|
DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
|
|
- DXVA2_VideoChromaSubsampling_MPEG1 =
|
|
+ DXVA2_VideoChromaSubsampling_MPEG1 =
|
|
DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes,
|
|
- DXVA2_VideoChromaSubsampling_DV_PAL =
|
|
+ DXVA2_VideoChromaSubsampling_DV_PAL =
|
|
DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
|
|
DXVA2_VideoChromaSubsampling_Vertically_Cosited,
|
|
- DXVA2_VideoChromaSubsampling_Cosited =
|
|
+ DXVA2_VideoChromaSubsampling_Cosited =
|
|
DXVA2_VideoChromaSubsampling_Horizontally_Cosited |
|
|
DXVA2_VideoChromaSubsampling_Vertically_Cosited |
|
|
- DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes
|
|
+ DXVA2_VideoChromaSubsampling_Vertically_AlignedChromaPlanes
|
|
} DXVA2_VideoChromaSubSampling;
|
|
|
|
typedef enum _DXVA2_NominalRange {
|
|
@@ -129,7 +143,7 @@ typedef enum _DXVA2_NominalRange {
|
|
DXVA2_NominalRange_Wide = 2,
|
|
DXVA2_NominalRange_0_255 = 1,
|
|
DXVA2_NominalRange_16_235 = 2,
|
|
- DXVA2_NominalRange_48_208 = 3
|
|
+ DXVA2_NominalRange_48_208 = 3
|
|
} DXVA2_NominalRange;
|
|
|
|
typedef enum _DXVA2_VideoLighting {
|
|
@@ -138,7 +152,7 @@ typedef enum _DXVA2_VideoLighting {
|
|
DXVA2_VideoLighting_bright = 1,
|
|
DXVA2_VideoLighting_office = 2,
|
|
DXVA2_VideoLighting_dim = 3,
|
|
- DXVA2_VideoLighting_dark = 4
|
|
+ DXVA2_VideoLighting_dark = 4
|
|
} DXVA2_VideoLighting;
|
|
|
|
typedef enum _DXVA2_VideoPrimaries {
|
|
@@ -151,7 +165,7 @@ typedef enum _DXVA2_VideoPrimaries {
|
|
DXVA2_VideoPrimaries_SMPTE170M = 5,
|
|
DXVA2_VideoPrimaries_SMPTE240M = 6,
|
|
DXVA2_VideoPrimaries_EBU3213 = 7,
|
|
- DXVA2_VideoPrimaries_SMPTE_C = 8
|
|
+ DXVA2_VideoPrimaries_SMPTE_C = 8
|
|
} DXVA2_VideoPrimaries;
|
|
|
|
typedef enum _DXVA2_VideoTransferFunction {
|
|
@@ -164,13 +178,13 @@ typedef enum _DXVA2_VideoTransferFunction {
|
|
DXVA2_VideoTransFunc_709 = 5,
|
|
DXVA2_VideoTransFunc_240M = 6,
|
|
DXVA2_VideoTransFunc_sRGB = 7,
|
|
- DXVA2_VideoTransFunc_28 = 8
|
|
+ DXVA2_VideoTransFunc_28 = 8
|
|
} DXVA2_VideoTransferFunction;
|
|
|
|
typedef enum {
|
|
DXVA2_SurfaceType_DecoderRenderTarget = 0,
|
|
DXVA2_SurfaceType_ProcessorRenderTarget = 1,
|
|
- DXVA2_SurfaceType_D3DRenderTargetTexture = 2
|
|
+ DXVA2_SurfaceType_D3DRenderTargetTexture = 2
|
|
} DXVA2_SurfaceType;
|
|
|
|
typedef enum _DXVA2_VideoTransferMatrix {
|
|
@@ -178,21 +192,20 @@ typedef enum _DXVA2_VideoTransferMatrix {
|
|
DXVA2_VideoTransferMatrix_Unknown = 0,
|
|
DXVA2_VideoTransferMatrix_BT709 = 1,
|
|
DXVA2_VideoTransferMatrix_BT601 = 2,
|
|
- DXVA2_VideoTransferMatrix_SMPTE240M = 3
|
|
+ DXVA2_VideoTransferMatrix_SMPTE240M = 3
|
|
} DXVA2_VideoTransferMatrix;
|
|
|
|
typedef struct _DXVA2_AYUVSample16 {
|
|
- USHORT Cr;
|
|
- USHORT Cb;
|
|
- USHORT Y;
|
|
- USHORT Alpha;
|
|
+ USHORT Cr;
|
|
+ USHORT Cb;
|
|
+ USHORT Y;
|
|
+ USHORT Alpha;
|
|
} DXVA2_AYUVSample16;
|
|
-
|
|
typedef struct _DXVA2_AYUVSample8 {
|
|
- UCHAR Cr;
|
|
- UCHAR Cb;
|
|
- UCHAR Y;
|
|
- UCHAR Alpha;
|
|
+ UCHAR Cr;
|
|
+ UCHAR Cb;
|
|
+ UCHAR Y;
|
|
+ UCHAR Alpha;
|
|
} DXVA2_AYUVSample8;
|
|
typedef struct _DXVA2_ConfigPictureDecode {
|
|
GUID guidConfigBitstreamEncryption;
|
|
@@ -253,36 +266,34 @@ typedef struct _DXVA2_ExtendedFormat {
|
|
} __C89_NAMELESSUNIONNAME;
|
|
} DXVA2_ExtendedFormat;
|
|
typedef struct _DXVA2_Fixed32 {
|
|
- __C89_NAMELESS union {
|
|
- __C89_NAMELESS struct {
|
|
- USHORT Fraction;
|
|
- SHORT Value;
|
|
- } DUMMYSTRUCTNAME;
|
|
- LONG ll;
|
|
- } DUMMYUNIONNAME;
|
|
+ __C89_NAMELESS union {
|
|
+ __C89_NAMELESS struct {
|
|
+ USHORT Fraction;
|
|
+ SHORT Value;
|
|
+ } DUMMYSTRUCTNAME;
|
|
+ LONG ll;
|
|
+ } DUMMYUNIONNAME;
|
|
} DXVA2_Fixed32;
|
|
-
|
|
typedef struct _DXVA2_FilterValues {
|
|
- DXVA2_Fixed32 Level;
|
|
- DXVA2_Fixed32 Threshold;
|
|
- DXVA2_Fixed32 Radius;
|
|
+ DXVA2_Fixed32 Level;
|
|
+ DXVA2_Fixed32 Threshold;
|
|
+ DXVA2_Fixed32 Radius;
|
|
} DXVA2_FilterValues;
|
|
typedef struct _DXVA2_Frequency {
|
|
UINT Numerator;
|
|
UINT Denominator;
|
|
} DXVA2_Frequency;
|
|
typedef struct _DXVA2_ProcAmpValues {
|
|
- DXVA2_Fixed32 Brightness;
|
|
- DXVA2_Fixed32 Contrast;
|
|
- DXVA2_Fixed32 Hue;
|
|
- DXVA2_Fixed32 Saturation;
|
|
+ DXVA2_Fixed32 Brightness;
|
|
+ DXVA2_Fixed32 Contrast;
|
|
+ DXVA2_Fixed32 Hue;
|
|
+ DXVA2_Fixed32 Saturation;
|
|
} DXVA2_ProcAmpValues;
|
|
-
|
|
typedef struct _DXVA2_ValueRange {
|
|
- DXVA2_Fixed32 MinValue;
|
|
- DXVA2_Fixed32 MaxValue;
|
|
- DXVA2_Fixed32 DefaultValue;
|
|
- DXVA2_Fixed32 StepSize;
|
|
+ DXVA2_Fixed32 MinValue;
|
|
+ DXVA2_Fixed32 MaxValue;
|
|
+ DXVA2_Fixed32 DefaultValue;
|
|
+ DXVA2_Fixed32 StepSize;
|
|
} DXVA2_ValueRange;
|
|
typedef struct _DXVA2_VideoDesc {
|
|
UINT SampleWidth;
|
|
@@ -347,56 +358,83 @@ DXVA2_DetailFilterTech_Edge
|
|
DXVA2_DetailFilterTech_Sharpening
|
|
*/
|
|
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;
|
|
+ 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;
|
|
-
|
|
-#ifdef _D3D9_H_
|
|
typedef struct _DXVA2_VideoProcessorCaps {
|
|
- UINT DeviceCaps;
|
|
- D3DPOOL InputPool;
|
|
- UINT NumForwardRefSamples;
|
|
- UINT NumBackwardRefSamples;
|
|
- UINT Reserved;
|
|
- UINT DeinterlaceTechnology;
|
|
- UINT ProcAmpControlCaps;
|
|
- UINT VideoProcessorOperations;
|
|
- UINT NoiseFilterTechnology;
|
|
- UINT DetailFilterTechnology;
|
|
+ UINT DeviceCaps;
|
|
+ D3DPOOL InputPool;
|
|
+ UINT NumForwardRefSamples;
|
|
+ UINT NumBackwardRefSamples;
|
|
+ UINT Reserved;
|
|
+ UINT DeinterlaceTechnology;
|
|
+ UINT ProcAmpControlCaps;
|
|
+ UINT VideoProcessorOperations;
|
|
+ UINT NoiseFilterTechnology;
|
|
+ UINT DetailFilterTechnology;
|
|
} DXVA2_VideoProcessorCaps;
|
|
-#endif
|
|
-
|
|
-/* SampleData
|
|
-DXVA2_SampleData_RFF
|
|
-DXVA2_SampleData_TFF
|
|
-DXVA2_SampleData_RFF_TFF_Present
|
|
-*/
|
|
+/* deinterlacing capabilities */
|
|
+#define DXVA2_DeinterlaceTech_Unknown 0x0
|
|
+#define DXVA2_DeinterlaceTech_BOBLineReplicate 0x1
|
|
+#define DXVA2_DeinterlaceTech_BOBVerticalStretch 0x2
|
|
+#define DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap 0x4
|
|
+#define DXVA2_DeinterlaceTech_MedianFiltering 0x8
|
|
+#define DXVA2_DeinterlaceTech_EdgeFiltering 0x10
|
|
+#define DXVA2_DeinterlaceTech_FieldAdaptive 0x20
|
|
+#define DXVA2_DeinterlaceTech_PixelAdaptive 0x40
|
|
+#define DXVA2_DeinterlaceTech_MotionVectorSteered 0x80
|
|
+#define DXVA2_DeinterlaceTech_InverseTelecine 0x100
|
|
+#define DXVA2_DeinterlaceTech_Mask 0x1FF
|
|
+
|
|
+/* VideoProcessor capabilities */
|
|
+#define DXVA2_VideoProcess_None 0x0
|
|
+#define DXVA2_VideoProcess_YUV2RGB 0x1
|
|
+#define DXVA2_VideoProcess_StretchX 0x2
|
|
+#define DXVA2_VideoProcess_StretchY 0x4
|
|
+#define DXVA2_VideoProcess_AlphaBlend 0x8
|
|
+#define DXVA2_VideoProcess_SubRects 0x10
|
|
+#define DXVA2_VideoProcess_SubStreams 0x20
|
|
+#define DXVA2_VideoProcess_SubStreamsExtended 0x40
|
|
+#define DXVA2_VideoProcess_YUV2RGBExtended 0x80
|
|
+#define DXVA2_VideoProcess_AlphaBlendExtended 0x100
|
|
+#define DXVA2_VideoProcess_Constriction 0x200
|
|
+#define DXVA2_VideoProcess_NoiseFilter 0x400
|
|
+#define DXVA2_VideoProcess_DetailFilter 0x800
|
|
+#define DXVA2_VideoProcess_PlanarAlpha 0x1000
|
|
+#define DXVA2_VideoProcess_LinearScaling 0x2000
|
|
+#define DXVA2_VideoProcess_GammaCompensated 0x4000
|
|
+#define DXVA2_VideoProcess_MaintainsOriginalFieldData 0x8000
|
|
+#define DXVA2_VideoProcess_Mask 0xFFFF
|
|
+/* SampleData */
|
|
+enum {
|
|
+ DXVA2_SampleData_RFF = 1,
|
|
+ DXVA2_SampleData_TFF = 2,
|
|
+ DXVA2_SampleData_RFF_TFF_Present = 4,
|
|
+ DXVA2_SampleData_Mask = 0xffff
|
|
+};
|
|
|
|
-#ifdef _D3D9_H_
|
|
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;
|
|
+ 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;
|
|
-#endif
|
|
-
|
|
/* Constants */
|
|
|
|
#define DXVA2_VideoDecoderRenderTarget 0
|
|
@@ -414,13 +452,13 @@ typedef struct _DXVA2_VideoSample {
|
|
#define DXVA2_MotionVectorBuffer 7
|
|
#define DXVA2_FilmGrainBuffer 8
|
|
|
|
-__forceinline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {
|
|
+__forceinline DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {
|
|
DXVA2_Fixed32 f32;
|
|
f32.ll = 0 + (1 << 16);
|
|
return f32;
|
|
}
|
|
|
|
-__forceinline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {
|
|
+__forceinline DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {
|
|
DXVA2_Fixed32 f32;
|
|
f32.ll = 0;
|
|
return f32;
|
|
@@ -1178,7 +1216,522 @@ void __RPC_STUB IDirectXVideoDecoderService_CreateVideoDecoder_Stub(
|
|
|
|
#endif /* __IDirectXVideoDecoderService_INTERFACE_DEFINED__ */
|
|
|
|
+/*****************************************************************************
|
|
+ * IDirectXVideoProcessor interface
|
|
+ */
|
|
+#ifndef __IDirectXVideoProcessor_INTERFACE_DEFINED__
|
|
+#define __IDirectXVideoProcessor_INTERFACE_DEFINED__
|
|
+
|
|
+DEFINE_GUID(IID_IDirectXVideoProcessor, 0x8c3a39f0, 0x916e, 0x4690, 0x80,0x4f, 0x4c,0x80,0x01,0x35,0x5d,0x25);
|
|
+#if defined(__cplusplus) && !defined(CINTERFACE)
|
|
+MIDL_INTERFACE("8c3a39f0-916e-4690-804f-4c8001355d25")
|
|
+IDirectXVideoProcessor : public IUnknown
|
|
+{
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorService(
|
|
+ IDirectXVideoProcessorService **ppService) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetCreationParameters(
|
|
+ GUID *pDeviceGuid,
|
|
+ DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT *pRenderTargetFormat,
|
|
+ UINT *pMaxNumSubStreams) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps(
|
|
+ DXVA2_VideoProcessorCaps *pCaps) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetProcAmpRange(
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetFilterPropertyRange(
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE VideoProcessBlt(
|
|
+ IDirect3DSurface9 *pRenderTarget,
|
|
+ const DXVA2_VideoProcessBltParams *pBltParams,
|
|
+ const DXVA2_VideoSample *pSamples,
|
|
+ UINT NumSamples,
|
|
+ HANDLE *pHandleComplete) = 0;
|
|
+
|
|
+};
|
|
+#ifdef __CRT_UUID_DECL
|
|
+__CRT_UUID_DECL(IDirectXVideoProcessor, 0x8c3a39f0, 0x916e, 0x4690, 0x80,0x4f, 0x4c,0x80,0x01,0x35,0x5d,0x25)
|
|
+#endif
|
|
+#else
|
|
+typedef struct IDirectXVideoProcessorVtbl {
|
|
+ BEGIN_INTERFACE
|
|
+
|
|
+ /*** IUnknown methods ***/
|
|
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ REFIID riid,
|
|
+ void **ppvObject);
|
|
+
|
|
+ ULONG (STDMETHODCALLTYPE *AddRef)(
|
|
+ IDirectXVideoProcessor* This);
|
|
+
|
|
+ ULONG (STDMETHODCALLTYPE *Release)(
|
|
+ IDirectXVideoProcessor* This);
|
|
+
|
|
+ /*** IDirectXVideoProcessor methods ***/
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorService)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ IDirectXVideoProcessorService **ppService);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetCreationParameters)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ GUID *pDeviceGuid,
|
|
+ DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT *pRenderTargetFormat,
|
|
+ UINT *pMaxNumSubStreams);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorCaps)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ DXVA2_VideoProcessorCaps *pCaps);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetProcAmpRange)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetFilterPropertyRange)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *VideoProcessBlt)(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ IDirect3DSurface9 *pRenderTarget,
|
|
+ const DXVA2_VideoProcessBltParams *pBltParams,
|
|
+ const DXVA2_VideoSample *pSamples,
|
|
+ UINT NumSamples,
|
|
+ HANDLE *pHandleComplete);
|
|
+
|
|
+ END_INTERFACE
|
|
+} IDirectXVideoProcessorVtbl;
|
|
+interface IDirectXVideoProcessor {
|
|
+ CONST_VTBL IDirectXVideoProcessorVtbl* lpVtbl;
|
|
+};
|
|
+
|
|
+#ifdef COBJMACROS
|
|
+#ifndef WIDL_C_INLINE_WRAPPERS
|
|
+/*** IUnknown methods ***/
|
|
+#define IDirectXVideoProcessor_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
|
+#define IDirectXVideoProcessor_AddRef(This) (This)->lpVtbl->AddRef(This)
|
|
+#define IDirectXVideoProcessor_Release(This) (This)->lpVtbl->Release(This)
|
|
+/*** IDirectXVideoProcessor methods ***/
|
|
+#define IDirectXVideoProcessor_GetVideoProcessorService(This,ppService) (This)->lpVtbl->GetVideoProcessorService(This,ppService)
|
|
+#define IDirectXVideoProcessor_GetCreationParameters(This,pDeviceGuid,pVideoDesc,pRenderTargetFormat,pMaxNumSubStreams) (This)->lpVtbl->GetCreationParameters(This,pDeviceGuid,pVideoDesc,pRenderTargetFormat,pMaxNumSubStreams)
|
|
+#define IDirectXVideoProcessor_GetVideoProcessorCaps(This,pCaps) (This)->lpVtbl->GetVideoProcessorCaps(This,pCaps)
|
|
+#define IDirectXVideoProcessor_GetProcAmpRange(This,ProcAmpCap,pRange) (This)->lpVtbl->GetProcAmpRange(This,ProcAmpCap,pRange)
|
|
+#define IDirectXVideoProcessor_GetFilterPropertyRange(This,FilterSetting,pRange) (This)->lpVtbl->GetFilterPropertyRange(This,FilterSetting,pRange)
|
|
+#define IDirectXVideoProcessor_VideoProcessBlt(This,pRenderTarget,pBltParams,pSamples,NumSamples,pHandleComplete) (This)->lpVtbl->VideoProcessBlt(This,pRenderTarget,pBltParams,pSamples,NumSamples,pHandleComplete)
|
|
+#else
|
|
+/*** IUnknown methods ***/
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_QueryInterface(IDirectXVideoProcessor* This,REFIID riid,void **ppvObject) {
|
|
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
|
|
+}
|
|
+static FORCEINLINE ULONG IDirectXVideoProcessor_AddRef(IDirectXVideoProcessor* This) {
|
|
+ return This->lpVtbl->AddRef(This);
|
|
+}
|
|
+static FORCEINLINE ULONG IDirectXVideoProcessor_Release(IDirectXVideoProcessor* This) {
|
|
+ return This->lpVtbl->Release(This);
|
|
+}
|
|
+/*** IDirectXVideoProcessor methods ***/
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_GetVideoProcessorService(IDirectXVideoProcessor* This,IDirectXVideoProcessorService **ppService) {
|
|
+ return This->lpVtbl->GetVideoProcessorService(This,ppService);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_GetCreationParameters(IDirectXVideoProcessor* This,GUID *pDeviceGuid,DXVA2_VideoDesc *pVideoDesc,D3DFORMAT *pRenderTargetFormat,UINT *pMaxNumSubStreams) {
|
|
+ return This->lpVtbl->GetCreationParameters(This,pDeviceGuid,pVideoDesc,pRenderTargetFormat,pMaxNumSubStreams);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_GetVideoProcessorCaps(IDirectXVideoProcessor* This,DXVA2_VideoProcessorCaps *pCaps) {
|
|
+ return This->lpVtbl->GetVideoProcessorCaps(This,pCaps);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_GetProcAmpRange(IDirectXVideoProcessor* This,UINT ProcAmpCap,DXVA2_ValueRange *pRange) {
|
|
+ return This->lpVtbl->GetProcAmpRange(This,ProcAmpCap,pRange);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_GetFilterPropertyRange(IDirectXVideoProcessor* This,UINT FilterSetting,DXVA2_ValueRange *pRange) {
|
|
+ return This->lpVtbl->GetFilterPropertyRange(This,FilterSetting,pRange);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessor_VideoProcessBlt(IDirectXVideoProcessor* This,IDirect3DSurface9 *pRenderTarget,const DXVA2_VideoProcessBltParams *pBltParams,const DXVA2_VideoSample *pSamples,UINT NumSamples,HANDLE *pHandleComplete) {
|
|
+ return This->lpVtbl->VideoProcessBlt(This,pRenderTarget,pBltParams,pSamples,NumSamples,pHandleComplete);
|
|
+}
|
|
+#endif
|
|
+#endif
|
|
+
|
|
+#endif
|
|
+
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_GetVideoProcessorService_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ IDirectXVideoProcessorService **ppService);
|
|
+void __RPC_STUB IDirectXVideoProcessor_GetVideoProcessorService_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_GetCreationParameters_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ GUID *pDeviceGuid,
|
|
+ DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT *pRenderTargetFormat,
|
|
+ UINT *pMaxNumSubStreams);
|
|
+void __RPC_STUB IDirectXVideoProcessor_GetCreationParameters_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_GetVideoProcessorCaps_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ DXVA2_VideoProcessorCaps *pCaps);
|
|
+void __RPC_STUB IDirectXVideoProcessor_GetVideoProcessorCaps_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_GetProcAmpRange_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+void __RPC_STUB IDirectXVideoProcessor_GetProcAmpRange_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_GetFilterPropertyRange_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+void __RPC_STUB IDirectXVideoProcessor_GetFilterPropertyRange_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessor_VideoProcessBlt_Proxy(
|
|
+ IDirectXVideoProcessor* This,
|
|
+ IDirect3DSurface9 *pRenderTarget,
|
|
+ const DXVA2_VideoProcessBltParams *pBltParams,
|
|
+ const DXVA2_VideoSample *pSamples,
|
|
+ UINT NumSamples,
|
|
+ HANDLE *pHandleComplete);
|
|
+void __RPC_STUB IDirectXVideoProcessor_VideoProcessBlt_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+
|
|
+#endif /* __IDirectXVideoProcessor_INTERFACE_DEFINED__ */
|
|
+
|
|
+/*****************************************************************************
|
|
+ * IDirectXVideoProcessorService interface
|
|
+ */
|
|
+#ifndef __IDirectXVideoProcessorService_INTERFACE_DEFINED__
|
|
+#define __IDirectXVideoProcessorService_INTERFACE_DEFINED__
|
|
+
|
|
+DEFINE_GUID(IID_IDirectXVideoProcessorService, 0xfc51a552, 0xd5e7, 0x11d9, 0xaf,0x55, 0x00,0x05,0x4e,0x43,0xff,0x02);
|
|
+#if defined(__cplusplus) && !defined(CINTERFACE)
|
|
+MIDL_INTERFACE("fc51a552-d5e7-11d9-af55-00054e43ff02")
|
|
+IDirectXVideoProcessorService : public IDirectXVideoAccelerationService
|
|
+{
|
|
+ virtual HRESULT STDMETHODCALLTYPE RegisterVideoProcessorSoftwareDevice(
|
|
+ void *pCallbacks) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorDeviceGuids(
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ GUID **pGuids) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorRenderTargets(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorSubStreamFormats(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetVideoProcessorCaps(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ DXVA2_VideoProcessorCaps *pCaps) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetProcAmpRange(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE GetFilterPropertyRange(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange) = 0;
|
|
+
|
|
+ virtual HRESULT STDMETHODCALLTYPE CreateVideoProcessor(
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT MaxNumSubStreams,
|
|
+ IDirectXVideoProcessor **ppVidProcess) = 0;
|
|
+
|
|
+};
|
|
+#ifdef __CRT_UUID_DECL
|
|
+__CRT_UUID_DECL(IDirectXVideoProcessorService, 0xfc51a552, 0xd5e7, 0x11d9, 0xaf,0x55, 0x00,0x05,0x4e,0x43,0xff,0x02)
|
|
+#endif
|
|
+#else
|
|
+typedef struct IDirectXVideoProcessorServiceVtbl {
|
|
+ BEGIN_INTERFACE
|
|
+
|
|
+ /*** IUnknown methods ***/
|
|
+ HRESULT (STDMETHODCALLTYPE *QueryInterface)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFIID riid,
|
|
+ void **ppvObject);
|
|
+
|
|
+ ULONG (STDMETHODCALLTYPE *AddRef)(
|
|
+ IDirectXVideoProcessorService* This);
|
|
+
|
|
+ ULONG (STDMETHODCALLTYPE *Release)(
|
|
+ IDirectXVideoProcessorService* This);
|
|
+
|
|
+ /*** IDirectXVideoAccelerationService methods ***/
|
|
+ HRESULT (STDMETHODCALLTYPE *CreateSurface)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ UINT Width,
|
|
+ UINT Height,
|
|
+ UINT BackBuffers,
|
|
+ D3DFORMAT Format,
|
|
+ D3DPOOL Pool,
|
|
+ DWORD Usage,
|
|
+ DWORD DxvaType,
|
|
+ IDirect3DSurface9 **ppSurface,
|
|
+ HANDLE *pSharedHandle);
|
|
+
|
|
+ /*** IDirectXVideoProcessorService methods ***/
|
|
+ HRESULT (STDMETHODCALLTYPE *RegisterVideoProcessorSoftwareDevice)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ void *pCallbacks);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorDeviceGuids)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ GUID **pGuids);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorRenderTargets)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorSubStreamFormats)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetVideoProcessorCaps)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ DXVA2_VideoProcessorCaps *pCaps);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetProcAmpRange)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *GetFilterPropertyRange)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+
|
|
+ HRESULT (STDMETHODCALLTYPE *CreateVideoProcessor)(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT MaxNumSubStreams,
|
|
+ IDirectXVideoProcessor **ppVidProcess);
|
|
+
|
|
+ END_INTERFACE
|
|
+} IDirectXVideoProcessorServiceVtbl;
|
|
+interface IDirectXVideoProcessorService {
|
|
+ CONST_VTBL IDirectXVideoProcessorServiceVtbl* lpVtbl;
|
|
+};
|
|
+
|
|
+#ifdef COBJMACROS
|
|
+#ifndef WIDL_C_INLINE_WRAPPERS
|
|
+/*** IUnknown methods ***/
|
|
+#define IDirectXVideoProcessorService_QueryInterface(This,riid,ppvObject) (This)->lpVtbl->QueryInterface(This,riid,ppvObject)
|
|
+#define IDirectXVideoProcessorService_AddRef(This) (This)->lpVtbl->AddRef(This)
|
|
+#define IDirectXVideoProcessorService_Release(This) (This)->lpVtbl->Release(This)
|
|
+/*** IDirectXVideoAccelerationService methods ***/
|
|
+#define IDirectXVideoProcessorService_CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle) (This)->lpVtbl->CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle)
|
|
+/*** IDirectXVideoProcessorService methods ***/
|
|
+#define IDirectXVideoProcessorService_RegisterVideoProcessorSoftwareDevice(This,pCallbacks) (This)->lpVtbl->RegisterVideoProcessorSoftwareDevice(This,pCallbacks)
|
|
+#define IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids(This,pVideoDesc,pCount,pGuids) (This)->lpVtbl->GetVideoProcessorDeviceGuids(This,pVideoDesc,pCount,pGuids)
|
|
+#define IDirectXVideoProcessorService_GetVideoProcessorRenderTargets(This,VideoProcDeviceGuid,pVideoDesc,pCount,pFormats) (This)->lpVtbl->GetVideoProcessorRenderTargets(This,VideoProcDeviceGuid,pVideoDesc,pCount,pFormats)
|
|
+#define IDirectXVideoProcessorService_GetVideoProcessorSubStreamFormats(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCount,pFormats) (This)->lpVtbl->GetVideoProcessorSubStreamFormats(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCount,pFormats)
|
|
+#define IDirectXVideoProcessorService_GetVideoProcessorCaps(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCaps) (This)->lpVtbl->GetVideoProcessorCaps(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCaps)
|
|
+#define IDirectXVideoProcessorService_GetProcAmpRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,ProcAmpCap,pRange) (This)->lpVtbl->GetProcAmpRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,ProcAmpCap,pRange)
|
|
+#define IDirectXVideoProcessorService_GetFilterPropertyRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,FilterSetting,pRange) (This)->lpVtbl->GetFilterPropertyRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,FilterSetting,pRange)
|
|
+#define IDirectXVideoProcessorService_CreateVideoProcessor(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,MaxNumSubStreams,ppVidProcess) (This)->lpVtbl->CreateVideoProcessor(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,MaxNumSubStreams,ppVidProcess)
|
|
+#else
|
|
+/*** IUnknown methods ***/
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_QueryInterface(IDirectXVideoProcessorService* This,REFIID riid,void **ppvObject) {
|
|
+ return This->lpVtbl->QueryInterface(This,riid,ppvObject);
|
|
+}
|
|
+static FORCEINLINE ULONG IDirectXVideoProcessorService_AddRef(IDirectXVideoProcessorService* This) {
|
|
+ return This->lpVtbl->AddRef(This);
|
|
+}
|
|
+static FORCEINLINE ULONG IDirectXVideoProcessorService_Release(IDirectXVideoProcessorService* This) {
|
|
+ return This->lpVtbl->Release(This);
|
|
+}
|
|
+/*** IDirectXVideoAccelerationService methods ***/
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_CreateSurface(IDirectXVideoProcessorService* This,UINT Width,UINT Height,UINT BackBuffers,D3DFORMAT Format,D3DPOOL Pool,DWORD Usage,DWORD DxvaType,IDirect3DSurface9 **ppSurface,HANDLE *pSharedHandle) {
|
|
+ return This->lpVtbl->CreateSurface(This,Width,Height,BackBuffers,Format,Pool,Usage,DxvaType,ppSurface,pSharedHandle);
|
|
+}
|
|
+/*** IDirectXVideoProcessorService methods ***/
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_RegisterVideoProcessorSoftwareDevice(IDirectXVideoProcessorService* This,void *pCallbacks) {
|
|
+ return This->lpVtbl->RegisterVideoProcessorSoftwareDevice(This,pCallbacks);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids(IDirectXVideoProcessorService* This,const DXVA2_VideoDesc *pVideoDesc,UINT *pCount,GUID **pGuids) {
|
|
+ return This->lpVtbl->GetVideoProcessorDeviceGuids(This,pVideoDesc,pCount,pGuids);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetVideoProcessorRenderTargets(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,UINT *pCount,D3DFORMAT **pFormats) {
|
|
+ return This->lpVtbl->GetVideoProcessorRenderTargets(This,VideoProcDeviceGuid,pVideoDesc,pCount,pFormats);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetVideoProcessorSubStreamFormats(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,D3DFORMAT RenderTargetFormat,UINT *pCount,D3DFORMAT **pFormats) {
|
|
+ return This->lpVtbl->GetVideoProcessorSubStreamFormats(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCount,pFormats);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetVideoProcessorCaps(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,D3DFORMAT RenderTargetFormat,DXVA2_VideoProcessorCaps *pCaps) {
|
|
+ return This->lpVtbl->GetVideoProcessorCaps(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,pCaps);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetProcAmpRange(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,D3DFORMAT RenderTargetFormat,UINT ProcAmpCap,DXVA2_ValueRange *pRange) {
|
|
+ return This->lpVtbl->GetProcAmpRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,ProcAmpCap,pRange);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_GetFilterPropertyRange(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,D3DFORMAT RenderTargetFormat,UINT FilterSetting,DXVA2_ValueRange *pRange) {
|
|
+ return This->lpVtbl->GetFilterPropertyRange(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,FilterSetting,pRange);
|
|
+}
|
|
+static FORCEINLINE HRESULT IDirectXVideoProcessorService_CreateVideoProcessor(IDirectXVideoProcessorService* This,REFGUID VideoProcDeviceGuid,const DXVA2_VideoDesc *pVideoDesc,D3DFORMAT RenderTargetFormat,UINT MaxNumSubStreams,IDirectXVideoProcessor **ppVidProcess) {
|
|
+ return This->lpVtbl->CreateVideoProcessor(This,VideoProcDeviceGuid,pVideoDesc,RenderTargetFormat,MaxNumSubStreams,ppVidProcess);
|
|
+}
|
|
+#endif
|
|
+#endif
|
|
+
|
|
+#endif
|
|
+
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_RegisterVideoProcessorSoftwareDevice_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ void *pCallbacks);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_RegisterVideoProcessorSoftwareDevice_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ GUID **pGuids);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetVideoProcessorRenderTargets_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetVideoProcessorRenderTargets_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetVideoProcessorSubStreamFormats_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT *pCount,
|
|
+ D3DFORMAT **pFormats);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetVideoProcessorSubStreamFormats_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetVideoProcessorCaps_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ DXVA2_VideoProcessorCaps *pCaps);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetVideoProcessorCaps_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetProcAmpRange_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT ProcAmpCap,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetProcAmpRange_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_GetFilterPropertyRange_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT FilterSetting,
|
|
+ DXVA2_ValueRange *pRange);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_GetFilterPropertyRange_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+HRESULT STDMETHODCALLTYPE IDirectXVideoProcessorService_CreateVideoProcessor_Proxy(
|
|
+ IDirectXVideoProcessorService* This,
|
|
+ REFGUID VideoProcDeviceGuid,
|
|
+ const DXVA2_VideoDesc *pVideoDesc,
|
|
+ D3DFORMAT RenderTargetFormat,
|
|
+ UINT MaxNumSubStreams,
|
|
+ IDirectXVideoProcessor **ppVidProcess);
|
|
+void __RPC_STUB IDirectXVideoProcessorService_CreateVideoProcessor_Stub(
|
|
+ IRpcStubBuffer* This,
|
|
+ IRpcChannelBuffer* pRpcChannelBuffer,
|
|
+ PRPC_MESSAGE pRpcMessage,
|
|
+ DWORD* pdwStubPhase);
|
|
+
|
|
+#endif /* __IDirectXVideoProcessorService_INTERFACE_DEFINED__ */
|
|
+
|
|
#endif /* _D3D9_H_ */
|
|
+#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */
|
|
/* Begin additional prototypes for all interfaces */
|
|
|
|
|
|
diff --git a/mingw-w64-headers/include/dxva2api.idl b/mingw-w64-headers/include/dxva2api.idl
|
|
index 8aa03897..593973c4 100644
|
|
--- a/mingw-w64-headers/include/dxva2api.idl
|
|
+++ b/mingw-w64-headers/include/dxva2api.idl
|
|
@@ -6,6 +6,8 @@
|
|
|
|
import "unknwn.idl";
|
|
|
|
+cpp_quote("#include <winapifamily.h>")
|
|
+
|
|
/* Fake widl types */
|
|
cpp_quote("#if 0")
|
|
typedef DWORD IDirect3DDevice9;
|
|
@@ -14,12 +16,15 @@ typedef DWORD D3DFORMAT;
|
|
typedef DWORD D3DPOOL;
|
|
cpp_quote("#endif")
|
|
|
|
+cpp_quote("#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)")
|
|
+
|
|
interface IDirectXVideoDecoderService;
|
|
+interface IDirectXVideoProcessorService;
|
|
|
|
-cpp_quote("#ifndef __REFERENCE_TIME_DEFINED")
|
|
-cpp_quote("#define __REFERENCE_TIME_DEFINED")
|
|
-cpp_quote("typedef LONGLONG REFERENCE_TIME;")
|
|
-cpp_quote("#endif /*__REFERENCE_TIME_DEFINED*/")
|
|
+#ifndef __REFERENCE_TIME_DEFINED
|
|
+#define __REFERENCE_TIME_DEFINED
|
|
+typedef LONGLONG REFERENCE_TIME;
|
|
+#endif /*__REFERENCE_TIME_DEFINED*/
|
|
|
|
cpp_quote("#define DXVA2_ProcAmp_None 0x0000")
|
|
cpp_quote("#define DXVA2_ProcAmp_Brightness 0x0001")
|
|
@@ -142,19 +147,19 @@ cpp_quote(" DXVA2_VideoTransferMatrix_BT601 = 2,")
|
|
cpp_quote(" DXVA2_VideoTransferMatrix_SMPTE240M = 3 ")
|
|
cpp_quote("} DXVA2_VideoTransferMatrix;")
|
|
cpp_quote("")
|
|
-cpp_quote("typedef struct _DXVA2_AYUVSample16 {")
|
|
-cpp_quote(" USHORT Cr;")
|
|
-cpp_quote(" USHORT Cb;")
|
|
-cpp_quote(" USHORT Y;")
|
|
-cpp_quote(" USHORT Alpha;")
|
|
-cpp_quote("} DXVA2_AYUVSample16;")
|
|
-cpp_quote("")
|
|
-cpp_quote("typedef struct _DXVA2_AYUVSample8 {")
|
|
-cpp_quote(" UCHAR Cr;")
|
|
-cpp_quote(" UCHAR Cb;")
|
|
-cpp_quote(" UCHAR Y;")
|
|
-cpp_quote(" UCHAR Alpha;")
|
|
-cpp_quote("} DXVA2_AYUVSample8;")
|
|
+typedef struct _DXVA2_AYUVSample16 {
|
|
+ USHORT Cr;
|
|
+ USHORT Cb;
|
|
+ USHORT Y;
|
|
+ USHORT Alpha;
|
|
+} DXVA2_AYUVSample16;
|
|
+
|
|
+typedef struct _DXVA2_AYUVSample8 {
|
|
+ UCHAR Cr;
|
|
+ UCHAR Cb;
|
|
+ UCHAR Y;
|
|
+ UCHAR Alpha;
|
|
+} DXVA2_AYUVSample8;
|
|
|
|
typedef struct _DXVA2_ConfigPictureDecode {
|
|
GUID guidConfigBitstreamEncryption;
|
|
@@ -219,40 +224,40 @@ typedef struct _DXVA2_ExtendedFormat {
|
|
};
|
|
} DXVA2_ExtendedFormat;
|
|
|
|
-cpp_quote("typedef struct _DXVA2_Fixed32 {")
|
|
-cpp_quote(" __C89_NAMELESS union {")
|
|
-cpp_quote(" __C89_NAMELESS struct {")
|
|
-cpp_quote(" USHORT Fraction;")
|
|
-cpp_quote(" SHORT Value;")
|
|
-cpp_quote(" } DUMMYSTRUCTNAME;")
|
|
-cpp_quote(" LONG ll;")
|
|
-cpp_quote(" } DUMMYUNIONNAME;")
|
|
-cpp_quote("} DXVA2_Fixed32;")
|
|
-cpp_quote("")
|
|
-cpp_quote("typedef struct _DXVA2_FilterValues {")
|
|
-cpp_quote(" DXVA2_Fixed32 Level;")
|
|
-cpp_quote(" DXVA2_Fixed32 Threshold;")
|
|
-cpp_quote(" DXVA2_Fixed32 Radius;")
|
|
-cpp_quote("} DXVA2_FilterValues;")
|
|
+typedef struct _DXVA2_Fixed32 {
|
|
+ __C89_NAMELESS union {
|
|
+ __C89_NAMELESS struct {
|
|
+ USHORT Fraction;
|
|
+ SHORT Value;
|
|
+ } DUMMYSTRUCTNAME;
|
|
+ LONG ll;
|
|
+ } DUMMYUNIONNAME;
|
|
+} DXVA2_Fixed32;
|
|
+
|
|
+typedef struct _DXVA2_FilterValues {
|
|
+ DXVA2_Fixed32 Level;
|
|
+ DXVA2_Fixed32 Threshold;
|
|
+ DXVA2_Fixed32 Radius;
|
|
+} DXVA2_FilterValues;
|
|
|
|
typedef struct _DXVA2_Frequency {
|
|
UINT Numerator;
|
|
UINT Denominator;
|
|
} DXVA2_Frequency;
|
|
|
|
-cpp_quote("typedef struct _DXVA2_ProcAmpValues {")
|
|
-cpp_quote(" DXVA2_Fixed32 Brightness;")
|
|
-cpp_quote(" DXVA2_Fixed32 Contrast;")
|
|
-cpp_quote(" DXVA2_Fixed32 Hue;")
|
|
-cpp_quote(" DXVA2_Fixed32 Saturation;")
|
|
-cpp_quote("} DXVA2_ProcAmpValues;")
|
|
-cpp_quote("")
|
|
-cpp_quote("typedef struct _DXVA2_ValueRange {")
|
|
-cpp_quote(" DXVA2_Fixed32 MinValue;")
|
|
-cpp_quote(" DXVA2_Fixed32 MaxValue;")
|
|
-cpp_quote(" DXVA2_Fixed32 DefaultValue;")
|
|
-cpp_quote(" DXVA2_Fixed32 StepSize;")
|
|
-cpp_quote("} DXVA2_ValueRange;")
|
|
+typedef struct _DXVA2_ProcAmpValues {
|
|
+ DXVA2_Fixed32 Brightness;
|
|
+ DXVA2_Fixed32 Contrast;
|
|
+ DXVA2_Fixed32 Hue;
|
|
+ DXVA2_Fixed32 Saturation;
|
|
+} DXVA2_ProcAmpValues;
|
|
+
|
|
+typedef struct _DXVA2_ValueRange {
|
|
+ DXVA2_Fixed32 MinValue;
|
|
+ DXVA2_Fixed32 MaxValue;
|
|
+ DXVA2_Fixed32 DefaultValue;
|
|
+ DXVA2_Fixed32 StepSize;
|
|
+} DXVA2_ValueRange;
|
|
|
|
typedef struct _DXVA2_VideoDesc {
|
|
UINT SampleWidth;
|
|
@@ -317,57 +322,93 @@ cpp_quote("DXVA2_DetailFilterTech_Unknown")
|
|
cpp_quote("DXVA2_DetailFilterTech_Edge")
|
|
cpp_quote("DXVA2_DetailFilterTech_Sharpening")
|
|
cpp_quote("*/")
|
|
-cpp_quote("typedef struct _DXVA2_VideoProcessBltParams {")
|
|
-cpp_quote(" REFERENCE_TIME TargetFrame;")
|
|
-cpp_quote(" RECT TargetRect;")
|
|
-cpp_quote(" SIZE ConstrictionSize;")
|
|
-cpp_quote(" UINT StreamingFlags;")
|
|
-cpp_quote(" DXVA2_AYUVSample16 BackgroundColor;")
|
|
-cpp_quote(" DXVA2_ExtendedFormat DestFormat;")
|
|
-cpp_quote(" DXVA2_ProcAmpValues ProcAmpValues;")
|
|
-cpp_quote(" DXVA2_Fixed32 Alpha;")
|
|
-cpp_quote(" DXVA2_FilterValues NoiseFilterLuma;")
|
|
-cpp_quote(" DXVA2_FilterValues NoiseFilterChroma;")
|
|
-cpp_quote(" DXVA2_FilterValues DetailFilterLuma;")
|
|
-cpp_quote(" DXVA2_FilterValues DetailFilterChroma;")
|
|
-cpp_quote(" DWORD DestData;")
|
|
-cpp_quote("} DXVA2_VideoProcessBltParams;")
|
|
-cpp_quote("")
|
|
-cpp_quote("#ifdef _D3D9_H_")
|
|
-cpp_quote("typedef struct _DXVA2_VideoProcessorCaps {")
|
|
-cpp_quote(" UINT DeviceCaps;")
|
|
-cpp_quote(" D3DPOOL InputPool;")
|
|
-cpp_quote(" UINT NumForwardRefSamples;")
|
|
-cpp_quote(" UINT NumBackwardRefSamples;")
|
|
-cpp_quote(" UINT Reserved;")
|
|
-cpp_quote(" UINT DeinterlaceTechnology;")
|
|
-cpp_quote(" UINT ProcAmpControlCaps;")
|
|
-cpp_quote(" UINT VideoProcessorOperations;")
|
|
-cpp_quote(" UINT NoiseFilterTechnology;")
|
|
-cpp_quote(" UINT DetailFilterTechnology;")
|
|
-cpp_quote("} DXVA2_VideoProcessorCaps;")
|
|
-cpp_quote("#endif")
|
|
-cpp_quote("")
|
|
-cpp_quote("/* SampleData")
|
|
-cpp_quote("DXVA2_SampleData_RFF")
|
|
-cpp_quote("DXVA2_SampleData_TFF")
|
|
-cpp_quote("DXVA2_SampleData_RFF_TFF_Present")
|
|
-cpp_quote("*/")
|
|
-cpp_quote("")
|
|
-cpp_quote("#ifdef _D3D9_H_")
|
|
-cpp_quote("typedef struct _DXVA2_VideoSample {")
|
|
-cpp_quote(" REFERENCE_TIME Start;")
|
|
-cpp_quote(" REFERENCE_TIME End;")
|
|
-cpp_quote(" DXVA2_ExtendedFormat SampleFormat;")
|
|
-cpp_quote(" IDirect3DSurface9* SrcSurface;")
|
|
-cpp_quote(" RECT SrcRect;")
|
|
-cpp_quote(" RECT DstRect;")
|
|
-cpp_quote(" DXVA2_AYUVSample8 Pal[16];")
|
|
-cpp_quote(" DXVA2_Fixed32 PlanarAlpha;")
|
|
-cpp_quote(" DWORD SampleData;")
|
|
-cpp_quote("} DXVA2_VideoSample;")
|
|
-cpp_quote("#endif")
|
|
-cpp_quote("")
|
|
+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;
|
|
+
|
|
+#ifdef _D3D9_H_
|
|
+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;
|
|
+#endif
|
|
+
|
|
+cpp_quote("/* deinterlacing capabilities */")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_Unknown 0x0")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_BOBLineReplicate 0x1")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_BOBVerticalStretch 0x2")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_BOBVerticalStretch4Tap 0x4")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_MedianFiltering 0x8")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_EdgeFiltering 0x10")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_FieldAdaptive 0x20")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_PixelAdaptive 0x40")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_MotionVectorSteered 0x80")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_InverseTelecine 0x100")
|
|
+cpp_quote("#define DXVA2_DeinterlaceTech_Mask 0x1FF")
|
|
+
|
|
+cpp_quote("/* VideoProcessor capabilities */")
|
|
+cpp_quote("#define DXVA2_VideoProcess_None 0x0")
|
|
+cpp_quote("#define DXVA2_VideoProcess_YUV2RGB 0x1")
|
|
+cpp_quote("#define DXVA2_VideoProcess_StretchX 0x2")
|
|
+cpp_quote("#define DXVA2_VideoProcess_StretchY 0x4")
|
|
+cpp_quote("#define DXVA2_VideoProcess_AlphaBlend 0x8")
|
|
+cpp_quote("#define DXVA2_VideoProcess_SubRects 0x10")
|
|
+cpp_quote("#define DXVA2_VideoProcess_SubStreams 0x20")
|
|
+cpp_quote("#define DXVA2_VideoProcess_SubStreamsExtended 0x40")
|
|
+cpp_quote("#define DXVA2_VideoProcess_YUV2RGBExtended 0x80")
|
|
+cpp_quote("#define DXVA2_VideoProcess_AlphaBlendExtended 0x100")
|
|
+cpp_quote("#define DXVA2_VideoProcess_Constriction 0x200")
|
|
+cpp_quote("#define DXVA2_VideoProcess_NoiseFilter 0x400")
|
|
+cpp_quote("#define DXVA2_VideoProcess_DetailFilter 0x800")
|
|
+cpp_quote("#define DXVA2_VideoProcess_PlanarAlpha 0x1000")
|
|
+cpp_quote("#define DXVA2_VideoProcess_LinearScaling 0x2000")
|
|
+cpp_quote("#define DXVA2_VideoProcess_GammaCompensated 0x4000")
|
|
+cpp_quote("#define DXVA2_VideoProcess_MaintainsOriginalFieldData 0x8000")
|
|
+cpp_quote("#define DXVA2_VideoProcess_Mask 0xFFFF")
|
|
+
|
|
+cpp_quote("/* SampleData */")
|
|
+enum
|
|
+{
|
|
+ DXVA2_SampleData_RFF = 1,
|
|
+ DXVA2_SampleData_TFF = 2,
|
|
+ DXVA2_SampleData_RFF_TFF_Present = 4,
|
|
+ DXVA2_SampleData_Mask = 0xFFFF
|
|
+};
|
|
+
|
|
+#ifdef _D3D9_H_
|
|
+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;
|
|
+#endif
|
|
+
|
|
cpp_quote("/* Constants */")
|
|
cpp_quote("")
|
|
cpp_quote("#define DXVA2_VideoDecoderRenderTarget 0")
|
|
@@ -385,13 +426,13 @@ cpp_quote("#define DXVA2_BitStreamDateBufferType 6")
|
|
cpp_quote("#define DXVA2_MotionVectorBuffer 7")
|
|
cpp_quote("#define DXVA2_FilmGrainBuffer 8")
|
|
cpp_quote("")
|
|
-cpp_quote("__forceinline const DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {")
|
|
+cpp_quote("__forceinline DXVA2_Fixed32 DXVA2_Fixed32OpaqueAlpha (void) {")
|
|
cpp_quote(" DXVA2_Fixed32 f32;")
|
|
cpp_quote(" f32.ll = 0 + (1 << 16);")
|
|
cpp_quote(" return f32;")
|
|
cpp_quote("}")
|
|
cpp_quote("")
|
|
-cpp_quote("__forceinline const DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {")
|
|
+cpp_quote("__forceinline DXVA2_Fixed32 DXVA2_Fixed32TransparentAlpha (void) {")
|
|
cpp_quote(" DXVA2_Fixed32 f32;")
|
|
cpp_quote(" f32.ll = 0;")
|
|
cpp_quote(" return f32;")
|
|
@@ -481,4 +522,84 @@ interface IDirectXVideoDecoderService : IDirectXVideoAccelerationService
|
|
[in] UINT NumRenderTargets, [out] IDirectXVideoDecoder **ppDecode);
|
|
}
|
|
|
|
+[
|
|
+ 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* pHandleComplete);
|
|
+};
|
|
+
|
|
+[
|
|
+ object,
|
|
+ uuid(fc51a552-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);
|
|
+}
|
|
+
|
|
cpp_quote("#endif /* _D3D9_H_ */")
|
|
+
|
|
+cpp_quote("#endif /* WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP) */")
|
|
--
|
|
2.14.2
|
|
|