Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
wine
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Package Registry
Container Registry
Model registry
Operate
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Yoann Laissus
wine
Commits
b3ec677d
Commit
b3ec677d
authored
23 years ago
by
Hidenori Takeshima
Committed by
Alexandre Julliard
23 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Added stub for ICImageCompress.
Implemented ICImageDecompress.
parent
7e266e9e
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
dlls/msvideo/msvfw32.spec
+2
-2
2 additions, 2 deletions
dlls/msvideo/msvfw32.spec
dlls/msvideo/msvideo_main.c
+149
-0
149 additions, 0 deletions
dlls/msvideo/msvideo_main.c
with
151 additions
and
2 deletions
dlls/msvideo/msvfw32.spec
+
2
−
2
View file @
b3ec677d
...
...
@@ -44,8 +44,8 @@ debug_channels (mci msvideo)
@ cdecl ICDrawBegin(long long long long long long long long long ptr long long long long long long) ICDrawBegin
@ stdcall ICGetDisplayFormat(long ptr ptr long long long) ICGetDisplayFormat
@ stdcall ICGetInfo(long ptr long) ICGetInfo
@ st
ub
ICImageCompress
@ st
ub
ICImageDecompress
@ st
dcall ICImageCompress(long long ptr ptr ptr long ptr)
ICImageCompress
@ st
dcall ICImageDecompress(long long ptr ptr ptr)
ICImageDecompress
@ stdcall ICInfo(long long ptr) ICInfo
@ stub ICInstall
@ stdcall ICLocate(long long ptr ptr long) ICLocate
...
...
This diff is collapsed.
Click to expand it.
dlls/msvideo/msvideo_main.c
+
149
−
0
View file @
b3ec677d
...
...
@@ -1182,3 +1182,152 @@ LRESULT WINAPI ICClose16(HIC16 hic) {
return
ICClose
(
hic
);
}
/***********************************************************************
* ICImageCompress [MSVFW32.@]
*/
HANDLE
VFWAPI
ICImageCompress
(
HIC
hic
,
UINT
uiFlags
,
LPBITMAPINFO
lpbiIn
,
LPVOID
lpBits
,
LPBITMAPINFO
lpbiOut
,
LONG
lQuality
,
LONG
*
plSize
)
{
FIXME
(
"(%08x,%08x,%p,%p,%p,%ld,%p)
\n
"
,
hic
,
uiFlags
,
lpbiIn
,
lpBits
,
lpbiOut
,
lQuality
,
plSize
);
return
(
HANDLE
)
NULL
;
}
/***********************************************************************
* ICImageDecompress [MSVFW32.@]
*/
HANDLE
VFWAPI
ICImageDecompress
(
HIC
hic
,
UINT
uiFlags
,
LPBITMAPINFO
lpbiIn
,
LPVOID
lpBits
,
LPBITMAPINFO
lpbiOut
)
{
HGLOBAL
hMem
=
(
HGLOBAL
)
NULL
;
BYTE
*
pMem
=
NULL
;
BOOL
bReleaseIC
=
FALSE
;
BYTE
*
pHdr
=
NULL
;
LONG
cbHdr
=
0
;
BOOL
bSucceeded
=
FALSE
;
BOOL
bInDecompress
=
FALSE
;
DWORD
biSizeImage
;
TRACE
(
"(%08x,%08x,%p,%p,%p)
\n
"
,
hic
,
uiFlags
,
lpbiIn
,
lpBits
,
lpbiOut
);
if
(
hic
==
(
HIC
)
NULL
)
{
hic
=
ICDecompressOpen
(
mmioFOURCC
(
'V'
,
'I'
,
'D'
,
'C'
),
0
,
&
lpbiIn
->
bmiHeader
,
(
lpbiOut
!=
NULL
)
?
&
lpbiOut
->
bmiHeader
:
NULL
);
if
(
hic
==
(
HIC
)
NULL
)
{
WARN
(
"no handler
\n
"
);
goto
err
;
}
bReleaseIC
=
TRUE
;
}
if
(
uiFlags
!=
0
)
{
FIXME
(
"unknown flag %08x
\n
"
,
uiFlags
);
goto
err
;
}
if
(
lpbiIn
==
NULL
||
lpBits
==
NULL
)
{
WARN
(
"invalid argument
\n
"
);
goto
err
;
}
if
(
lpbiOut
!=
NULL
)
{
if
(
lpbiOut
->
bmiHeader
.
biSize
!=
sizeof
(
BITMAPINFOHEADER
)
)
goto
err
;
cbHdr
=
sizeof
(
BITMAPINFOHEADER
);
if
(
lpbiOut
->
bmiHeader
.
biCompression
==
3
)
cbHdr
+=
sizeof
(
DWORD
)
*
3
;
else
if
(
lpbiOut
->
bmiHeader
.
biBitCount
<=
8
)
{
if
(
lpbiOut
->
bmiHeader
.
biClrUsed
==
0
)
cbHdr
+=
sizeof
(
RGBQUAD
)
*
(
1
<<
lpbiOut
->
bmiHeader
.
biBitCount
);
else
cbHdr
+=
sizeof
(
RGBQUAD
)
*
lpbiOut
->
bmiHeader
.
biClrUsed
;
}
}
else
{
TRACE
(
"get format
\n
"
);
cbHdr
=
ICDecompressGetFormatSize
(
hic
,
lpbiIn
);
if
(
cbHdr
<
sizeof
(
BITMAPINFOHEADER
)
)
goto
err
;
pHdr
=
(
BYTE
*
)
HeapAlloc
(
GetProcessHeap
(),
0
,
cbHdr
+
sizeof
(
RGBQUAD
)
*
256
);
if
(
pHdr
==
NULL
)
goto
err
;
ZeroMemory
(
pHdr
,
cbHdr
+
sizeof
(
RGBQUAD
)
*
256
);
if
(
ICDecompressGetFormat
(
hic
,
lpbiIn
,
(
BITMAPINFO
*
)
pHdr
)
!=
ICERR_OK
)
goto
err
;
lpbiOut
=
(
BITMAPINFO
*
)
pHdr
;
if
(
lpbiOut
->
bmiHeader
.
biBitCount
<=
8
&&
ICDecompressGetPalette
(
hic
,
lpbiIn
,
lpbiOut
)
!=
ICERR_OK
&&
lpbiIn
->
bmiHeader
.
biBitCount
==
lpbiOut
->
bmiHeader
.
biBitCount
)
{
if
(
lpbiIn
->
bmiHeader
.
biClrUsed
==
0
)
memcpy
(
lpbiOut
->
bmiColors
,
lpbiIn
->
bmiColors
,
sizeof
(
RGBQUAD
)
*
(
1
<<
lpbiOut
->
bmiHeader
.
biBitCount
)
);
else
memcpy
(
lpbiOut
->
bmiColors
,
lpbiIn
->
bmiColors
,
sizeof
(
RGBQUAD
)
*
lpbiIn
->
bmiHeader
.
biClrUsed
);
}
if
(
lpbiOut
->
bmiHeader
.
biBitCount
<=
8
&&
lpbiOut
->
bmiHeader
.
biClrUsed
==
0
)
lpbiOut
->
bmiHeader
.
biClrUsed
=
1
<<
lpbiOut
->
bmiHeader
.
biBitCount
;
lpbiOut
->
bmiHeader
.
biSize
=
sizeof
(
BITMAPINFOHEADER
);
cbHdr
=
sizeof
(
BITMAPINFOHEADER
)
+
sizeof
(
RGBQUAD
)
*
lpbiOut
->
bmiHeader
.
biClrUsed
;
}
biSizeImage
=
lpbiOut
->
bmiHeader
.
biSizeImage
;
if
(
biSizeImage
==
0
)
biSizeImage
=
((((
lpbiOut
->
bmiHeader
.
biWidth
*
lpbiOut
->
bmiHeader
.
biBitCount
+
7
)
>>
3
)
+
3
)
&
(
~
3
))
*
abs
(
lpbiOut
->
bmiHeader
.
biHeight
);
TRACE
(
"call ICDecompressBegin
\n
"
);
if
(
ICDecompressBegin
(
hic
,
lpbiIn
,
lpbiOut
)
!=
ICERR_OK
)
goto
err
;
bInDecompress
=
TRUE
;
TRACE
(
"cbHdr %ld, biSizeImage %ld
\n
"
,
cbHdr
,
biSizeImage
);
hMem
=
GlobalAlloc
(
GMEM_MOVEABLE
|
GMEM_ZEROINIT
,
cbHdr
+
biSizeImage
);
if
(
hMem
==
(
HGLOBAL
)
NULL
)
{
WARN
(
"out of memory
\n
"
);
goto
err
;
}
pMem
=
(
BYTE
*
)
GlobalLock
(
hMem
);
if
(
pMem
==
NULL
)
goto
err
;
memcpy
(
pMem
,
lpbiOut
,
cbHdr
);
TRACE
(
"call ICDecompress
\n
"
);
if
(
ICDecompress
(
hic
,
0
,
&
lpbiIn
->
bmiHeader
,
lpBits
,
&
lpbiOut
->
bmiHeader
,
pMem
+
cbHdr
)
!=
ICERR_OK
)
goto
err
;
bSucceeded
=
TRUE
;
err:
if
(
bInDecompress
)
ICDecompressEnd
(
hic
);
if
(
bReleaseIC
)
ICClose
(
hic
);
if
(
pHdr
!=
NULL
)
HeapFree
(
GetProcessHeap
(),
0
,
pHdr
);
if
(
pMem
!=
NULL
)
GlobalUnlock
(
hMem
);
if
(
!
bSucceeded
&&
hMem
!=
(
HGLOBAL
)
NULL
)
{
GlobalFree
(
hMem
);
hMem
=
(
HGLOBAL
)
NULL
;
}
return
(
HANDLE
)
hMem
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment