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
79ce998e
Commit
79ce998e
authored
May 16, 2023
by
Anton Baskanov
Committed by
Alexandre Julliard
May 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ir50_32: Let video_decoder flip the video instead of doing it manually.
Fixes upside-down videos in multiple games (e.g. Hard Truck 2, Firestarter).
parent
c73e8b85
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
7 deletions
+10
-7
ir50.c
dlls/ir50_32/ir50.c
+10
-7
No files found.
dlls/ir50_32/ir50.c
View file @
79ce998e
...
...
@@ -145,6 +145,7 @@ static LRESULT IV50_DecompressBegin( IMFTransform *decoder, LPBITMAPINFO in, LPB
IMFMediaType
*
input_type
,
*
output_type
;
const
GUID
*
output_subtype
;
LRESULT
r
=
ICERR_INTERNAL
;
unsigned
int
stride
;
TRACE
(
"ICM_DECOMPRESS_BEGIN %p %p %p
\n
"
,
decoder
,
in
,
out
);
...
...
@@ -160,6 +161,10 @@ static LRESULT IV50_DecompressBegin( IMFTransform *decoder, LPBITMAPINFO in, LPB
else
return
ICERR_BADFORMAT
;
stride
=
(
out
->
bmiHeader
.
biWidth
+
3
)
&
~
3
;
if
(
out
->
bmiHeader
.
biHeight
>=
0
)
stride
=
-
stride
;
if
(
FAILED
(
MFCreateMediaType
(
&
input_type
))
)
return
ICERR_INTERNAL
;
...
...
@@ -184,6 +189,8 @@ static LRESULT IV50_DecompressBegin( IMFTransform *decoder, LPBITMAPINFO in, LPB
output_type
,
&
MF_MT_FRAME_SIZE
,
make_uint64
(
out
->
bmiHeader
.
biWidth
,
abs
(
out
->
bmiHeader
.
biHeight
)
)
))
)
goto
done
;
if
(
FAILED
(
IMFMediaType_SetUINT32
(
output_type
,
&
MF_MT_DEFAULT_STRIDE
,
stride
))
)
goto
done
;
if
(
FAILED
(
IMFTransform_SetInputType
(
decoder
,
0
,
input_type
,
0
))
||
FAILED
(
IMFTransform_SetOutputType
(
decoder
,
0
,
output_type
,
0
))
)
...
...
@@ -252,17 +259,13 @@ static LRESULT IV50_Decompress( IMFTransform *decoder, ICDECOMPRESS *icd, DWORD
{
LONG
width
=
icd
->
lpbiOutput
->
biWidth
*
(
icd
->
lpbiOutput
->
biBitCount
/
8
);
LONG
height
=
abs
(
icd
->
lpbiOutput
->
biHeight
);
LONG
data_stride
=
(
width
+
3
)
&
~
3
;
LONG
out_stride
=
icd
->
lpbiOutput
->
biHeight
>=
0
?
-
data_stride
:
data_stride
;
BYTE
*
output_start
=
(
BYTE
*
)
icd
->
lpOutput
;
if
(
out_stride
<
0
)
output_start
+=
(
height
-
1
)
*
abs
(
out_stride
);
LONG
stride
=
(
width
+
3
)
&
~
3
;
BYTE
*
output
=
(
BYTE
*
)
icd
->
lpOutput
;
if
(
FAILED
(
IMFMediaBuffer_Lock
(
out_buf
,
&
data
,
NULL
,
NULL
)))
goto
done
;
MFCopyImage
(
output
_start
,
out_stride
,
data
,
data_
stride
,
width
,
height
);
MFCopyImage
(
output
,
stride
,
data
,
stride
,
width
,
height
);
IMFMediaBuffer_Unlock
(
out_buf
);
r
=
ICERR_OK
;
...
...
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