mfplat: Add corresponding 'IYUV' type alongside 'I420'.

Add references the 'IYUV' mediatype wherever 'I420' is referenced, as
they are identical.

Signed-off-by: Connor McAdams <cmcadams@codeweavers.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Connor McAdams 2021-04-13 12:40:51 -04:00 committed by Alexandre Julliard
parent 089b9d9029
commit 55228c2b2c
2 changed files with 13 additions and 0 deletions

View File

@ -2634,6 +2634,7 @@ static const struct uncompressed_video_format video_formats[] =
{ &MFVideoFormat_IMC2, 1, 0, 0, 1 },
{ &MFVideoFormat_IMC3, 2, 3, 0, 1 },
{ &MFVideoFormat_IMC4, 1, 0, 0, 1 },
{ &MFVideoFormat_IYUV, 1, 0, 0, 1 },
{ &MFVideoFormat_NV12, 1, 0, 0, 1 },
{ &MFVideoFormat_D16, 2, 3, 0, 0 },
{ &MFVideoFormat_L16, 2, 3, 0, 0 },
@ -2716,6 +2717,7 @@ HRESULT WINAPI MFCalculateImageSize(REFGUID subtype, UINT32 width, UINT32 height
case MAKEFOURCC('N','V','1','2'):
case MAKEFOURCC('Y','V','1','2'):
case MAKEFOURCC('I','4','2','0'):
case MAKEFOURCC('I','Y','U','V'):
/* 2 x 2 block, interleaving UV for half the height */
*size = ((width + 1) & ~1) * height * 3 / 2;
break;
@ -2758,6 +2760,7 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si
case MAKEFOURCC('N','V','1','2'):
case MAKEFOURCC('Y','V','1','2'):
case MAKEFOURCC('I','4','2','0'):
case MAKEFOURCC('I','Y','U','V'):
*size = stride * height * 3 / 2;
break;
default:

View File

@ -3979,6 +3979,12 @@ static void test_MFCalculateImageSize(void)
{ &MFVideoFormat_I420, 4, 3, 18 },
{ &MFVideoFormat_I420, 320, 240, 115200 },
{ &MFVideoFormat_IYUV, 1, 1, 3, 1 },
{ &MFVideoFormat_IYUV, 2, 1, 3 },
{ &MFVideoFormat_IYUV, 1, 2, 6, 3 },
{ &MFVideoFormat_IYUV, 4, 3, 18 },
{ &MFVideoFormat_IYUV, 320, 240, 115200 },
{ &MFVideoFormat_YUY2, 2, 1, 4 },
{ &MFVideoFormat_YUY2, 4, 3, 24 },
{ &MFVideoFormat_YUY2, 128, 128, 32768 },
@ -5307,6 +5313,10 @@ static void test_MFGetStrideForBitmapInfoHeader(void)
{ &MFVideoFormat_I420, 2, 2 },
{ &MFVideoFormat_I420, 3, 3 },
{ &MFVideoFormat_I420, 320, 320 },
{ &MFVideoFormat_IYUV, 1, 1 },
{ &MFVideoFormat_IYUV, 2, 2 },
{ &MFVideoFormat_IYUV, 3, 3 },
{ &MFVideoFormat_IYUV, 320, 320 },
};
unsigned int i;
LONG stride;