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
0070a00c
Commit
0070a00c
authored
Jun 07, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jun 07, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Accept AYUV as input format.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
b6ca5e50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
3 deletions
+20
-3
main.c
dlls/dxva2/main.c
+9
-3
dxva2.c
dlls/dxva2/tests/dxva2.c
+11
-0
No files found.
dlls/dxva2/main.c
View file @
0070a00c
...
...
@@ -377,6 +377,14 @@ static HRESULT WINAPI device_manager_processor_service_RegisterVideoProcessorSof
return
E_NOTIMPL
;
}
static
BOOL
dxva_is_supported_stream_format
(
const
DXVA2_VideoDesc
*
video_desc
)
{
return
video_desc
->
Format
==
D3DFMT_A8R8G8B8
||
video_desc
->
Format
==
D3DFMT_X8R8G8B8
||
video_desc
->
Format
==
D3DFMT_YUY2
||
video_desc
->
Format
==
MAKEFOURCC
(
'A'
,
'Y'
,
'U'
,
'V'
);
}
static
HRESULT
WINAPI
device_manager_processor_service_GetVideoProcessorDeviceGuids
(
IDirectXVideoProcessorService
*
iface
,
const
DXVA2_VideoDesc
*
video_desc
,
UINT
*
count
,
GUID
**
guids
)
{
...
...
@@ -399,9 +407,7 @@ static HRESULT WINAPI device_manager_processor_service_GetVideoProcessorRenderTa
if
(
IsEqualGUID
(
deviceguid
,
&
DXVA2_VideoProcSoftwareDevice
))
{
if
(
!
(
video_desc
->
Format
==
D3DFMT_A8R8G8B8
||
video_desc
->
Format
==
D3DFMT_X8R8G8B8
||
video_desc
->
Format
==
D3DFMT_YUY2
))
if
(
!
dxva_is_supported_stream_format
(
video_desc
))
{
WARN
(
"Unsupported content format %#x.
\n
"
,
video_desc
->
Format
);
return
E_FAIL
;
...
...
dlls/dxva2/tests/dxva2.c
View file @
0070a00c
...
...
@@ -111,6 +111,7 @@ static void test_device_manager(void)
D3DFMT_A8R8G8B8
,
D3DFMT_X8R8G8B8
,
D3DFMT_YUY2
,
MAKEFOURCC
(
'A'
,
'Y'
,
'U'
,
'V'
),
};
static
const
D3DFORMAT
rt_unsupported_formats
[]
=
{
...
...
@@ -354,6 +355,12 @@ static void test_device_manager(void)
init_video_desc
(
&
video_desc
,
rt_formats
[
i
]);
count
=
0
;
hr
=
IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
(
proc_service
,
&
video_desc
,
&
count
,
&
guids
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
count
>
0
,
"Unexpected device count.
\n
"
);
CoTaskMemFree
(
guids
);
count
=
0
;
hr
=
IDirectXVideoProcessorService_GetVideoProcessorRenderTargets
(
proc_service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
&
count
,
&
formats
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x, format %d.
\n
"
,
hr
,
rt_formats
[
i
]);
...
...
@@ -371,6 +378,10 @@ static void test_device_manager(void)
hr
=
IDirectXVideoProcessorService_GetVideoProcessorRenderTargets
(
proc_service
,
&
DXVA2_VideoProcSoftwareDevice
,
&
video_desc
,
&
count
,
&
formats
);
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#x, format %d.
\n
"
,
hr
,
rt_unsupported_formats
[
i
]);
hr
=
IDirectXVideoProcessorService_GetVideoProcessorDeviceGuids
(
proc_service
,
&
video_desc
,
&
count
,
&
guids
);
todo_wine
ok
(
hr
==
E_FAIL
,
"Unexpected hr %#x.
\n
"
,
hr
);
}
IDirectXVideoProcessorService_Release
(
proc_service
);
...
...
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