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
d4178020
Commit
d4178020
authored
Jun 19, 2020
by
Zebediah Figura
Committed by
Alexandre Julliard
Jun 20, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
quartz/vmr9: Align the source pitch to a multiple of 4.
Signed-off-by:
Zebediah Figura
<
z.figura12@gmail.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
717784ef
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
5 deletions
+6
-5
vmr9.c
dlls/quartz/vmr9.c
+6
-5
No files found.
dlls/quartz/vmr9.c
View file @
d4178020
...
@@ -211,8 +211,8 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
...
@@ -211,8 +211,8 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
{
{
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
struct
quartz_vmr
*
filter
=
impl_from_IBaseFilter
(
&
iface
->
filter
.
IBaseFilter_iface
);
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
const
HANDLE
events
[
2
]
=
{
filter
->
run_event
,
filter
->
renderer
.
flush_event
};
unsigned
int
data_size
,
width
,
depth
,
src_pitch
;
const
BITMAPINFOHEADER
*
bitmap_header
;
const
BITMAPINFOHEADER
*
bitmap_header
;
unsigned
int
data_size
,
width
,
depth
;
REFERENCE_TIME
start_time
,
end_time
;
REFERENCE_TIME
start_time
,
end_time
;
VMR9PresentationInfo
info
=
{};
VMR9PresentationInfo
info
=
{};
D3DLOCKED_RECT
locked_rect
;
D3DLOCKED_RECT
locked_rect
;
...
@@ -261,6 +261,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
...
@@ -261,6 +261,7 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
width
=
bitmap_header
->
biWidth
;
width
=
bitmap_header
->
biWidth
;
height
=
bitmap_header
->
biHeight
;
height
=
bitmap_header
->
biHeight
;
depth
=
bitmap_header
->
biBitCount
;
depth
=
bitmap_header
->
biBitCount
;
src_pitch
=
((
width
*
depth
/
8
)
+
3
)
&
~
3
;
info
.
rtStart
=
start_time
;
info
.
rtStart
=
start_time
;
info
.
rtEnd
=
end_time
;
info
.
rtEnd
=
end_time
;
...
@@ -285,21 +286,21 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
...
@@ -285,21 +286,21 @@ static HRESULT WINAPI VMR9_DoRenderSample(struct strmbase_renderer *iface, IMedi
{
{
dst
-=
locked_rect
.
Pitch
;
dst
-=
locked_rect
.
Pitch
;
memcpy
(
dst
,
src
,
width
*
depth
/
8
);
memcpy
(
dst
,
src
,
width
*
depth
/
8
);
src
+=
width
*
depth
/
8
;
src
+=
src_pitch
;
}
}
}
}
else
if
(
locked_rect
.
Pitch
!=
width
*
depth
/
8
)
else
if
(
locked_rect
.
Pitch
!=
src_pitch
)
{
{
BYTE
*
dst
=
locked_rect
.
pBits
;
BYTE
*
dst
=
locked_rect
.
pBits
;
const
BYTE
*
src
=
data
;
const
BYTE
*
src
=
data
;
TRACE
(
"Source pitch %u does not match dest pitch %u; copying manually.
\n
"
,
TRACE
(
"Source pitch %u does not match dest pitch %u; copying manually.
\n
"
,
width
*
depth
/
8
,
locked_rect
.
Pitch
);
src_pitch
,
locked_rect
.
Pitch
);
while
(
height
--
)
while
(
height
--
)
{
{
memcpy
(
dst
,
src
,
width
*
depth
/
8
);
memcpy
(
dst
,
src
,
width
*
depth
/
8
);
src
+=
width
*
depth
/
8
;
src
+=
src_pitch
;
dst
+=
locked_rect
.
Pitch
;
dst
+=
locked_rect
.
Pitch
;
}
}
}
}
...
...
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