Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
0824d408
Commit
0824d408
authored
Nov 13, 2020
by
Nikolay Sivov
Committed by
Alexandre Julliard
Nov 13, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dxva2: Add a semi-stub for VideoProcessBlt().
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
f46e2394
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
49 additions
and
2 deletions
+49
-2
main.c
dlls/dxva2/main.c
+49
-2
No files found.
dlls/dxva2/main.c
View file @
0824d408
...
...
@@ -218,13 +218,60 @@ static HRESULT WINAPI video_processor_GetFilterPropertyRange(IDirectXVideoProces
return
E_NOTIMPL
;
}
static
BOOL
intersect_rect
(
RECT
*
dest
,
const
RECT
*
src1
,
const
RECT
*
src2
)
{
if
(
IsRectEmpty
(
src1
)
||
IsRectEmpty
(
src2
)
||
(
src1
->
left
>=
src2
->
right
)
||
(
src2
->
left
>=
src1
->
right
)
||
(
src1
->
top
>=
src2
->
bottom
)
||
(
src2
->
top
>=
src1
->
bottom
))
{
SetRectEmpty
(
dest
);
return
FALSE
;
}
dest
->
left
=
max
(
src1
->
left
,
src2
->
left
);
dest
->
right
=
min
(
src1
->
right
,
src2
->
right
);
dest
->
top
=
max
(
src1
->
top
,
src2
->
top
);
dest
->
bottom
=
min
(
src1
->
bottom
,
src2
->
bottom
);
return
TRUE
;
}
static
HRESULT
WINAPI
video_processor_VideoProcessBlt
(
IDirectXVideoProcessor
*
iface
,
IDirect3DSurface9
*
rt
,
const
DXVA2_VideoProcessBltParams
*
params
,
const
DXVA2_VideoSample
*
samples
,
UINT
sample_count
,
HANDLE
*
complete_handle
)
{
FIXME
(
"%p, %p, %p, %p, %u, %p.
\n
"
,
iface
,
rt
,
params
,
samples
,
sample_count
,
complete_handle
);
IDirect3DDevice9
*
device
;
unsigned
int
i
;
RECT
dst_rect
;
HRESULT
hr
;
return
E_NOTIMPL
;
TRACE
(
"%p, %p, %p, %p, %u, %p.
\n
"
,
iface
,
rt
,
params
,
samples
,
sample_count
,
complete_handle
);
if
(
FAILED
(
hr
=
IDirect3DSurface9_GetDevice
(
rt
,
&
device
)))
{
WARN
(
"Failed to get surface device, hr %#x.
\n
"
,
hr
);
return
hr
;
}
/* FIXME: use specified color */
IDirect3DDevice9_ColorFill
(
device
,
rt
,
NULL
,
0
);
for
(
i
=
0
;
i
<
sample_count
;
++
i
)
{
dst_rect
=
params
->
TargetRect
;
if
(
!
intersect_rect
(
&
dst_rect
,
&
dst_rect
,
&
samples
[
i
].
DstRect
))
continue
;
if
(
FAILED
(
hr
=
IDirect3DDevice9_StretchRect
(
device
,
samples
[
i
].
SrcSurface
,
&
samples
[
i
].
SrcRect
,
rt
,
&
dst_rect
,
D3DTEXF_POINT
)))
{
WARN
(
"Failed to copy sample %u, hr %#x.
\n
"
,
i
,
hr
);
}
}
IDirect3DDevice9_Release
(
device
);
return
S_OK
;
}
static
const
IDirectXVideoProcessorVtbl
video_processor_vtbl
=
...
...
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