From: Rémi Bernon rbernon@codeweavers.com
--- dlls/mfplat/mediatype.c | 4 ++++ dlls/mfplat/tests/mfplat.c | 9 +++++++++ 2 files changed, 13 insertions(+)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index dd0b29fac32..3944d64849e 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -39,6 +39,7 @@ DEFINE_GUID(GUID_NULL,0,0,0,0,0,0,0,0,0,0,0);
DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB1, D3DFMT_A1); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB4, MAKEFOURCC('4','P','x','x')); +DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB1555, D3DFMT_A1R5G5B5); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB4444, D3DFMT_A4R4G4B4); /* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ @@ -2713,6 +2714,7 @@ static struct uncompressed_video_format video_formats[] = { &MFVideoFormat_RGB32, 32, 3, 1, 0, BI_RGB }, { &MFVideoFormat_RGB565, 16, 3, 1, 0, BI_BITFIELDS }, { &MFVideoFormat_RGB555, 16, 3, 1, 0, BI_RGB }, + { &MFVideoFormat_ABGR32, 32, 3, 1, 0, BI_RGB }, { &MFVideoFormat_A2R10G10B10, 32, 3, 1, 0, -1 }, { &MFVideoFormat_A2B10G10R10, 32, 3, 1, 0, -1 }, { &MFVideoFormat_RGB8, 8, 3, 1, 0, BI_RGB }, @@ -3632,6 +3634,8 @@ DXGI_FORMAT WINAPI MFMapDX9FormatToDXGIFormat(DWORD format) return DXGI_FORMAT_B8G8R8A8_UNORM; case D3DFMT_X8R8G8B8: return DXGI_FORMAT_B8G8R8X8_UNORM; + case D3DFMT_A8B8G8R8: + return DXGI_FORMAT_R8G8B8A8_UNORM; case MAKEFOURCC('A','Y','U','V'): return DXGI_FORMAT_AYUV; case MAKEFOURCC('Y','4','1','0'): diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index a4ca567367c..288b3ba4938 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -67,9 +67,11 @@ DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23, extern const CLSID CLSID_FileSchemePlugin;
DEFINE_MEDIATYPE_GUID(MEDIASUBTYPE_Base,0); +DEFINE_GUID(MEDIASUBTYPE_ABGR32,D3DFMT_A8B8G8R8,0x524f,0x11ce,0x9f,0x53,0x00,0x20,0xaf,0x0b,0xa7,0x70);
DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB1, D3DFMT_A1); DEFINE_MEDIATYPE_GUID(MFVideoFormat_RGB4, MAKEFOURCC('4','P','x','x')); +DEFINE_MEDIATYPE_GUID(MFVideoFormat_ABGR32, D3DFMT_A8B8G8R8); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB1555, D3DFMT_A1R5G5B5); DEFINE_MEDIATYPE_GUID(MFVideoFormat_ARGB4444, D3DFMT_A4R4G4B4); /* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ @@ -4748,6 +4750,9 @@ image_size_tests[] = { &MFVideoFormat_ARGB32, 3, 5, 60, 0, 320, 60, 64 }, { &MFVideoFormat_ARGB32, 1, 1, 4, 0, 64, 4, 64 }, { &MFVideoFormat_ARGB32, 320, 240, 307200, 0, 307200, 307200, 1280 }, + { &MFVideoFormat_ABGR32, 3, 5, 60, 0, 320, 60, 64 }, + { &MFVideoFormat_ABGR32, 1, 1, 4, 0, 64, 4, 64 }, + { &MFVideoFormat_ABGR32, 320, 240, 307200, 0, 307200, 307200, 1280 }, { &MFVideoFormat_A2R10G10B10, 3, 5, 60, 0, 320, 60, 64 }, { &MFVideoFormat_A2R10G10B10, 1, 1, 4, 0, 64, 4, 64 }, { &MFVideoFormat_A2R10G10B10, 320, 240, 307200, 0, 307200, 307200, 1280 }, @@ -6224,6 +6229,8 @@ static void test_MFGetStrideForBitmapInfoHeader(void) { &MFVideoFormat_RGB32, 1, -4 }, { &MFVideoFormat_ARGB32, 3, -12 }, { &MFVideoFormat_ARGB32, 1, -4 }, + { &MFVideoFormat_ABGR32, 3, -12 }, + { &MFVideoFormat_ABGR32, 1, -4 }, { &MFVideoFormat_A2R10G10B10, 3, -12 }, { &MFVideoFormat_A2R10G10B10, 1, -4 }, { &MFVideoFormat_A2B10G10R10, 3, -12 }, @@ -9304,6 +9311,7 @@ static void test_MFMapDXGIFormatToDX9Format(void) { DXGI_FORMAT_B8G8R8X8_UNORM, D3DFMT_X8R8G8B8 }, { DXGI_FORMAT_B8G8R8A8_UNORM_SRGB, D3DFMT_A8R8G8B8 }, { DXGI_FORMAT_B8G8R8X8_UNORM_SRGB, D3DFMT_X8R8G8B8 }, + { DXGI_FORMAT_R8G8B8A8_UNORM, D3DFMT_A8B8G8R8 }, { DXGI_FORMAT_AYUV, MAKEFOURCC('A','Y','U','V') }, { DXGI_FORMAT_Y410, MAKEFOURCC('Y','4','1','0') }, { DXGI_FORMAT_Y416, MAKEFOURCC('Y','4','1','6') }, @@ -9369,6 +9377,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) { DXGI_FORMAT_BC3_UNORM, D3DFMT_DXT4 }, { DXGI_FORMAT_B8G8R8A8_UNORM, D3DFMT_A8R8G8B8 }, { DXGI_FORMAT_B8G8R8X8_UNORM, D3DFMT_X8R8G8B8 }, + { DXGI_FORMAT_R8G8B8A8_UNORM, D3DFMT_A8B8G8R8 }, { DXGI_FORMAT_AYUV, MAKEFOURCC('A','Y','U','V') }, { DXGI_FORMAT_Y410, MAKEFOURCC('Y','4','1','0') }, { DXGI_FORMAT_Y416, MAKEFOURCC('Y','4','1','6') },