Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
ef584679
Commit
ef584679
authored
Nov 02, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 02, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Add GetVideoProcessorCaps() for software device.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
805b3e46
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
6 deletions
+60
-6
main.c
dlls/dxva2/main.c
+19
-2
dxva2.c
dlls/dxva2/tests/dxva2.c
+41
-4
No files found.
dlls/dxva2/main.c
View file @
ef584679
...
...
@@ -204,9 +204,26 @@ static HRESULT WINAPI video_processor_GetCreationParameters(IDirectXVideoProcess
static
HRESULT
WINAPI
video_processor_GetVideoProcessorCaps
(
IDirectXVideoProcessor
*
iface
,
DXVA2_VideoProcessorCaps
*
caps
)
{
FIXME
(
"%p, %p.
\n
"
,
iface
,
caps
);
struct
video_processor
*
processor
=
impl_from_IDirectXVideoProcessor
(
iface
);
return
E_NOTIMPL
;
TRACE
(
"%p, %p.
\n
"
,
iface
,
caps
);
if
(
IsEqualGUID
(
&
processor
->
device
,
&
DXVA2_VideoProcSoftwareDevice
))
{
memset
(
caps
,
0
,
sizeof
(
*
caps
));
caps
->
DeviceCaps
=
DXVA2_VPDev_SoftwareDevice
;
caps
->
InputPool
=
D3DPOOL_SYSTEMMEM
;
caps
->
VideoProcessorOperations
=
DXVA2_VideoProcess_PlanarAlpha
|
DXVA2_VideoProcess_YUV2RGB
|
DXVA2_VideoProcess_StretchX
|
DXVA2_VideoProcess_StretchY
|
DXVA2_VideoProcess_SubRects
|
DXVA2_VideoProcess_SubStreams
|
DXVA2_VideoProcess_SubStreamsExtended
|
DXVA2_VideoProcess_YUV2RGBExtended
;
}
else
{
FIXME
(
"Unsupported device %s.
\n
"
,
debugstr_guid
(
&
processor
->
device
));
return
E_FAIL
;
}
return
S_OK
;
}
static
HRESULT
WINAPI
video_processor_GetProcAmpRange
(
IDirectXVideoProcessor
*
iface
,
UINT
cap
,
DXVA2_ValueRange
*
range
)
...
...
dlls/dxva2/tests/dxva2.c
View file @
ef584679
...
...
@@ -420,17 +420,18 @@ done:
static
void
test_video_processor
(
void
)
{
IDirectXVideoProcessorService
*
service
,
*
service2
;
IDirect
3DDevice9
*
device
;
IDirect
XVideoProcessor
*
processor
,
*
processor2
;
IDirect3DDeviceManager9
*
manager
;
DXVA2_VideoProcessorCaps
caps
;
DXVA2_VideoDesc
video_desc
;
IDirect3DDevice9
*
device
;
HANDLE
handle
,
handle1
;
D3DFORMAT
format
;
IDirect3D9
*
d3d
;
HWND
window
;
UINT
token
;
HRESULT
hr
;
IDirectXVideoProcessor
*
processor
,
*
processor2
;
DXVA2_VideoDesc
video_desc
;
GUID
guid
;
D3DFORMAT
format
;
window
=
create_window
();
d3d
=
Direct3DCreate9
(
D3D_SDK_VERSION
);
...
...
@@ -466,10 +467,46 @@ static void test_video_processor(void)
video_desc
.
SampleHeight
=
64
;
video_desc
.
Format
=
D3DFMT_A8R8G8B8
;
/* Number of substreams does not include reference stream. */
hr
=
IDirectXVideoProcessorService_CreateVideoProcessor
(
service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
D3DFMT_A8R8G8B8
,
16
,
&
processor
);
todo_wine
ok
(
hr
==
E_INVALIDARG
,
"Unexpected hr %#x.
\n
"
,
hr
);
if
(
SUCCEEDED
(
hr
))
IDirectXVideoProcessor_Release
(
processor
);
hr
=
IDirectXVideoProcessorService_CreateVideoProcessor
(
service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
D3DFMT_A8R8G8B8
,
15
,
&
processor
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IDirectXVideoProcessor_Release
(
processor
);
hr
=
IDirectXVideoProcessorService_CreateVideoProcessor
(
service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
D3DFMT_A8R8G8B8
,
0
,
&
processor
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
IDirectXVideoProcessor_Release
(
processor
);
hr
=
IDirectXVideoProcessorService_CreateVideoProcessor
(
service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
D3DFMT_A8R8G8B8
,
1
,
&
processor
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IDirectXVideoProcessor_GetVideoProcessorCaps
(
processor
,
&
caps
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
caps
.
DeviceCaps
==
DXVA2_VPDev_SoftwareDevice
,
"Unexpected device type %#x.
\n
"
,
caps
.
DeviceCaps
);
ok
(
caps
.
InputPool
==
D3DPOOL_SYSTEMMEM
,
"Unexpected input pool %#x.
\n
"
,
caps
.
InputPool
);
ok
(
!
caps
.
NumForwardRefSamples
,
"Unexpected sample count.
\n
"
);
ok
(
!
caps
.
NumBackwardRefSamples
,
"Unexpected sample count.
\n
"
);
ok
(
!
caps
.
Reserved
,
"Unexpected field.
\n
"
);
ok
(
caps
.
DeinterlaceTechnology
==
DXVA2_DeinterlaceTech_Unknown
,
"Unexpected deinterlace technology %#x.
\n
"
,
caps
.
DeinterlaceTechnology
);
ok
(
!
caps
.
ProcAmpControlCaps
,
"Unexpected proc amp mask %#x.
\n
"
,
caps
.
ProcAmpControlCaps
);
ok
(
caps
.
VideoProcessorOperations
==
(
DXVA2_VideoProcess_PlanarAlpha
|
DXVA2_VideoProcess_YUV2RGB
|
DXVA2_VideoProcess_StretchX
|
DXVA2_VideoProcess_StretchY
|
DXVA2_VideoProcess_SubRects
|
DXVA2_VideoProcess_SubStreams
|
DXVA2_VideoProcess_SubStreamsExtended
|
DXVA2_VideoProcess_YUV2RGBExtended
),
"Unexpected processor operations %#x.
\n
"
,
caps
.
VideoProcessorOperations
);
ok
(
caps
.
NoiseFilterTechnology
==
DXVA2_NoiseFilterTech_Unsupported
,
"Unexpected noise filter technology %#x.
\n
"
,
caps
.
NoiseFilterTechnology
);
ok
(
caps
.
DetailFilterTechnology
==
DXVA2_DetailFilterTech_Unsupported
,
"Unexpected detail filter technology %#x.
\n
"
,
caps
.
DetailFilterTechnology
);
hr
=
IDirectXVideoProcessorService_CreateVideoProcessor
(
service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
D3DFMT_A8R8G8B8
,
1
,
&
processor2
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment