Commit 59bbc61a authored by Rémi Bernon's avatar Rémi Bernon Committed by Alexandre Julliard

mfplat: Add support for internal MFVideoFormat_A2B10G10R10.

parent 141aa0a2
...@@ -31,6 +31,9 @@ ...@@ -31,6 +31,9 @@
WINE_DEFAULT_DEBUG_CHANNEL(mfplat); 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_IMC1, MAKEFOURCC('I','M','C','1'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2')); DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3')); DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3'));
...@@ -2639,6 +2642,7 @@ static const struct uncompressed_video_format video_formats[] = ...@@ -2639,6 +2642,7 @@ static const struct uncompressed_video_format video_formats[] =
{ &MFVideoFormat_RGB565, 2, 3, 1, 0 }, { &MFVideoFormat_RGB565, 2, 3, 1, 0 },
{ &MFVideoFormat_RGB555, 2, 3, 1, 0 }, { &MFVideoFormat_RGB555, 2, 3, 1, 0 },
{ &MFVideoFormat_A2R10G10B10, 4, 3, 1, 0 }, { &MFVideoFormat_A2R10G10B10, 4, 3, 1, 0 },
{ &MFVideoFormat_A2B10G10R10, 4, 3, 1, 0 },
{ &MFVideoFormat_RGB8, 1, 3, 1, 0 }, { &MFVideoFormat_RGB8, 1, 3, 1, 0 },
{ &MFVideoFormat_L8, 1, 3, 1, 0 }, { &MFVideoFormat_L8, 1, 3, 1, 0 },
{ &MFVideoFormat_AYUV, 4, 3, 0, 1 }, { &MFVideoFormat_AYUV, 4, 3, 0, 1 },
...@@ -3549,6 +3553,7 @@ HRESULT WINAPI MFInitVideoFormat_RGB(MFVIDEOFORMAT *format, DWORD width, DWORD h ...@@ -3549,6 +3553,7 @@ HRESULT WINAPI MFInitVideoFormat_RGB(MFVIDEOFORMAT *format, DWORD width, DWORD h
case D3DFMT_R5G6B5: case D3DFMT_R5G6B5:
case D3DFMT_X1R5G5B5: case D3DFMT_X1R5G5B5:
case D3DFMT_A2B10G10R10: case D3DFMT_A2B10G10R10:
case D3DFMT_A2R10G10B10:
case D3DFMT_P8: case D3DFMT_P8:
transfer_function = MFVideoTransFunc_sRGB; transfer_function = MFVideoTransFunc_sRGB;
break; break;
......
...@@ -65,6 +65,9 @@ DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23, ...@@ -65,6 +65,9 @@ DEFINE_GUID(DUMMY_GUID3, 0x12345678,0x1234,0x1234,0x23,0x23,0x23,0x23,0x23,0x23,
extern const CLSID CLSID_FileSchemePlugin; 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_IMC1, MAKEFOURCC('I','M','C','1'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2')); DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC2, MAKEFOURCC('I','M','C','2'));
DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3')); DEFINE_MEDIATYPE_GUID(MFVideoFormat_IMC3, MAKEFOURCC('I','M','C','3'));
...@@ -4705,6 +4708,9 @@ image_size_tests[] = ...@@ -4705,6 +4708,9 @@ image_size_tests[] =
{ &MFVideoFormat_A2R10G10B10, 3, 5, 60, 0, 320, 60, 64 }, { &MFVideoFormat_A2R10G10B10, 3, 5, 60, 0, 320, 60, 64 },
{ &MFVideoFormat_A2R10G10B10, 1, 1, 4, 0, 64, 4, 64 }, { &MFVideoFormat_A2R10G10B10, 1, 1, 4, 0, 64, 4, 64 },
{ &MFVideoFormat_A2R10G10B10, 320, 240, 307200, 0, 307200, 307200, 1280 }, { &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, 3, 5, 120, 0, 320, 120, 64 },
{ &MFVideoFormat_A16B16G16R16F, 1, 1, 8, 0, 64, 8, 64 }, { &MFVideoFormat_A16B16G16R16F, 1, 1, 8, 0, 64, 8, 64 },
{ &MFVideoFormat_A16B16G16R16F, 320, 240, 614400, 0, 614400, 614400, 2560 }, { &MFVideoFormat_A16B16G16R16F, 320, 240, 614400, 0, 614400, 614400, 2560 },
...@@ -6171,6 +6177,8 @@ static void test_MFGetStrideForBitmapInfoHeader(void) ...@@ -6171,6 +6177,8 @@ static void test_MFGetStrideForBitmapInfoHeader(void)
{ &MFVideoFormat_ARGB32, 1, -4 }, { &MFVideoFormat_ARGB32, 1, -4 },
{ &MFVideoFormat_A2R10G10B10, 3, -12 }, { &MFVideoFormat_A2R10G10B10, 3, -12 },
{ &MFVideoFormat_A2R10G10B10, 1, -4 }, { &MFVideoFormat_A2R10G10B10, 1, -4 },
{ &MFVideoFormat_A2B10G10R10, 3, -12 },
{ &MFVideoFormat_A2B10G10R10, 1, -4 },
{ &MFVideoFormat_A16B16G16R16F, 3, -24 }, { &MFVideoFormat_A16B16G16R16F, 3, -24 },
{ &MFVideoFormat_A16B16G16R16F, 1, -8 }, { &MFVideoFormat_A16B16G16R16F, 1, -8 },
...@@ -7528,6 +7536,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void) ...@@ -7528,6 +7536,7 @@ static void test_MFMapDX9FormatToDXGIFormat(void)
{ DXGI_FORMAT_R16G16B16A16_SNORM, D3DFMT_Q16W16V16U16 }, { DXGI_FORMAT_R16G16B16A16_SNORM, D3DFMT_Q16W16V16U16 },
{ DXGI_FORMAT_R32G32_FLOAT, D3DFMT_G32R32F }, { DXGI_FORMAT_R32G32_FLOAT, D3DFMT_G32R32F },
{ DXGI_FORMAT_R10G10B10A2_UNORM, D3DFMT_A2B10G10R10 }, { DXGI_FORMAT_R10G10B10A2_UNORM, D3DFMT_A2B10G10R10 },
{ 0, D3DFMT_A2R10G10B10 }, /* doesn't map to DXGI */
{ DXGI_FORMAT_R8G8B8A8_SNORM, D3DFMT_Q8W8V8U8 }, { DXGI_FORMAT_R8G8B8A8_SNORM, D3DFMT_Q8W8V8U8 },
{ DXGI_FORMAT_R16G16_FLOAT, D3DFMT_G16R16F }, { DXGI_FORMAT_R16G16_FLOAT, D3DFMT_G16R16F },
{ DXGI_FORMAT_R16G16_UNORM, D3DFMT_G16R16 }, { DXGI_FORMAT_R16G16_UNORM, D3DFMT_G16R16 },
...@@ -8938,6 +8947,7 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width, ...@@ -8938,6 +8947,7 @@ static void check_video_format(const MFVIDEOFORMAT *format, unsigned int width,
case D3DFMT_R5G6B5: case D3DFMT_R5G6B5:
case D3DFMT_X1R5G5B5: case D3DFMT_X1R5G5B5:
case D3DFMT_A2B10G10R10: case D3DFMT_A2B10G10R10:
case D3DFMT_A2R10G10B10:
case D3DFMT_P8: case D3DFMT_P8:
transfer_function = MFVideoTransFunc_sRGB; transfer_function = MFVideoTransFunc_sRGB;
break; break;
...@@ -8994,6 +9004,7 @@ static void test_MFInitVideoFormat_RGB(void) ...@@ -8994,6 +9004,7 @@ static void test_MFInitVideoFormat_RGB(void)
D3DFMT_R5G6B5, D3DFMT_R5G6B5,
D3DFMT_X1R5G5B5, D3DFMT_X1R5G5B5,
D3DFMT_A2B10G10R10, D3DFMT_A2B10G10R10,
D3DFMT_A2R10G10B10,
D3DFMT_P8, D3DFMT_P8,
D3DFMT_L8, D3DFMT_L8,
D3DFMT_YUY2, D3DFMT_YUY2,
......
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