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
aab254a1
Commit
aab254a1
authored
Jun 08, 2010
by
Jörg Höhle
Committed by
Alexandre Julliard
Jul 28, 2010
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
msvfw32/tests: Add ICDecompressQuery format tests.
parent
1fb67788
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
139 additions
and
1 deletion
+139
-1
msvfw.c
dlls/msvfw32/tests/msvfw.c
+139
-1
No files found.
dlls/msvfw32/tests/msvfw.c
View file @
aab254a1
/*
* Unit tests for video playback
*
* Copyright 2008 Jörg Höhle
* Copyright 2008
,2010
Jörg Höhle
* Copyright 2008 Austin English
*
* This library is free software; you can redistribute it and/or
...
...
@@ -63,7 +63,145 @@ static void test_OpenCase(void)
}
}
static
void
test_Locate
(
void
)
{
static
BITMAPINFOHEADER
bi
=
{
sizeof
(
BITMAPINFOHEADER
),
32
,
8
,
1
,
8
,
BI_RLE8
,
0
,
100000
,
100000
,
0
,
0
};
static
BITMAPINFOHEADER
bo
=
{
sizeof
(
BITMAPINFOHEADER
),
32
,
8
,
1
,
8
,
BI_RGB
,
0
,
100000
,
100000
,
0
,
0
};
HIC
h
;
DWORD
err
;
/* Oddly, MSDN documents that ICLocate takes BITMAPINFOHEADER
* pointers, while ICDecompressQuery takes the larger
* BITMAPINFO. Probably it's all the same as long as the
* variable length color quads are present when they are
* needed. */
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"RLE8->RGB failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
==
0
,
"RLE8->RGB height<0 succeeded
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bi
.
biCompression
=
mmioFOURCC
(
'c'
,
'v'
,
'i'
,
'd'
);
/* Cinepak */
h
=
ICOpen
(
ICTYPE_VIDEO
,
mmioFOURCC
(
'c'
,
'v'
,
'i'
,
'd'
),
ICMODE_DECOMPRESS
);
if
(
h
==
0
)
win_skip
(
"Cinepak/ICCVID codec not found
\n
"
);
else
{
bo
.
biBitCount
=
bi
.
biBitCount
=
32
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32: %d
\n
"
,
err
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
NULL
);
ok
(
err
==
ICERR_OK
,
"Query cvid 32: %d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
todo_wine
ok
(
err
==
ICERR_OK
,
"Query cvid->RGB32 height<0: %d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biBitCount
=
bi
.
biBitCount
=
8
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"cvid->RGB8 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"cvid->RGB8 height<0 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bo
.
biBitCount
=
bi
.
biBitCount
=
16
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"cvid->RGB16 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"cvid->RGB16 height<0 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bo
.
biBitCount
=
bi
.
biBitCount
=
32
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"cvid->RGB32 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"cvid->RGB32 height<0 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bi
.
biCompression
=
mmioFOURCC
(
'C'
,
'V'
,
'I'
,
'D'
);
/* Unlike ICOpen, upper case fails with ICLocate. */
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
==
0
,
"CVID->RGB32 upper case succeeded
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
bi
.
biCompression
=
mmioFOURCC
(
'M'
,
'S'
,
'V'
,
'C'
);
/* MS Video 1 */
bo
.
biBitCount
=
bi
.
biBitCount
=
16
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"MSVC->RGB16 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"MSVC->RGB16 height<0 failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bo
.
biHeight
--
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
==
0
,
"MSVC->RGB16 height too small succeeded
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bo
.
biHeight
++
;
/* ICLocate wants upper case MSVC */
bi
.
biCompression
=
mmioFOURCC
(
'm'
,
's'
,
'v'
,
'c'
);
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
==
0
,
"msvc->RGB16 succeeded
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bi
.
biCompression
=
mmioFOURCC
(
'M'
,
'S'
,
'V'
,
'C'
);
h
=
ICOpen
(
ICTYPE_VIDEO
,
mmioFOURCC
(
'M'
,
'S'
,
'V'
,
'C'
),
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"No MSVC codec installed!?
\n
"
);
if
(
h
!=
0
)
{
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16: %d
\n
"
,
err
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
NULL
);
ok
(
err
==
ICERR_OK
,
"Query MSVC 16: %d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
todo_wine
ok
(
err
==
ICERR_OK
,
"Query MSVC->RGB16 height<0: %d
\n
"
,
err
);
bo
.
biHeight
=
-
bo
.
biHeight
;
bi
.
biCompression
=
mmioFOURCC
(
'm'
,
's'
,
'v'
,
'c'
);
err
=
ICDecompressQuery
(
h
,
&
bi
,
&
bo
);
todo_wine
ok
(
err
==
ICERR_BADFORMAT
,
"Query msvc->RGB16: %d
\n
"
,
err
);
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
bi
.
biCompression
=
BI_RGB
;
bo
.
biBitCount
=
bi
.
biBitCount
=
8
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
todo_wine
ok
(
h
!=
0
,
"RGB8->RGB identity failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
bi
.
biCompression
=
BI_RLE8
;
h
=
ICLocate
(
ICTYPE_VIDEO
,
0
,
&
bi
,
&
bo
,
ICMODE_DECOMPRESS
);
ok
(
h
!=
0
,
"RLE8->RGB again failed
\n
"
);
if
(
h
)
ok
(
ICClose
(
h
)
==
ICERR_OK
,
"ICClose failed
\n
"
);
}
START_TEST
(
msvfw
)
{
test_OpenCase
();
test_Locate
();
}
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