Commit 67be089a authored by Ziqing Hui's avatar Ziqing Hui Committed by Alexandre Julliard

mfplat: Fix stride calculation for RGB24.

parent 3dd09ed8
......@@ -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 },
......
......@@ -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));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment