Module: wine Branch: master Commit: 59bbc61a6d1bbb9c59cf57cd13283d48fd1308f4 URL: https://gitlab.winehq.org/wine/wine/-/commit/59bbc61a6d1bbb9c59cf57cd13283d4...
Author: Rémi Bernon rbernon@codeweavers.com Date: Wed Nov 22 14:39:06 2023 +0100
mfplat: Add support for internal MFVideoFormat_A2B10G10R10.
---
dlls/mfplat/mediatype.c | 5 +++++ dlls/mfplat/tests/mfplat.c | 11 +++++++++++ 2 files changed, 16 insertions(+)
diff --git a/dlls/mfplat/mediatype.c b/dlls/mfplat/mediatype.c index 0b4a6fa4eaf..c989e7e08a9 100644 --- a/dlls/mfplat/mediatype.c +++ b/dlls/mfplat/mediatype.c @@ -31,6 +31,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(mfplat);
+/* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ +DEFINE_MEDIATYPE_GUID(MFVideoFormat_A2B10G10R10, D3DFMT_A2R10G10B10); + 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')); @@ -2639,6 +2642,7 @@ static const struct uncompressed_video_format video_formats[] = { &MFVideoFormat_RGB565, 2, 3, 1, 0 }, { &MFVideoFormat_RGB555, 2, 3, 1, 0 }, { &MFVideoFormat_A2R10G10B10, 4, 3, 1, 0 }, + { &MFVideoFormat_A2B10G10R10, 4, 3, 1, 0 }, { &MFVideoFormat_RGB8, 1, 3, 1, 0 }, { &MFVideoFormat_L8, 1, 3, 1, 0 }, { &MFVideoFormat_AYUV, 4, 3, 0, 1 }, @@ -3549,6 +3553,7 @@ HRESULT WINAPI MFInitVideoFormat_RGB(MFVIDEOFORMAT *format, DWORD width, DWORD h case D3DFMT_R5G6B5: case D3DFMT_X1R5G5B5: case D3DFMT_A2B10G10R10: + case D3DFMT_A2R10G10B10: case D3DFMT_P8: transfer_function = MFVideoTransFunc_sRGB; break; diff --git a/dlls/mfplat/tests/mfplat.c b/dlls/mfplat/tests/mfplat.c index 4fcf5f19558..b44b95ff71a 100644 --- a/dlls/mfplat/tests/mfplat.c +++ b/dlls/mfplat/tests/mfplat.c @@ -65,6 +65,9 @@ DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23,
extern const CLSID CLSID_FileSchemePlugin;
+/* SDK MFVideoFormat_A2R10G10B10 uses D3DFMT_A2B10G10R10, let's name it the other way */ +DEFINE_MEDIATYPE_GUID(MFVideoFormat_A2B10G10R10, D3DFMT_A2R10G10B10); + 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')); @@ -4705,6 +4708,9 @@ image_size_tests[] = { &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 }, + { &MFVideoFormat_A2B10G10R10, 3, 5, 60, 0, 320, 60, 64 }, + { &MFVideoFormat_A2B10G10R10, 1, 1, 4, 0, 64, 4, 64 }, + { &MFVideoFormat_A2B10G10R10, 320, 240, 307200, 0, 307200, 307200, 1280 }, { &MFVideoFormat_A16B16G16R16F, 3, 5, 120, 0, 320, 120, 64 }, { &MFVideoFormat_A16B16G16R16F, 1, 1, 8, 0, 64, 8, 64 }, { &MFVideoFormat_A16B16G16R16F, 320, 240, 614400, 0, 614400, 614400, 2560 }, @@ -6171,6 +6177,8 @@ static void test_MFGetStrideForBitmapInfoHeader(void) { &MFVideoFormat_ARGB32, 1, -4 }, { &MFVideoFormat_A2R10G10B10, 3, -12 }, { &MFVideoFormat_A2R10G10B10, 1, -4 }, + { &MFVideoFormat_A2B10G10R10, 3, -12 }, + { &MFVideoFormat_A2B10G10R10, 1, -4 }, { &MFVideoFormat_A16B16G16R16F, 3, -24 }, { &MFVideoFormat_A16B16G16R16F, 1, -8 },
@@ -7528,6 +7536,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) { DXGI_FORMAT_R16G16B16A16_SNORM, D3DFMT_Q16W16V16U16 }, { DXGI_FORMAT_R32G32_FLOAT, D3DFMT_G32R32F }, { DXGI_FORMAT_R10G10B10A2_UNORM, D3DFMT_A2B10G10R10 }, + { 0, D3DFMT_A2R10G10B10 }, /* doesn't map to DXGI */ { DXGI_FORMAT_R8G8B8A8_SNORM, D3DFMT_Q8W8V8U8 }, { DXGI_FORMAT_R16G16_FLOAT, D3DFMT_G16R16F }, { DXGI_FORMAT_R16G16_UNORM, D3DFMT_G16R16 }, @@ -8938,6 +8947,7 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, case D3DFMT_R5G6B5: case D3DFMT_X1R5G5B5: case D3DFMT_A2B10G10R10: + case D3DFMT_A2R10G10B10: case D3DFMT_P8: transfer_function = MFVideoTransFunc_sRGB; break; @@ -8994,6 +9004,7 @@ static void test_MFInitVideoFormat_RGB(void) D3DFMT_R5G6B5, D3DFMT_X1R5G5B5, D3DFMT_A2B10G10R10, + D3DFMT_A2R10G10B10, D3DFMT_P8, D3DFMT_L8, D3DFMT_YUY2,