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
67be089a
Commit
67be089a
authored
Jan 04, 2023
by
Ziqing Hui
Committed by
Alexandre Julliard
Feb 07, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mfplat: Fix stride calculation for RGB24.
parent
3dd09ed8
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
7 deletions
+3
-7
mediatype.c
dlls/mfplat/mediatype.c
+1
-1
mfplat.c
dlls/mfplat/tests/mfplat.c
+2
-6
No files found.
dlls/mfplat/mediatype.c
View file @
67be089a
...
...
@@ -2631,7 +2631,7 @@ static int __cdecl uncompressed_video_format_compare(const void *a, const void *
static
const
struct
uncompressed_video_format
video_formats
[]
=
{
{
&
MFVideoFormat_RGB24
,
4
,
3
,
1
,
0
},
{
&
MFVideoFormat_RGB24
,
3
,
3
,
1
,
0
},
{
&
MFVideoFormat_ARGB32
,
4
,
3
,
1
,
0
},
{
&
MFVideoFormat_RGB32
,
4
,
3
,
1
,
0
},
{
&
MFVideoFormat_RGB565
,
2
,
3
,
1
,
0
},
...
...
dlls/mfplat/tests/mfplat.c
View file @
67be089a
...
...
@@ -4393,8 +4393,7 @@ static void test_MFCalculateImageSize(void)
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
);
todo_wine_if
(
is_MEDIASUBTYPE_RGB
(
ptr
->
subtype
)
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
)
||
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
))
||
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
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
));
}
...
...
@@ -4426,8 +4425,7 @@ static void test_MFGetPlaneSize(void)
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
);
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
)
||
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_RGB24
)
&&
ptr
->
width
%
4
==
0
))
todo_wine_if
(
IsEqualGUID
(
ptr
->
subtype
,
&
MFVideoFormat_NV11
))
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
));
}
...
...
@@ -5994,13 +5992,11 @@ static void test_MFCreate2DMediaBuffer(void)
hr
=
IMF2DBuffer_GetContiguousLength
(
_2dbuffer
,
&
length
);
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
"
,
i
,
length
,
ptr
->
width
,
ptr
->
height
,
wine_dbgstr_guid
(
ptr
->
subtype
));
hr
=
IMFMediaBuffer_Lock
(
buffer
,
&
data
,
&
length2
,
NULL
);
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
"
,
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