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
d190b0c6
Commit
d190b0c6
authored
Jan 02, 2014
by
Jacek Caban
Committed by
Alexandre Julliard
Jan 02, 2014
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msrle32: Properly set compression output flags.
parent
331cb13b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
6 deletions
+9
-6
msrle32.c
dlls/msrle32/msrle32.c
+8
-5
msrle.c
dlls/msrle32/tests/msrle.c
+1
-1
No files found.
dlls/msrle32/msrle32.c
View file @
d190b0c6
...
...
@@ -1420,6 +1420,7 @@ static LRESULT CompressBegin(CodecInfo *pi, LPCBITMAPINFOHEADER lpbiIn,
static
LRESULT
Compress
(
CodecInfo
*
pi
,
ICCOMPRESS
*
lpic
,
DWORD
dwSize
)
{
BOOL
is_key
;
int
i
;
TRACE
(
"(%p,%p,%u)
\n
"
,
pi
,
lpic
,
dwSize
);
...
...
@@ -1475,15 +1476,15 @@ static LRESULT Compress(CodecInfo *pi, ICCOMPRESS* lpic, DWORD dwSize)
pi
->
nPrevFrame
=
lpic
->
lFrameNum
;
}
is_key
=
(
lpic
->
dwFlags
&
ICCOMPRESS_KEYFRAME
)
!=
0
;
for
(
i
=
0
;
i
<
3
;
i
++
)
{
lpic
->
lpbiOutput
->
biSizeImage
=
0
;
if
(
lpic
->
lpbiOutput
->
biBitCount
==
4
)
MSRLE32_CompressRLE4
(
pi
,
lpic
->
lpbiInput
,
lpic
->
lpInput
,
lpic
->
lpbiOutput
,
lpic
->
lpOutput
,
(
lpic
->
dwFlags
&
ICCOMPRESS_KEYFRAME
)
!=
0
);
MSRLE32_CompressRLE4
(
pi
,
lpic
->
lpbiInput
,
lpic
->
lpInput
,
lpic
->
lpbiOutput
,
lpic
->
lpOutput
,
is_key
);
else
MSRLE32_CompressRLE8
(
pi
,
lpic
->
lpbiInput
,
lpic
->
lpInput
,
lpic
->
lpbiOutput
,
lpic
->
lpOutput
,
(
lpic
->
dwFlags
&
ICCOMPRESS_KEYFRAME
)
!=
0
);
MSRLE32_CompressRLE8
(
pi
,
lpic
->
lpbiInput
,
lpic
->
lpInput
,
lpic
->
lpbiOutput
,
lpic
->
lpOutput
,
is_key
);
if
(
lpic
->
dwFrameSize
==
0
||
lpic
->
lpbiOutput
->
biSizeImage
<
lpic
->
dwFrameSize
)
...
...
@@ -1500,7 +1501,7 @@ static LRESULT Compress(CodecInfo *pi, ICCOMPRESS* lpic, DWORD dwSize)
if
(
lpic
->
dwFrameSize
==
0
||
lpic
->
lpbiOutput
->
biSizeImage
<
lpic
->
dwFrameSize
)
{
WARN
(
"switched to keyframe, was small enough!
\n
"
);
*
lpic
->
lpdwFlags
|=
ICCOMPRESS_KEYFRAM
E
;
is_key
=
TRU
E
;
*
lpic
->
lpckid
=
MAKEAVICKID
(
cktypeDIBbits
,
StreamFromFOURCC
(
*
lpic
->
lpckid
));
break
;
...
...
@@ -1522,6 +1523,8 @@ static LRESULT Compress(CodecInfo *pi, ICCOMPRESS* lpic, DWORD dwSize)
pi
->
nPrevFrame
=
lpic
->
lFrameNum
;
}
/* FIXME: What is AVIIF_TWOCC? */
*
lpic
->
lpdwFlags
|=
AVIIF_TWOCC
|
(
is_key
?
AVIIF_KEYFRAME
:
0
);
return
ICERR_OK
;
}
...
...
dlls/msrle32/tests/msrle.c
View file @
d190b0c6
...
...
@@ -92,7 +92,7 @@ static void test_encode(void)
res
=
ICCompress
(
hic
,
ICCOMPRESS_KEYFRAME
,
output_header
,
buf
,
&
input_header
.
header
,
input1
,
0
,
&
flags
,
0
,
0
,
0
,
NULL
,
NULL
);
ok
(
res
==
ICERR_OK
,
"ICCompress failed: %ld
\n
"
,
res
);
test_output
(
buf
,
output_header
->
biSizeImage
,
output1
,
sizeof
(
output1
));
todo_wine
ok
(
flags
==
(
AVIIF_TWOCC
|
AVIIF_KEYFRAME
),
"flags = %x
\n
"
,
flags
);
ok
(
flags
==
(
AVIIF_TWOCC
|
AVIIF_KEYFRAME
),
"flags = %x
\n
"
,
flags
);
HeapFree
(
GetProcessHeap
(),
0
,
output_header
);
...
...
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