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
c96d34e8
Commit
c96d34e8
authored
Jan 04, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Jan 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat/tests: Add more RGB24 image size tests.
parent
bc467de5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
mfplat.c
dlls/mfplat/tests/mfplat.c
+10
-3
No files found.
dlls/mfplat/tests/mfplat.c
View file @
c96d34e8
...
@@ -4262,6 +4262,7 @@ image_size_tests[] =
...
@@ -4262,6 +4262,7 @@ image_size_tests[] =
{
&
MFVideoFormat_RGB565
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_RGB565
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_RGB24
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
{
&
MFVideoFormat_RGB24
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
{
&
MFVideoFormat_RGB24
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_RGB24
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_RGB24
,
4
,
3
,
36
,
0
,
192
,
36
,
64
},
{
&
MFVideoFormat_RGB32
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
{
&
MFVideoFormat_RGB32
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
{
&
MFVideoFormat_RGB32
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_RGB32
,
1
,
1
,
4
,
0
,
64
,
4
,
64
},
{
&
MFVideoFormat_ARGB32
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
{
&
MFVideoFormat_ARGB32
,
3
,
5
,
60
,
0
,
320
,
60
,
64
},
...
@@ -4278,6 +4279,7 @@ image_size_tests[] =
...
@@ -4278,6 +4279,7 @@ image_size_tests[] =
{
&
MEDIASUBTYPE_RGB565
,
1
,
1
,
4
},
{
&
MEDIASUBTYPE_RGB565
,
1
,
1
,
4
},
{
&
MEDIASUBTYPE_RGB24
,
3
,
5
,
60
},
{
&
MEDIASUBTYPE_RGB24
,
3
,
5
,
60
},
{
&
MEDIASUBTYPE_RGB24
,
1
,
1
,
4
},
{
&
MEDIASUBTYPE_RGB24
,
1
,
1
,
4
},
{
&
MEDIASUBTYPE_RGB24
,
4
,
3
,
36
},
{
&
MEDIASUBTYPE_RGB32
,
3
,
5
,
60
},
{
&
MEDIASUBTYPE_RGB32
,
3
,
5
,
60
},
{
&
MEDIASUBTYPE_RGB32
,
1
,
1
,
4
},
{
&
MEDIASUBTYPE_RGB32
,
1
,
1
,
4
},
...
@@ -4390,7 +4392,9 @@ static void test_MFCalculateImageSize(void)
...
@@ -4390,7 +4392,9 @@ static void test_MFCalculateImageSize(void)
hr
=
MFCalculateImageSize
(
ptr
->
subtype
,
ptr
->
width
,
ptr
->
height
,
&
size
);
hr
=
MFCalculateImageSize
(
ptr
->
subtype
,
ptr
->
width
,
ptr
->
height
,
&
size
);
todo_wine_if
(
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
todo_wine_if
(
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
ok
(
hr
==
S_OK
||
(
is_broken
&&
hr
==
E_INVALIDARG
),
"%u: failed to calculate image size, hr %#lx.
\n
"
,
i
,
hr
);
ok
(
hr
==
S_OK
||
(
is_broken
&&
hr
==
E_INVALIDARG
),
"%u: failed to calculate image size, hr %#lx.
\n
"
,
i
,
hr
);
todo_wine_if
(
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
todo_wine_if
(
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
)
||
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
))
ok
(
size
==
ptr
->
size
,
"%u: unexpected image size %u, expected %u. Size %u x %u, format %s.
\n
"
,
i
,
size
,
ptr
->
size
,
ok
(
size
==
ptr
->
size
,
"%u: unexpected image size %u, expected %u. Size %u x %u, format %s.
\n
"
,
i
,
size
,
ptr
->
size
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_an
((
char
*
)
&
ptr
->
subtype
->
Data1
,
4
));
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_an
((
char
*
)
&
ptr
->
subtype
->
Data1
,
4
));
}
}
...
@@ -4418,11 +4422,12 @@ static void test_MFGetPlaneSize(void)
...
@@ -4418,11 +4422,12 @@ static void test_MFGetPlaneSize(void)
const
struct
image_size_test
*
ptr
=
&
image_size_tests
[
i
];
const
struct
image_size_test
*
ptr
=
&
image_size_tests
[
i
];
unsigned
int
plane_size
=
ptr
->
plane_size
?
ptr
->
plane_size
:
ptr
->
size
;
unsigned
int
plane_size
=
ptr
->
plane_size
?
ptr
->
plane_size
:
ptr
->
size
;
if
((
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)))
if
((
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)))
plane_size
=
0
;
continue
;
hr
=
pMFGetPlaneSize
(
ptr
->
subtype
->
Data1
,
ptr
->
width
,
ptr
->
height
,
&
size
);
hr
=
pMFGetPlaneSize
(
ptr
->
subtype
->
Data1
,
ptr
->
width
,
ptr
->
height
,
&
size
);
ok
(
hr
==
S_OK
,
"%u: failed to get plane size, hr %#lx.
\n
"
,
i
,
hr
);
ok
(
hr
==
S_OK
,
"%u: failed to get plane size, hr %#lx.
\n
"
,
i
,
hr
);
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
)
||
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
))
ok
(
size
==
plane_size
,
"%u: unexpected plane size %lu, expected %u. Size %u x %u, format %s.
\n
"
,
i
,
size
,
plane_size
,
ok
(
size
==
plane_size
,
"%u: unexpected plane size %lu, expected %u. Size %u x %u, format %s.
\n
"
,
i
,
size
,
plane_size
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_an
((
char
*
)
&
ptr
->
subtype
->
Data1
,
4
));
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_an
((
char
*
)
&
ptr
->
subtype
->
Data1
,
4
));
}
}
...
@@ -5989,11 +5994,13 @@ static void test_MFCreate2DMediaBuffer(void)
...
@@ -5989,11 +5994,13 @@ static void test_MFCreate2DMediaBuffer(void)
hr
=
IMF2DBuffer_GetContiguousLength
(
_2dbuffer
,
&
length
);
hr
=
IMF2DBuffer_GetContiguousLength
(
_2dbuffer
,
&
length
);
ok
(
hr
==
S_OK
,
"Failed to get length, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to get length, hr %#lx.
\n
"
,
hr
);
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
)
ok
(
length
==
ptr
->
contiguous_length
,
"%d: unexpected contiguous length %lu for %u x %u, format %s.
\n
"
,
ok
(
length
==
ptr
->
contiguous_length
,
"%d: unexpected contiguous length %lu for %u x %u, format %s.
\n
"
,
i
,
length
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_guid
(
ptr
->
subtype
));
i
,
length
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_guid
(
ptr
->
subtype
));
hr
=
IMFMediaBuffer_Lock
(
buffer
,
&
data
,
&
length2
,
NULL
);
hr
=
IMFMediaBuffer_Lock
(
buffer
,
&
data
,
&
length2
,
NULL
);
ok
(
hr
==
S_OK
,
"Failed to lock buffer, hr %#lx.
\n
"
,
hr
);
ok
(
hr
==
S_OK
,
"Failed to lock buffer, hr %#lx.
\n
"
,
hr
);
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
)
ok
(
length2
==
ptr
->
contiguous_length
,
"%d: unexpected linear buffer length %lu for %u x %u, format %s.
\n
"
,
ok
(
length2
==
ptr
->
contiguous_length
,
"%d: unexpected linear buffer length %lu for %u x %u, format %s.
\n
"
,
i
,
length2
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_guid
(
ptr
->
subtype
));
i
,
length2
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_guid
(
ptr
->
subtype
));
...
...
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