From: Elizabeth Figura zfigura@codeweavers.com
--- include/Makefile.in | 1 + include/dxvahd.idl | 203 ++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 204 insertions(+) create mode 100644 include/dxvahd.idl
diff --git a/include/Makefile.in b/include/Makefile.in index 856a9f79b95..43614c50ed6 100644 --- a/include/Makefile.in +++ b/include/Makefile.in @@ -304,6 +304,7 @@ SOURCES = \ dxgitype.idl \ dxva.h \ dxva2api.idl \ + dxvahd.idl \ dyngraph.idl \ endpointvolume.idl \ errorrep.h \ diff --git a/include/dxvahd.idl b/include/dxvahd.idl new file mode 100644 index 00000000000..33401701d44 --- /dev/null +++ b/include/dxvahd.idl @@ -0,0 +1,203 @@ +/* + * Copyright 2024 Elizabeth Figura for CodeWeavers + * + * 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 IDirect3DDevice9Ex, IDirect3DSurface9, D3DFORMAT, D3DPOOL; +cpp_quote("#endif") + +typedef enum _DXVAHD_BLT_STATE +{ + DXVAHD_BLT_STATE_TARGET_RECT = 0, + DXVAHD_BLT_STATE_BACKGROUND_COLOR = 1, + DXVAHD_BLT_STATE_OUTPUT_COLOR_SPACE = 2, + DXVAHD_BLT_STATE_ALPHA_FILL = 3, + DXVAHD_BLT_STATE_CONSTRICTION = 4, + DXVAHD_BLT_STATE_PRIVATE = 1000, +} DXVAHD_BLT_STATE; + +typedef enum _DXVAHD_DEVICE_TYPE +{ + DXVAHD_DEVICE_TYPE_HARDWARE = 0, + DXVAHD_DEVICE_TYPE_SOFTWARE = 1, + DXVAHD_DEVICE_TYPE_REFERENCE = 2, + DXVAHD_DEVICE_TYPE_OTHER = 3, +} DXVAHD_DEVICE_TYPE; + +typedef enum _DXVAHD_DEVICE_USAGE +{ + DXVAHD_DEVICE_USAGE_PLAYBACK_NORMAL = 0, + DXVAHD_DEVICE_USAGE_OPTIMAL_SPEED = 1, + DXVAHD_DEVICE_USAGE_OPTIMAL_QUALITY = 2, +} DXVAHD_DEVICE_USAGE; + +typedef enum _DXVAHD_FILTER +{ + DXVAHD_FILTER_BRIGHTNESS = 0, + DXVAHD_FILTER_CONTRAST = 1, + DXVAHD_FILTER_HUE = 2, + DXVAHD_FILTER_SATURATION = 3, + DXVAHD_FILTER_NOISE_REDUCTION = 4, + DXVAHD_FILTER_EDGE_ENHANCEMENT = 5, + DXVAHD_FILTER_ANAMORPHIC_SCALING = 6, +} DXVAHD_FILTER; + +typedef enum _DXVAHD_FRAME_FORMAT +{ + DXVAHD_FRAME_FORMAT_PROGRESSIVE = 0, + DXVAHD_FRAME_FORMAT_INTERLACED_TOP_FIELD_FIRST = 1, + DXVAHD_FRAME_FORMAT_INTERLACED_BOTTOM_FIELD_FIRST = 2, +} DXVAHD_FRAME_FORMAT; + +typedef enum _DXVAHD_STREAM_STATE +{ + DXVAHD_STREAM_STATE_D3DFORMAT = 0, + DXVAHD_STREAM_STATE_FRAME_FORMAT = 1, + DXVAHD_STREAM_STATE_INPUT_COLOR_SPACE = 2, + DXVAHD_STREAM_STATE_OUTPUT_RATE = 3, + DXVAHD_STREAM_STATE_SOURCE_RECT = 4, + DXVAHD_STREAM_STATE_DESTINATION_RECT = 5, + DXVAHD_STREAM_STATE_ALPHA = 6, + DXVAHD_STREAM_STATE_PALETTE = 7, + DXVAHD_STREAM_STATE_LUMA_KEY = 8, + DXVAHD_STREAM_STATE_ASPECT_RATIO = 9, + DXVAHD_STREAM_STATE_FILTER_BRIGHTNESS = 100, + DXVAHD_STREAM_STATE_FILTER_CONTRAST = 101, + DXVAHD_STREAM_STATE_FILTER_HUE = 102, + DXVAHD_STREAM_STATE_FILTER_SATURATION = 103, + DXVAHD_STREAM_STATE_FILTER_NOISE_REDUCTION = 104, + DXVAHD_STREAM_STATE_FILTER_EDGE_ENHANCEMENT = 105, + DXVAHD_STREAM_STATE_FILTER_ANAMORPHIC_SCALING = 106, + DXVAHD_STREAM_STATE_PRIVATE = 1000, +} DXVAHD_STREAM_STATE; + +typedef enum _DXVAHD_SURFACE_TYPE +{ + DXVAHD_SURFACE_TYPE_VIDEO_INPUT = 0, + DXVAHD_SURFACE_TYPE_VIDEO_INPUT_PRIVATE = 1, + DXVAHD_SURFACE_TYPE_VIDEO_OUTPUT = 2, +} DXVAHD_SURFACE_TYPE; + +typedef struct _DXVAHD_RATIONAL +{ + UINT Numerator; + UINT Denominator; +} DXVAHD_RATIONAL; + +typedef struct _DXVAHD_CONTENT_DESC +{ + DXVAHD_FRAME_FORMAT InputFrameFormat; + DXVAHD_RATIONAL InputFrameRate; + UINT InputWidth; + UINT InputHeight; + DXVAHD_RATIONAL OutputFrameRate; + UINT OutputWidth; + UINT OutputHeight; +} DXVAHD_CONTENT_DESC; + +typedef struct _DXVAHD_CUSTOM_RATE_DATA +{ + DXVAHD_RATIONAL CustomRate; + UINT OutputFrames; + BOOL InputInterlaced; + UINT InputFramesOrFields; +} DXVAHD_CUSTOM_RATE_DATA; + +typedef struct _DXVAHD_FILTER_RANGE_DATA +{ + INT Minimum; + INT Maximum; + INT Default; + FLOAT Multiplier; +} DXVAHD_FILTER_RANGE_DATA; + +typedef struct _DXVAHD_STREAM_DATA +{ + BOOL Enable; + UINT OutputIndex; + UINT InputFrameOrField; + UINT PastFrames; + UINT FutureFrames; + IDirect3DSurface9 **ppPastSurfaces; + IDirect3DSurface9 *pInputSurface; + IDirect3DSurface9 **ppFutureSurfaces; +} DXVAHD_STREAM_DATA; + +typedef struct _DXVAHD_VPDEVCAPS +{ + DXVAHD_DEVICE_TYPE DeviceType; + UINT DeviceCaps; + UINT FeatureCaps; + UINT FilterCaps; + UINT InputFormatCaps; + D3DPOOL InputPool; + UINT OutputFormatCount; + UINT InputFormatCount; + UINT VideoProcessorCount; + UINT MaxInputStreams; + UINT MaxStreamStates; +} DXVAHD_VPDEVCAPS; + +typedef struct _DXVAHD_VPCAPS +{ + GUID VPGuid; + UINT PastFrames; + UINT FutureFrames; + UINT ProcessorCaps; + UINT ITelecineCaps; + UINT CustomRateCount; +} DXVAHD_VPCAPS; + +typedef HRESULT (__stdcall *PDXVAHDSW_Plugin)(UINT size, void *callbacks); + +[ + object, + local, + uuid(95f4edf4-6e03-4cd7-be1b-3075d665aa52), +] +interface IDXVAHD_VideoProcessor : IUnknown +{ + HRESULT SetVideoProcessBltState(DXVAHD_BLT_STATE state, UINT size, const void *data); + HRESULT GetVideoProcessBltState(DXVAHD_BLT_STATE state, UINT size, void *data); + HRESULT SetVideoProcessStreamState(UINT stream_idx, DXVAHD_STREAM_STATE state, UINT size, const void *data); + HRESULT GetVideoProcessStreamState(UINT stream_idx, DXVAHD_STREAM_STATE state, UINT size, void *data); + HRESULT VideoProcessBltHD(IDirect3DSurface9 *surface, UINT frame_idx, + UINT stream_count, const DXVAHD_STREAM_DATA *streams); +} + +[ + object, + local, + uuid(95f12dfd-d77e-49be-815f-57d579634d6d), +] +interface IDXVAHD_Device : IUnknown +{ + HRESULT CreateVideoSurface(UINT width, UINT height, D3DFORMAT format, D3DPOOL pool, DWORD usage, + DXVAHD_SURFACE_TYPE type, UINT count, IDirect3DSurface9 **surfaces, HANDLE *shared_handle); + HRESULT GetVideoProcessorDeviceCaps(DXVAHD_VPDEVCAPS *caps); + HRESULT GetVideoProcessorOutputFormats(UINT count, D3DFORMAT *formats); + HRESULT GetVideoProcessorInputFormats(UINT count, D3DFORMAT *formats); + HRESULT GetVideoProcessorCaps(UINT count, DXVAHD_VPCAPS *caps); + HRESULT GetVideoProcessorCustomRates(const GUID *guid, UINT count, DXVAHD_CUSTOM_RATE_DATA *rates); + HRESULT GetVideoProcessorFilterRange(DXVAHD_FILTER filter, DXVAHD_FILTER_RANGE_DATA *range); + HRESULT CreateVideoProcessor(const GUID *guid, IDXVAHD_VideoProcessor **processor); +} + +HRESULT __stdcall DXVAHD_CreateDevice(IDirect3DDevice9Ex *d3d9_device, const DXVAHD_CONTENT_DESC *desc, + DXVAHD_DEVICE_USAGE usage, PDXVAHDSW_Plugin plugin, IDXVAHD_Device **device);
From: Elizabeth Figura zfigura@codeweavers.com
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51432 --- dlls/dxva2/dxva2.spec | 1 + dlls/dxva2/main.c | 10 ++++++++++ 2 files changed, 11 insertions(+)
diff --git a/dlls/dxva2/dxva2.spec b/dlls/dxva2/dxva2.spec index 024a972697d..ea7a98718b0 100644 --- a/dlls/dxva2/dxva2.spec +++ b/dlls/dxva2/dxva2.spec @@ -1,6 +1,7 @@ @ stdcall CapabilitiesRequestAndCapabilitiesReply(ptr ptr long) @ stdcall DXVA2CreateDirect3DDeviceManager9(ptr ptr) @ stdcall DXVA2CreateVideoService(ptr ptr ptr) +@ stdcall DXVAHD_CreateDevice(ptr ptr long ptr ptr) @ stdcall DegaussMonitor(ptr) @ stdcall DestroyPhysicalMonitor(ptr) @ stdcall DestroyPhysicalMonitors(long ptr) diff --git a/dlls/dxva2/main.c b/dlls/dxva2/main.c index d48cf8de230..c74c0116d22 100644 --- a/dlls/dxva2/main.c +++ b/dlls/dxva2/main.c @@ -28,6 +28,7 @@ #include "highlevelmonitorconfigurationapi.h" #include "initguid.h" #include "dxva2api.h" +#include "dxvahd.h"
#include "wine/debug.h"
@@ -1361,3 +1362,12 @@ BOOL WINAPI SetVCPFeature( HMONITOR monitor, BYTE vcpCode, DWORD value ) SetLastError(ERROR_CALL_NOT_IMPLEMENTED); return FALSE; } + + +HRESULT WINAPI DXVAHD_CreateDevice(IDirect3DDevice9Ex *d3d9_device, const DXVAHD_CONTENT_DESC *desc, + DXVAHD_DEVICE_USAGE usage, PDXVAHDSW_Plugin plugin, IDXVAHD_Device **device) +{ + FIXME("d3d9_device %p, desc %p, usage %u, plugin %p, device %p, stub!\n", d3d9_device, desc, usage, plugin, device); + + return E_NOTIMPL; +}
Hi,
It looks like your patch introduced the new failures shown below. Please investigate and fix them before resubmitting your patch. If they are not new, fixing them anyway would help a lot. Otherwise please ask for the known failures list to be updated.
The tests also ran into some preexisting test failures. If you know how to fix them that would be helpful. See the TestBot job for the details:
The full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=149788
Your paranoid android.
=== debian11b (64 bit WoW report) ===
user32: input.c:4305: Test succeeded inside todo block: button_down_hwnd_todo 1: got MSG_TEST_WIN hwnd 0000000001BF00F6, msg WM_LBUTTONDOWN, wparam 0x1, lparam 0x320032 win.c:4070: Test failed: Expected active window 0000000002FF0150, got 0000000000000000. win.c:4071: Test failed: Expected focus window 0000000002FF0150, got 0000000000000000.