ReactOS 0.4.17-dev-934-g091855f
dxvahd.idl
Go to the documentation of this file.
1/*
2 * Copyright 2024 Elizabeth Figura for CodeWeavers
3 *
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.
8 *
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.
13 *
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
17 */
18
19import "unknwn.idl";
20
21cpp_quote("#if 0")
23cpp_quote("#endif")
24
25typedef enum _DXVAHD_BLT_STATE
26{
27 DXVAHD_BLT_STATE_TARGET_RECT = 0,
28 DXVAHD_BLT_STATE_BACKGROUND_COLOR = 1,
29 DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE = 2,
30 DXVAHD_BLT_STATE_ALPHA_FILL = 3,
31 DXVAHD_BLT_STATE_CONSTRICTION = 4,
32 DXVAHD_BLT_STATE_PRIVATE = 1000,
33} DXVAHD_BLT_STATE;
34
35typedef enum _DXVAHD_DEVICE_TYPE
36{
37 DXVAHD_DEVICE_TYPE_HARDWARE = 0,
38 DXVAHD_DEVICE_TYPE_SOFTWARE = 1,
39 DXVAHD_DEVICE_TYPE_REFERENCE = 2,
40 DXVAHD_DEVICE_TYPE_OTHER = 3,
41} DXVAHD_DEVICE_TYPE;
42
43typedef enum _DXVAHD_DEVICE_USAGE
44{
45 DXVAHD_DEVICE_USAGE_PLAYBACK_NORMAL = 0,
46 DXVAHD_DEVICE_USAGE_OPTIMAL_SPEED = 1,
47 DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY = 2,
48} DXVAHD_DEVICE_USAGE;
49
50typedef enum _DXVAHD_FILTER
51{
52 DXVAHD_FILTER_BRIGHTNESS = 0,
53 DXVAHD_FILTER_CONTRAST = 1,
54 DXVAHD_FILTER_HUE = 2,
55 DXVAHD_FILTER_SATURATION = 3,
56 DXVAHD_FILTER_NOISE_REDUCTION = 4,
57 DXVAHD_FILTER_EDGE_ENHANCEMENT = 5,
58 DXVAHD_FILTER_ANAMORPHIC_SCALING = 6,
59} DXVAHD_FILTER;
60
61typedef enum _DXVAHD_FRAME_FORMAT
62{
63 DXVAHD_FRAME_FORMAT_PROGRESSIVE = 0,
64 DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1,
65 DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2,
66} DXVAHD_FRAME_FORMAT;
67
68typedef enum _DXVAHD_STREAM_STATE
69{
70 DXVAHD_STREAM_STATE_D3DFORMAT = 0,
71 DXVAHD_STREAM_STATE_FRAME_FORMAT = 1,
72 DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE = 2,
73 DXVAHD_STREAM_STATE_OUTPUT_RATE = 3,
74 DXVAHD_STREAM_STATE_SOURCE_RECT = 4,
75 DXVAHD_STREAM_STATE_DESTINATION_RECT = 5,
76 DXVAHD_STREAM_STATE_ALPHA = 6,
77 DXVAHD_STREAM_STATE_PALETTE = 7,
78 DXVAHD_STREAM_STATE_LUMA_KEY = 8,
79 DXVAHD_STREAM_STATE_ASPECT_RATIO = 9,
80 DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS = 100,
81 DXVAHD_STREAM_STATE_FILTER_CONTRAST = 101,
82 DXVAHD_STREAM_STATE_FILTER_HUE = 102,
83 DXVAHD_STREAM_STATE_FILTER_SATURATION = 103,
84 DXVAHD_STREAM_STATE_FILTER_NOISE_REDUCTION = 104,
85 DXVAHD_STREAM_STATE_FILTER_EDGE_ENHANCEMENT = 105,
86 DXVAHD_STREAM_STATE_FILTER_ANAMORPHIC_SCALING = 106,
87 DXVAHD_STREAM_STATE_PRIVATE = 1000,
88} DXVAHD_STREAM_STATE;
89
90typedef enum _DXVAHD_SURFACE_TYPE
91{
92 DXVAHD_SURFACE_TYPE_VIDEO_INPUT = 0,
93 DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE = 1,
94 DXVAHD_SURFACE_TYPE_VIDEO_OUTPUT = 2,
95} DXVAHD_SURFACE_TYPE;
96
97typedef struct _DXVAHD_RATIONAL
98{
99 UINT Numerator;
100 UINT Denominator;
101} DXVAHD_RATIONAL;
102
103typedef struct _DXVAHD_CONTENT_DESC
104{
105 DXVAHD_FRAME_FORMAT InputFrameFormat;
106 DXVAHD_RATIONAL InputFrameRate;
107 UINT InputWidth;
108 UINT InputHeight;
109 DXVAHD_RATIONAL OutputFrameRate;
110 UINT OutputWidth;
111 UINT OutputHeight;
112} DXVAHD_CONTENT_DESC;
113
114typedef struct _DXVAHD_CUSTOM_RATE_DATA
115{
116 DXVAHD_RATIONAL CustomRate;
117 UINT OutputFrames;
118 BOOL InputInterlaced;
119 UINT InputFramesOrFields;
120} DXVAHD_CUSTOM_RATE_DATA;
121
122typedef struct _DXVAHD_FILTER_RANGE_DATA
123{
124 INT Minimum;
125 INT Maximum;
126 INT Default;
127 FLOAT Multiplier;
128} DXVAHD_FILTER_RANGE_DATA;
129
130typedef struct _DXVAHD_STREAM_DATA
131{
132 BOOL Enable;
133 UINT OutputIndex;
134 UINT InputFrameOrField;
135 UINT PastFrames;
136 UINT FutureFrames;
137 IDirect3DSurface9 **ppPastSurfaces;
138 IDirect3DSurface9 *pInputSurface;
139 IDirect3DSurface9 **ppFutureSurfaces;
140} DXVAHD_STREAM_DATA;
141
142typedef struct _DXVAHD_VPDEVCAPS
143{
144 DXVAHD_DEVICE_TYPE DeviceType;
145 UINT DeviceCaps;
146 UINT FeatureCaps;
147 UINT FilterCaps;
148 UINT InputFormatCaps;
149 D3DPOOL InputPool;
150 UINT OutputFormatCount;
151 UINT InputFormatCount;
152 UINT VideoProcessorCount;
153 UINT MaxInputStreams;
154 UINT MaxStreamStates;
155} DXVAHD_VPDEVCAPS;
156
157typedef struct _DXVAHD_VPCAPS
158{
159 GUID VPGuid;
160 UINT PastFrames;
161 UINT FutureFrames;
162 UINT ProcessorCaps;
163 UINT ITelecineCaps;
164 UINT CustomRateCount;
165} DXVAHD_VPCAPS;
166
167typedef HRESULT (__stdcall *PDXVAHDSW_Plugin)(UINT size, void *callbacks);
168
169[
170 object,
171 local,
172 uuid(95f4edf4-6e03-4cd7-be1b-3075d665aa52),
173]
174interface IDXVAHD_VideoProcessor : IUnknown
175{
176 HRESULT SetVideoProcessBltState(DXVAHD_BLT_STATE state, UINT size, const void *data);
177 HRESULT GetVideoProcessBltState(DXVAHD_BLT_STATE state, UINT size, void *data);
178 HRESULT SetVideoProcessStreamState(UINT stream_idx, DXVAHD_STREAM_STATE state, UINT size, const void *data);
179 HRESULT GetVideoProcessStreamState(UINT stream_idx, DXVAHD_STREAM_STATE state, UINT size, void *data);
180 HRESULT VideoProcessBltHD(IDirect3DSurface9 *surface, UINT frame_idx,
181 UINT stream_count, const DXVAHD_STREAM_DATA *streams);
182}
183
184[
185 object,
186 local,
187 uuid(95f12dfd-d77e-49be-815f-57d579634d6d),
188]
189interface IDXVAHD_Device : IUnknown
190{
191 HRESULT CreateVideoSurface(UINT width, UINT height, D3DFORMAT format, D3DPOOL pool, DWORD usage,
192 DXVAHD_SURFACE_TYPE type, UINT count, IDirect3DSurface9 **surfaces, HANDLE *shared_handle);
193 HRESULT GetVideoProcessorDeviceCaps(DXVAHD_VPDEVCAPS *caps);
194 HRESULT GetVideoProcessorOutputFormats(UINT count, D3DFORMAT *formats);
195 HRESULT GetVideoProcessorInputFormats(UINT count, D3DFORMAT *formats);
196 HRESULT GetVideoProcessorCaps(UINT count, DXVAHD_VPCAPS *caps);
197 HRESULT GetVideoProcessorCustomRates(const GUID *guid, UINT count, DXVAHD_CUSTOM_RATE_DATA *rates);
198 HRESULT GetVideoProcessorFilterRange(DXVAHD_FILTER filter, DXVAHD_FILTER_RANGE_DATA *range);
199 HRESULT CreateVideoProcessor(const GUID *guid, IDXVAHD_VideoProcessor **processor);
200}
201
202HRESULT __stdcall DXVAHD_CreateDevice(IDirect3DDevice9Ex *d3d9_device, const DXVAHD_CONTENT_DESC *desc,
203 DXVAHD_DEVICE_USAGE usage, PDXVAHDSW_Plugin plugin, IDXVAHD_Device **device);
CD3D10_BUFFER_DESC D3D10_BUFFER_DESC cpp_quote(" ~CD3D10_BUFFER_DESC() {}") operator const D3D10_BUFFER_DESC &() const
Definition: d3d10.idl:496
enum _D3DPOOL D3DPOOL
enum _D3DFORMAT D3DFORMAT
DWORD IDirect3DSurface9
Definition: dxva2api.idl:23
DWORD IDirect3DDevice9Ex
Definition: dxvahd.idl:22
unsigned long DWORD
Definition: ntddk_ex.h:95