Commit 2c1c5cc2 authored by Nikolay Sivov's avatar Nikolay Sivov Committed by Alexandre Julliard

mfplat: Add some more YUV formats data.

parent ba014235
...@@ -29,6 +29,11 @@ ...@@ -29,6 +29,11 @@
WINE_DEFAULT_DEBUG_CHANNEL(mfplat); WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC1, MAKEFOURCC('I','M','C','1'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC4, MAKEFOURCC('I','M','C','4'));
struct media_type struct media_type
{ {
struct attributes attributes; struct attributes attributes;
...@@ -1785,9 +1790,15 @@ static const struct uncompressed_video_format video_formats[] = ...@@ -1785,9 +1790,15 @@ static const struct uncompressed_video_format video_formats[] =
{ &MFVideoFormat_A2R10G10B10, 4, 3, 1 }, { &MFVideoFormat_A2R10G10B10, 4, 3, 1 },
{ &MFVideoFormat_RGB8, 1, 3, 1 }, { &MFVideoFormat_RGB8, 1, 3, 1 },
{ &MFVideoFormat_L8, 1, 3, 1 }, { &MFVideoFormat_L8, 1, 3, 1 },
{ &MFVideoFormat_AYUV, 4, 3, 0 },
{ &MFVideoFormat_IMC1, 2, 3, 0 },
{ &MFVideoFormat_IMC2, 1, 0, 0 },
{ &MFVideoFormat_IMC3, 2, 3, 0 },
{ &MFVideoFormat_IMC4, 1, 0, 0 },
{ &MFVideoFormat_NV12, 1, 0, 0 }, { &MFVideoFormat_NV12, 1, 0, 0 },
{ &MFVideoFormat_D16, 2, 3, 0 }, { &MFVideoFormat_D16, 2, 3, 0 },
{ &MFVideoFormat_L16, 2, 3, 0 }, { &MFVideoFormat_L16, 2, 3, 0 },
{ &MFVideoFormat_YV12, 1, 0, 0 },
{ &MFVideoFormat_A16B16G16R16F, 8, 3, 1 }, { &MFVideoFormat_A16B16G16R16F, 8, 3, 1 },
}; };
...@@ -1852,7 +1863,10 @@ HRESULT WINAPI MFCalculateImageSize(REFGUID subtype, UINT32 width, UINT32 height ...@@ -1852,7 +1863,10 @@ HRESULT WINAPI MFCalculateImageSize(REFGUID subtype, UINT32 width, UINT32 height
switch (subtype->Data1) switch (subtype->Data1)
{ {
case MAKEFOURCC('I','M','C','2'):
case MAKEFOURCC('I','M','C','4'):
case MAKEFOURCC('N','V','1','2'): case MAKEFOURCC('N','V','1','2'):
case MAKEFOURCC('Y','V','1','2'):
/* 2 x 2 block, interleaving UV for half the height */ /* 2 x 2 block, interleaving UV for half the height */
*size = ((width + 1) & ~1) * height * 3 / 2; *size = ((width + 1) & ~1) * height * 3 / 2;
break; break;
...@@ -1890,7 +1904,10 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si ...@@ -1890,7 +1904,10 @@ HRESULT WINAPI MFGetPlaneSize(DWORD fourcc, DWORD width, DWORD height, DWORD *si
switch (fourcc) switch (fourcc)
{ {
case MAKEFOURCC('I','M','C','2'):
case MAKEFOURCC('I','M','C','4'):
case MAKEFOURCC('N','V','1','2'): case MAKEFOURCC('N','V','1','2'):
case MAKEFOURCC('Y','V','1','2'):
*size = stride * height * 3 / 2; *size = stride * height * 3 / 2;
break; break;
default: default:
......
...@@ -48,6 +48,11 @@ DEFINE_GUID(DUMMY_GUID2, 0x12345678,0x1234,0x1234,0x22,0x22,0x22,0x22,0x22,0x22, ...@@ -48,6 +48,11 @@ DEFINE_GUID(DUMMY_GUID2, 0x12345678,0x1234,0x1234,0x22,0x22,0x22,0x22,0x22,0x22,
DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23); DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23,0x23,0x23);
DEFINE_GUID(CLSID_FileSchemeHandler, 0x477ec299, 0x1421, 0x4bdd, 0x97, 0x1f, 0x7c, 0xcb, 0x93, 0x3f, 0x21, 0xad); DEFINE_GUID(CLSID_FileSchemeHandler, 0x477ec299, 0x1421, 0x4bdd, 0x97, 0x1f, 0x7c, 0xcb, 0x93, 0x3f, 0x21, 0xad);
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC1, MAKEFOURCC('I','M','C','1'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC4, MAKEFOURCC('I','M','C','4'));
static BOOL is_win8_plus; static BOOL is_win8_plus;
#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__) #define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
...@@ -3414,6 +3419,32 @@ static void test_MFCalculateImageSize(void) ...@@ -3414,6 +3419,32 @@ static void test_MFCalculateImageSize(void)
{ &MFVideoFormat_NV12, 2, 2, 6, 6 }, { &MFVideoFormat_NV12, 2, 2, 6, 6 },
{ &MFVideoFormat_NV12, 3, 2, 12, 9 }, { &MFVideoFormat_NV12, 3, 2, 12, 9 },
{ &MFVideoFormat_NV12, 4, 2, 12, 12 }, { &MFVideoFormat_NV12, 4, 2, 12, 12 },
{ &MFVideoFormat_AYUV, 1, 1, 4 },
{ &MFVideoFormat_AYUV, 2, 1, 8 },
{ &MFVideoFormat_AYUV, 1, 2, 8 },
{ &MFVideoFormat_AYUV, 4, 3, 48 },
{ &MFVideoFormat_IMC1, 1, 1, 4 },
{ &MFVideoFormat_IMC1, 2, 1, 4 },
{ &MFVideoFormat_IMC1, 1, 2, 8 },
{ &MFVideoFormat_IMC1, 4, 3, 24 },
{ &MFVideoFormat_IMC3, 1, 1, 4 },
{ &MFVideoFormat_IMC3, 2, 1, 4 },
{ &MFVideoFormat_IMC3, 1, 2, 8 },
{ &MFVideoFormat_IMC3, 4, 3, 24 },
{ &MFVideoFormat_IMC2, 1, 3, 9, 4 },
{ &MFVideoFormat_IMC2, 1, 2, 6, 3 },
{ &MFVideoFormat_IMC2, 2, 2, 6, 6 },
{ &MFVideoFormat_IMC2, 3, 2, 12, 9 },
{ &MFVideoFormat_IMC2, 4, 2, 12, 12 },
{ &MFVideoFormat_IMC4, 1, 3, 9, 4 },
{ &MFVideoFormat_IMC4, 1, 2, 6, 3 },
{ &MFVideoFormat_IMC4, 2, 2, 6, 6 },
{ &MFVideoFormat_IMC4, 3, 2, 12, 9 },
{ &MFVideoFormat_IMC4, 4, 2, 12, 12 },
{ &MFVideoFormat_YV12, 1, 1, 3, 1 },
{ &MFVideoFormat_YV12, 2, 1, 3 },
{ &MFVideoFormat_YV12, 1, 2, 6, 3 },
{ &MFVideoFormat_YV12, 4, 3, 18 },
}; };
unsigned int i; unsigned int i;
UINT32 size; UINT32 size;
...@@ -4525,6 +4556,24 @@ static void test_MFGetStrideForBitmapInfoHeader(void) ...@@ -4525,6 +4556,24 @@ static void test_MFGetStrideForBitmapInfoHeader(void)
{ &MFVideoFormat_NV12, 1, 1 }, { &MFVideoFormat_NV12, 1, 1 },
{ &MFVideoFormat_NV12, 2, 2 }, { &MFVideoFormat_NV12, 2, 2 },
{ &MFVideoFormat_NV12, 3, 3 }, { &MFVideoFormat_NV12, 3, 3 },
{ &MFVideoFormat_AYUV, 1, 4 },
{ &MFVideoFormat_AYUV, 4, 16 },
{ &MFVideoFormat_AYUV, 5, 20 },
{ &MFVideoFormat_IMC1, 1, 4 },
{ &MFVideoFormat_IMC1, 2, 4 },
{ &MFVideoFormat_IMC1, 3, 8 },
{ &MFVideoFormat_IMC3, 1, 4 },
{ &MFVideoFormat_IMC3, 2, 4 },
{ &MFVideoFormat_IMC3, 3, 8 },
{ &MFVideoFormat_IMC2, 1, 1 },
{ &MFVideoFormat_IMC2, 2, 2 },
{ &MFVideoFormat_IMC2, 3, 3 },
{ &MFVideoFormat_IMC4, 1, 1 },
{ &MFVideoFormat_IMC4, 2, 2 },
{ &MFVideoFormat_IMC4, 3, 3 },
{ &MFVideoFormat_YV12, 1, 1 },
{ &MFVideoFormat_YV12, 2, 2 },
{ &MFVideoFormat_YV12, 3, 3 },
}; };
unsigned int i; unsigned int i;
LONG stride; LONG stride;
......
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