- removed/merged to below: 0001-mf-tests-help-older-compilers-by-using-defines.patch
- added: 0001-mf-tests-use-defines-instead-of-static-const-for-old.patch OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=1127
This commit is contained in:
parent
7c6bf8e26e
commit
c7f10cf445
@ -1,116 +0,0 @@
|
||||
From 100ab9fb0d55111c353d5a042902e62d163e47f4 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <marcus@jet.franken.de>
|
||||
Date: Mon, 3 Jun 2024 15:50:19 +0200
|
||||
Subject: [PATCH] mf/tests: help older compilers by using defines
|
||||
|
||||
older compilers do not see this always as constant
|
||||
|
||||
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
|
||||
---
|
||||
dlls/mf/tests/transform.c | 33 ++++++++++++++++++---------------
|
||||
1 file changed, 18 insertions(+), 15 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c
|
||||
index 0291fe16e18..a6367fee764 100644
|
||||
--- a/dlls/mf/tests/transform.c
|
||||
+++ b/dlls/mf/tests/transform.c
|
||||
@@ -9044,9 +9044,12 @@ static IMFSample *create_d3d_sample(IMFVideoSampleAllocator *allocator, const vo
|
||||
return sample;
|
||||
}
|
||||
|
||||
+#define SET_WIDTH 82
|
||||
+#define SET_HEIGHT 84
|
||||
+
|
||||
static void test_video_processor_with_dxgi_manager(void)
|
||||
{
|
||||
- static const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
+ static const unsigned int aligned_width = 96, aligned_height = 96;
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
{0},
|
||||
@@ -9054,7 +9057,7 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
const struct buffer_desc output_buffer_desc_rgb32 =
|
||||
{
|
||||
.length = aligned_width * aligned_height * 4,
|
||||
- .compare = compare_rgb32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
+ .compare = compare_rgb32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
.dump = dump_rgb32, .size = {.cx = aligned_width, .cy = aligned_height},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_rgb32 =
|
||||
@@ -9066,9 +9069,9 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
|
||||
const struct buffer_desc output_buffer_desc_rgb32_crop =
|
||||
{
|
||||
- .length = set_width * set_height * 4,
|
||||
- .compare = compare_rgb32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
- .dump = dump_rgb32, .size = {.cx = set_width, .cy = set_height},
|
||||
+ .length = SET_WIDTH * SET_HEIGHT * 4,
|
||||
+ .compare = compare_rgb32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
+ .dump = dump_rgb32, .size = {.cx = SET_WIDTH, .cy = SET_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_rgb32_crop =
|
||||
{
|
||||
@@ -9079,9 +9082,9 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
|
||||
const struct buffer_desc output_buffer_desc_abgr32_crop =
|
||||
{
|
||||
- .length = set_width * set_height * 4,
|
||||
- .compare = compare_abgr32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
- .dump = dump_rgb32, .size = {.cx = set_width, .cy = set_height},
|
||||
+ .length = SET_WIDTH * SET_HEIGHT * 4,
|
||||
+ .compare = compare_abgr32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
+ .dump = dump_rgb32, .size = {.cx = SET_WIDTH, .cy = SET_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_abgr32_crop =
|
||||
{
|
||||
@@ -9108,7 +9111,7 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
};
|
||||
|
||||
- static const MFVideoArea aperture = {.Area={set_width, set_height}};
|
||||
+ static const MFVideoArea aperture = {.Area={SET_WIDTH, SET_HEIGHT}};
|
||||
const struct attribute_desc nv12_with_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
@@ -9123,14 +9126,14 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, set_width, set_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, SET_WIDTH, SET_HEIGHT),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc abgr32_no_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_ABGR32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, set_width, set_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, SET_WIDTH, SET_HEIGHT),
|
||||
{0},
|
||||
};
|
||||
|
||||
@@ -9465,8 +9468,8 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
ok(!desc.CPUAccessFlags, "got %#x.\n", desc.CPUAccessFlags);
|
||||
ok(!desc.MiscFlags, "got %#x.\n", desc.MiscFlags);
|
||||
ok(desc.MipLevels == 1, "git %u.\n", desc.MipLevels);
|
||||
- ok(desc.Width == set_width, "got %u.\n", desc.Width);
|
||||
- ok(desc.Height == set_height, "got %u.\n", desc.Height);
|
||||
+ ok(desc.Width == SET_WIDTH, "got %u.\n", desc.Width);
|
||||
+ ok(desc.Height == SET_HEIGHT, "got %u.\n", desc.Height);
|
||||
|
||||
ID3D11Texture2D_Release(tex2d);
|
||||
IMFDXGIBuffer_Release(dxgi_buffer);
|
||||
@@ -9533,8 +9536,8 @@ skip_rgb32:
|
||||
ok(!desc.CPUAccessFlags, "got %#x.\n", desc.CPUAccessFlags);
|
||||
ok(!desc.MiscFlags, "got %#x.\n", desc.MiscFlags);
|
||||
ok(desc.MipLevels == 1, "git %u.\n", desc.MipLevels);
|
||||
- ok(desc.Width == set_width, "got %u.\n", desc.Width);
|
||||
- ok(desc.Height == set_height, "got %u.\n", desc.Height);
|
||||
+ ok(desc.Width == SET_WIDTH, "got %u.\n", desc.Width);
|
||||
+ ok(desc.Height == SET_HEIGHT, "got %u.\n", desc.Height);
|
||||
|
||||
ID3D11Texture2D_Release(tex2d);
|
||||
IMFDXGIBuffer_Release(dxgi_buffer);
|
||||
--
|
||||
2.45.1
|
||||
|
@ -1,89 +0,0 @@
|
||||
From 337a3a802a76e442d670d129b7dd9b9b87a199b4 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <marcus@jet.franken.de>
|
||||
Date: Mon, 1 Jul 2024 13:43:48 +0200
|
||||
Subject: [PATCH] mf/tests: remove static keyword from actual_width and height
|
||||
|
||||
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
|
||||
---
|
||||
dlls/mf/tests/transform.c | 16 ++++++++--------
|
||||
1 file changed, 8 insertions(+), 8 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c
|
||||
index deec2c7dd92..40a06082dcc 100644
|
||||
--- a/dlls/mf/tests/transform.c
|
||||
+++ b/dlls/mf/tests/transform.c
|
||||
@@ -3818,7 +3818,7 @@ static IMFSample *next_h264_sample_(int line, const BYTE **h264_buf, ULONG *h264
|
||||
|
||||
static void test_h264_encoder(void)
|
||||
{
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const GUID *const class_id = &CLSID_MSH264EncoderMFT;
|
||||
const struct transform_info expect_mft_info =
|
||||
{
|
||||
@@ -4178,7 +4178,7 @@ static void test_h264_decoder(void)
|
||||
{0},
|
||||
};
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const media_type_desc actual_outputs[] =
|
||||
{
|
||||
{
|
||||
@@ -5385,7 +5385,7 @@ static void test_wmv_encoder(void)
|
||||
},
|
||||
};
|
||||
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
@@ -5700,7 +5700,7 @@ static void test_wmv_decoder(void)
|
||||
{ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_VC1S)},
|
||||
};
|
||||
static const MFVideoArea actual_aperture = {.Area={96,96}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc expect_output_attributes[] =
|
||||
{
|
||||
ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, sizeof(actual_aperture)),
|
||||
@@ -7053,7 +7053,7 @@ static void test_color_convert(void)
|
||||
};
|
||||
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
@@ -7457,7 +7457,7 @@ static void test_video_processor(void)
|
||||
};
|
||||
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
+ const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc rgb32_with_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
@@ -8608,7 +8608,7 @@ static HRESULT get_next_h264_output_sample(IMFTransform *transform, IMFSample **
|
||||
|
||||
static void test_h264_with_dxgi_manager(void)
|
||||
{
|
||||
- static const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
+ const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
ATTR_UINT32(MFSampleExtension_CleanPoint, 1),
|
||||
@@ -9149,7 +9149,7 @@ static IMFSample *create_d3d_sample(IMFVideoSampleAllocator *allocator, const vo
|
||||
|
||||
static void test_video_processor_with_dxgi_manager(void)
|
||||
{
|
||||
- static const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
+ const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
{0},
|
||||
--
|
||||
2.45.2
|
||||
|
942
0001-mf-tests-use-defines-instead-of-static-const-for-old.patch
Normal file
942
0001-mf-tests-use-defines-instead-of-static-const-for-old.patch
Normal file
@ -0,0 +1,942 @@
|
||||
From 8386536fb7c3d3678c1d022e89fe248c3d8eed79 Mon Sep 17 00:00:00 2001
|
||||
From: Marcus Meissner <marcus@jet.franken.de>
|
||||
Date: Mon, 1 Jul 2024 14:08:15 +0200
|
||||
Subject: [PATCH] mf/tests: use defines instead of 'static const' for older gcc
|
||||
|
||||
Signed-off-by: Marcus Meissner <marcus@jet.franken.de>
|
||||
---
|
||||
dlls/mf/tests/transform.c | 335 +++++++++++++++++++-------------------
|
||||
1 file changed, 167 insertions(+), 168 deletions(-)
|
||||
|
||||
diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c
|
||||
index deec2c7dd92..16a7525c5d3 100644
|
||||
--- a/dlls/mf/tests/transform.c
|
||||
+++ b/dlls/mf/tests/transform.c
|
||||
@@ -65,6 +65,11 @@ DEFINE_GUID(mft_output_sample_incomplete,0xffffff,0xffff,0xffff,0xff,0xff,0xff,0
|
||||
|
||||
static const GUID test_attr_guid = {0xdeadbeef};
|
||||
|
||||
+#define SET_WIDTH 82
|
||||
+#define SET_HEIGHT 84
|
||||
+#define ACTUAL_WIDTH 96
|
||||
+#define ACTUAL_HEIGHT 96
|
||||
+
|
||||
struct media_buffer
|
||||
{
|
||||
IMediaBuffer IMediaBuffer_iface;
|
||||
@@ -3818,7 +3823,6 @@ static IMFSample *next_h264_sample_(int line, const BYTE **h264_buf, ULONG *h264
|
||||
|
||||
static void test_h264_encoder(void)
|
||||
{
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const GUID *const class_id = &CLSID_MSH264EncoderMFT;
|
||||
const struct transform_info expect_mft_info =
|
||||
{
|
||||
@@ -3859,7 +3863,7 @@ static void test_h264_encoder(void)
|
||||
};
|
||||
static const struct attribute_desc expect_available_input_attributes[] =
|
||||
{
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001),
|
||||
ATTR_UINT32(MF_MT_VIDEO_NOMINAL_RANGE, MFNominalRange_Wide),
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive),
|
||||
@@ -3871,7 +3875,7 @@ static void test_h264_encoder(void)
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_UINT32(test_attr_guid, 0),
|
||||
{0},
|
||||
};
|
||||
@@ -3879,7 +3883,7 @@ static void test_h264_encoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_H264, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001, .required_set = TRUE),
|
||||
ATTR_UINT32(MF_MT_AVG_BITRATE, 193540, .required_set = TRUE),
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, MFVideoInterlace_Progressive, .required_set = TRUE),
|
||||
@@ -3890,7 +3894,7 @@ static void test_h264_encoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001),
|
||||
ATTR_UINT32(test_attr_guid, 0),
|
||||
{0},
|
||||
@@ -3899,7 +3903,7 @@ static void test_h264_encoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_H264),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001),
|
||||
ATTR_UINT32(MF_MT_AVG_BITRATE, 193540),
|
||||
ATTR_BLOB(MF_MT_MPEG_SEQUENCE_HEADER, test_h264_sequence_header, sizeof(test_h264_sequence_header)),
|
||||
@@ -4178,7 +4182,6 @@ static void test_h264_decoder(void)
|
||||
{0},
|
||||
};
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const media_type_desc actual_outputs[] =
|
||||
{
|
||||
{
|
||||
@@ -4186,9 +4189,9 @@ static void test_h264_decoder(void)
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 60000, 1000),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
/* ATTR_UINT32(MF_MT_VIDEO_ROTATION, 0), missing on Win7 */
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, 7),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
@@ -4202,9 +4205,9 @@ static void test_h264_decoder(void)
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YV12),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 60000, 1000),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
/* ATTR_UINT32(MF_MT_VIDEO_ROTATION, 0), missing on Win7 */
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, 7),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
@@ -4218,9 +4221,9 @@ static void test_h264_decoder(void)
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_IYUV),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 60000, 1000),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
/* ATTR_UINT32(MF_MT_VIDEO_ROTATION, 0), missing on Win7 */
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, 7),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
@@ -4234,9 +4237,9 @@ static void test_h264_decoder(void)
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_I420),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 60000, 1000),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
/* ATTR_UINT32(MF_MT_VIDEO_ROTATION, 0), missing on Win7 */
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, 7),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
@@ -4250,9 +4253,9 @@ static void test_h264_decoder(void)
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YUY2),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 60000, 1000),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
/* ATTR_UINT32(MF_MT_VIDEO_ROTATION, 0), missing on Win7 */
|
||||
ATTR_UINT32(MF_MT_INTERLACE_MODE, 7),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
@@ -4278,7 +4281,7 @@ static void test_h264_decoder(void)
|
||||
{
|
||||
.dwFlags = MFT_OUTPUT_STREAM_WHOLE_SAMPLES | MFT_OUTPUT_STREAM_SINGLE_SAMPLE_PER_BUFFER |
|
||||
MFT_OUTPUT_STREAM_FIXED_SAMPLE_SIZE,
|
||||
- .cbSize = actual_width * actual_height * 2,
|
||||
+ .cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 2,
|
||||
};
|
||||
const MFT_INPUT_STREAM_INFO input_info =
|
||||
{
|
||||
@@ -4294,9 +4297,9 @@ static void test_h264_decoder(void)
|
||||
};
|
||||
const struct buffer_desc output_buffer_desc_nv12 =
|
||||
{
|
||||
- .length = actual_width * actual_height * 3 / 2,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2,
|
||||
.compare = compare_nv12, .compare_rect = {.right = 82, .bottom = 84},
|
||||
- .dump = dump_nv12, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_nv12, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_nv12 =
|
||||
{
|
||||
@@ -4306,9 +4309,9 @@ static void test_h264_decoder(void)
|
||||
};
|
||||
const struct buffer_desc output_buffer_desc_i420 =
|
||||
{
|
||||
- .length = actual_width * actual_height * 3 / 2,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2,
|
||||
.compare = compare_i420, .compare_rect = {.right = 82, .bottom = 84},
|
||||
- .dump = dump_i420, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_i420, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc expect_output_sample_i420 =
|
||||
{
|
||||
@@ -4543,7 +4546,7 @@ static void test_h264_decoder(void)
|
||||
|
||||
check_mft_get_output_current_type_(__LINE__, transform, expect_new_output_type_desc, FALSE, TRUE);
|
||||
|
||||
- output_sample = create_sample(NULL, actual_width * actual_height * 2);
|
||||
+ output_sample = create_sample(NULL, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2);
|
||||
hr = check_mft_process_output(transform, output_sample, &output_status);
|
||||
todo_wine
|
||||
ok(hr == MF_E_TRANSFORM_STREAM_CHANGE, "ProcessOutput returned %#lx\n", hr);
|
||||
@@ -4573,7 +4576,7 @@ static void test_h264_decoder(void)
|
||||
hr = MFCreateCollection(&output_samples);
|
||||
ok(hr == S_OK, "MFCreateCollection returned %#lx\n", hr);
|
||||
|
||||
- output_sample = create_sample(NULL, actual_width * actual_height * 2);
|
||||
+ output_sample = create_sample(NULL, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2);
|
||||
hr = check_mft_process_output(transform, output_sample, &output_status);
|
||||
ok(hr == S_OK, "ProcessOutput returned %#lx\n", hr);
|
||||
ok(output_status == 0, "got output[0].dwStatus %#lx\n", output_status);
|
||||
@@ -4587,7 +4590,7 @@ static void test_h264_decoder(void)
|
||||
ok(ret == 0, "got %lu%% diff\n", ret);
|
||||
IMFCollection_Release(output_samples);
|
||||
|
||||
- output_sample = create_sample(NULL, actual_width * actual_height * 2);
|
||||
+ output_sample = create_sample(NULL, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2);
|
||||
hr = check_mft_process_output(transform, output_sample, &output_status);
|
||||
todo_wine_if(hr == S_OK) /* when VA-API plugin is used */
|
||||
ok(hr == MF_E_TRANSFORM_NEED_MORE_INPUT, "ProcessOutput returned %#lx\n", hr);
|
||||
@@ -5385,20 +5388,19 @@ static void test_wmv_encoder(void)
|
||||
},
|
||||
};
|
||||
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height), /* required for SetOutputType */
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT), /* required for SetOutputType */
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_WMV1, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001, .required = TRUE),
|
||||
ATTR_UINT32(MF_MT_AVG_BITRATE, 193540, .required = TRUE),
|
||||
{0},
|
||||
@@ -5409,9 +5411,9 @@ static void test_wmv_encoder(void)
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1),
|
||||
@@ -5421,7 +5423,7 @@ static void test_wmv_encoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_WMV1),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001),
|
||||
ATTR_UINT32(MF_MT_AVG_BITRATE, 193540),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
@@ -5700,7 +5702,6 @@ static void test_wmv_decoder(void)
|
||||
{ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_VC1S)},
|
||||
};
|
||||
static const MFVideoArea actual_aperture = {.Area={96,96}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc expect_output_attributes[] =
|
||||
{
|
||||
ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, sizeof(actual_aperture)),
|
||||
@@ -5716,94 +5717,94 @@ static void test_wmv_decoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YV12),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_IYUV),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_I420),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YUY2),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_UYVY),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_YVYU),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV11),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 4),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB24),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 3),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 3),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB565),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
/* ATTR_BLOB(MF_MT_PALETTE, ... with 12 elements), */
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB555),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 2),
|
||||
},
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB8),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT),
|
||||
/* ATTR_BLOB(MF_MT_PALETTE, ... with 904 elements), */
|
||||
},
|
||||
};
|
||||
@@ -5820,52 +5821,52 @@ static void test_wmv_decoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_WMV1, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE, .todo = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE, .todo = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_negative_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_rgb[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_rgb_negative_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_rgb_positive_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc expect_input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_WMV1),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1, .todo = TRUE),
|
||||
{0},
|
||||
};
|
||||
@@ -5873,9 +5874,9 @@ static void test_wmv_decoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
ATTR_UINT32(MF_MT_VIDEO_NOMINAL_RANGE, 2),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
@@ -5886,9 +5887,9 @@ static void test_wmv_decoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 4),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
ATTR_UINT32(MF_MT_VIDEO_NOMINAL_RANGE, 2),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
@@ -5899,9 +5900,9 @@ static void test_wmv_decoder(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 4),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 4),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 4),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1),
|
||||
ATTR_UINT32(MF_MT_VIDEO_NOMINAL_RANGE, 2),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1),
|
||||
@@ -5943,15 +5944,15 @@ static void test_wmv_decoder(void)
|
||||
};
|
||||
const struct buffer_desc output_buffer_desc_nv12 =
|
||||
{
|
||||
- .length = actual_width * actual_height * 3 / 2,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2,
|
||||
.compare = compare_nv12, .compare_rect = {.right = 82, .bottom = 84},
|
||||
- .dump = dump_nv12, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_nv12, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct buffer_desc output_buffer_desc_rgb =
|
||||
{
|
||||
- .length = actual_width * actual_height * 4,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4,
|
||||
.compare = compare_rgb32, .compare_rect = {.right = 82, .bottom = 84},
|
||||
- .dump = dump_rgb32, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_rgb32, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_nv12 =
|
||||
{
|
||||
@@ -7053,12 +7054,11 @@ static void test_color_convert(void)
|
||||
};
|
||||
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc input_type_desc[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16),
|
||||
{0},
|
||||
};
|
||||
@@ -7066,23 +7066,23 @@ static void test_color_convert(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_negative_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc output_type_desc_positive_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc expect_input_type_desc[] =
|
||||
@@ -7090,9 +7090,9 @@ static void test_color_convert(void)
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12),
|
||||
ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 3 / 2, .todo = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1, .todo = TRUE),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1, .todo = TRUE),
|
||||
@@ -7102,9 +7102,9 @@ static void test_color_convert(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 4, .todo = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 4, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1, .todo = TRUE),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1, .todo = TRUE),
|
||||
@@ -7114,9 +7114,9 @@ static void test_color_convert(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 4),
|
||||
- ATTR_UINT32(MF_MT_SAMPLE_SIZE, actual_width * actual_height * 4, .todo = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 4),
|
||||
+ ATTR_UINT32(MF_MT_SAMPLE_SIZE, ACTUAL_WIDTH * ACTUAL_HEIGHT * 4, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_ALL_SAMPLES_INDEPENDENT, 1, .todo = TRUE),
|
||||
ATTR_UINT32(MF_MT_FIXED_SIZE_SAMPLES, 1, .todo = TRUE),
|
||||
ATTR_RATIO(MF_MT_PIXEL_ASPECT_RATIO, 1, 1, .todo = TRUE),
|
||||
@@ -7124,20 +7124,20 @@ static void test_color_convert(void)
|
||||
};
|
||||
const MFT_OUTPUT_STREAM_INFO output_info =
|
||||
{
|
||||
- .cbSize = actual_width * actual_height * 4,
|
||||
+ .cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4,
|
||||
.cbAlignment = 1,
|
||||
};
|
||||
const MFT_INPUT_STREAM_INFO input_info =
|
||||
{
|
||||
- .cbSize = actual_width * actual_height * 3 / 2,
|
||||
+ .cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2,
|
||||
.cbAlignment = 1,
|
||||
};
|
||||
|
||||
const struct buffer_desc output_buffer_desc =
|
||||
{
|
||||
- .length = actual_width * actual_height * 4,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4,
|
||||
.compare = compare_rgb32, .compare_rect = {.right = 82, .bottom = 84},
|
||||
- .dump = dump_rgb32, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_rgb32, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
@@ -7457,12 +7457,11 @@ static void test_video_processor(void)
|
||||
};
|
||||
|
||||
static const MFVideoArea actual_aperture = {.Area={82,84}};
|
||||
- static const DWORD actual_width = 96, actual_height = 96;
|
||||
const struct attribute_desc rgb32_with_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16),
|
||||
{0},
|
||||
};
|
||||
@@ -7470,62 +7469,62 @@ static void test_video_processor(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc nv12_default_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb32_default_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb32_negative_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb32_positive_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 4),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 4),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb555_default_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB555, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb555_negative_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB555, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -actual_width * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, -ACTUAL_WIDTH * 2),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc rgb555_positive_stride[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB555, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
- ATTR_UINT32(MF_MT_DEFAULT_STRIDE, actual_width * 2),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
+ ATTR_UINT32(MF_MT_DEFAULT_STRIDE, ACTUAL_WIDTH * 2),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc nv12_no_aperture[] =
|
||||
@@ -7539,7 +7538,7 @@ static void test_video_processor(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video, .required = TRUE),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_NV12, .required = TRUE),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height, .required = TRUE),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, ACTUAL_WIDTH, ACTUAL_HEIGHT, .required = TRUE),
|
||||
ATTR_BLOB(MF_MT_MINIMUM_DISPLAY_APERTURE, &actual_aperture, 16),
|
||||
ATTR_BLOB(MF_MT_GEOMETRIC_APERTURE, &actual_aperture, 16),
|
||||
ATTR_BLOB(MF_MT_PAN_SCAN_APERTURE, &actual_aperture, 16),
|
||||
@@ -7564,9 +7563,9 @@ static void test_video_processor(void)
|
||||
};
|
||||
const struct buffer_desc rgb32_buffer_desc =
|
||||
{
|
||||
- .length = actual_width * actual_height * 4,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4,
|
||||
.compare = compare_rgb32, .compare_rect = {.top = 12, .right = 82, .bottom = 96},
|
||||
- .dump = dump_rgb32, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_rgb32, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc rgb32_sample_desc =
|
||||
{
|
||||
@@ -7590,9 +7589,9 @@ static void test_video_processor(void)
|
||||
|
||||
const struct buffer_desc rgb555_buffer_desc =
|
||||
{
|
||||
- .length = actual_width * actual_height * 2,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 2,
|
||||
.compare = compare_rgb16, .compare_rect = {.top = 12, .right = 82, .bottom = 96},
|
||||
- .dump = dump_rgb16, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_rgb16, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc rgb555_sample_desc =
|
||||
{
|
||||
@@ -7603,9 +7602,9 @@ static void test_video_processor(void)
|
||||
|
||||
const struct buffer_desc nv12_buffer_desc =
|
||||
{
|
||||
- .length = actual_width * actual_height * 3 / 2,
|
||||
+ .length = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2,
|
||||
.compare = compare_nv12, .compare_rect = {.top = 12, .right = 82, .bottom = 96},
|
||||
- .dump = dump_nv12, .size = {.cx = actual_width, .cy = actual_height},
|
||||
+ .dump = dump_nv12, .size = {.cx = ACTUAL_WIDTH, .cy = ACTUAL_HEIGHT},
|
||||
};
|
||||
const struct sample_desc nv12_sample_desc =
|
||||
{
|
||||
@@ -7994,7 +7993,7 @@ static void test_video_processor(void)
|
||||
|
||||
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
|
||||
ok(hr == MF_E_ATTRIBUTENOTFOUND, "SetInputType returned %#lx.\n", hr);
|
||||
- hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)actual_width << 32 | actual_height);
|
||||
+ hr = IMFMediaType_SetUINT64(media_type, &MF_MT_FRAME_SIZE, (UINT64)ACTUAL_WIDTH << 32 | ACTUAL_HEIGHT);
|
||||
ok(hr == S_OK, "SetUINT64 returned %#lx.\n", hr);
|
||||
hr = IMFTransform_SetInputType(transform, 0, media_type, 0);
|
||||
ok(hr == S_OK, "SetInputType returned %#lx.\n", hr);
|
||||
@@ -8083,12 +8082,12 @@ static void test_video_processor(void)
|
||||
|
||||
if (test->output_sample_desc == &nv12_sample_desc)
|
||||
{
|
||||
- output_info.cbSize = actual_width * actual_height * 3 / 2;
|
||||
+ output_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2;
|
||||
check_mft_get_output_stream_info(transform, S_OK, &output_info);
|
||||
}
|
||||
else if (test->output_sample_desc == &rgb555_sample_desc)
|
||||
{
|
||||
- output_info.cbSize = actual_width * actual_height * 2;
|
||||
+ output_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 2;
|
||||
check_mft_get_output_stream_info(transform, S_OK, &output_info);
|
||||
}
|
||||
else if (test->output_sample_desc == &rgb32_crop_sample_desc)
|
||||
@@ -8098,18 +8097,18 @@ static void test_video_processor(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
- output_info.cbSize = actual_width * actual_height * 4;
|
||||
+ output_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4;
|
||||
check_mft_get_output_stream_info(transform, S_OK, &output_info);
|
||||
}
|
||||
|
||||
if (test->input_type_desc == nv12_default_stride || test->input_type_desc == nv12_with_aperture)
|
||||
{
|
||||
- input_info.cbSize = actual_width * actual_height * 3 / 2;
|
||||
+ input_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 3 / 2;
|
||||
check_mft_get_input_stream_info(transform, S_OK, &input_info);
|
||||
}
|
||||
else if (test->input_type_desc == rgb555_default_stride)
|
||||
{
|
||||
- input_info.cbSize = actual_width * actual_height * 2;
|
||||
+ input_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 2;
|
||||
check_mft_get_input_stream_info(transform, S_OK, &input_info);
|
||||
}
|
||||
else if (test->input_type_desc == rgb32_no_aperture)
|
||||
@@ -8119,7 +8118,7 @@ static void test_video_processor(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
- input_info.cbSize = actual_width * actual_height * 4;
|
||||
+ input_info.cbSize = ACTUAL_WIDTH * ACTUAL_HEIGHT * 4;
|
||||
check_mft_get_input_stream_info(transform, S_OK, &input_info);
|
||||
}
|
||||
|
||||
@@ -8608,7 +8607,7 @@ static HRESULT get_next_h264_output_sample(IMFTransform *transform, IMFSample **
|
||||
|
||||
static void test_h264_with_dxgi_manager(void)
|
||||
{
|
||||
- static const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
+ static const unsigned int aligned_width = 96, aligned_height = 96;
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
ATTR_UINT32(MFSampleExtension_CleanPoint, 1),
|
||||
@@ -8617,7 +8616,7 @@ static void test_h264_with_dxgi_manager(void)
|
||||
const struct buffer_desc output_buffer_desc_nv12 =
|
||||
{
|
||||
.length = aligned_width * aligned_height * 3 / 2,
|
||||
- .compare = compare_nv12, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
+ .compare = compare_nv12, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
.dump = dump_nv12, .size = {.cx = aligned_width, .cy = aligned_height},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_nv12 =
|
||||
@@ -8775,8 +8774,8 @@ static void test_h264_with_dxgi_manager(void)
|
||||
ok(hr == S_OK, "got %#lx\n", hr);
|
||||
ok(!area.OffsetX.value && !area.OffsetX.fract, "got %d.%d.\n", area.OffsetX.value, area.OffsetX.fract);
|
||||
ok(!area.OffsetY.value && !area.OffsetY.fract, "got %d.%d.\n", area.OffsetY.value, area.OffsetY.fract);
|
||||
- ok(area.Area.cx == set_width, "got %ld.\n", area.Area.cx);
|
||||
- ok(area.Area.cy == set_height, "got %ld.\n", area.Area.cy);
|
||||
+ ok(area.Area.cx == SET_WIDTH, "got %ld.\n", area.Area.cx);
|
||||
+ ok(area.Area.cy == SET_HEIGHT, "got %ld.\n", area.Area.cy);
|
||||
|
||||
hr = IMFMediaType_GetGUID(type, &MF_MT_SUBTYPE, &guid);
|
||||
ok(hr == S_OK, "Failed to get subtype, hr %#lx.\n", hr);
|
||||
@@ -9149,7 +9148,7 @@ static IMFSample *create_d3d_sample(IMFVideoSampleAllocator *allocator, const vo
|
||||
|
||||
static void test_video_processor_with_dxgi_manager(void)
|
||||
{
|
||||
- static const unsigned int set_width = 82, set_height = 84, aligned_width = 96, aligned_height = 96;
|
||||
+ static const unsigned int aligned_width = 96, aligned_height = 96;
|
||||
const struct attribute_desc output_sample_attributes[] =
|
||||
{
|
||||
{0},
|
||||
@@ -9157,7 +9156,7 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
const struct buffer_desc output_buffer_desc_rgb32 =
|
||||
{
|
||||
.length = aligned_width * aligned_height * 4,
|
||||
- .compare = compare_rgb32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
+ .compare = compare_rgb32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
.dump = dump_rgb32, .size = {.cx = aligned_width, .cy = aligned_height},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_rgb32 =
|
||||
@@ -9169,9 +9168,9 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
|
||||
const struct buffer_desc output_buffer_desc_rgb32_crop =
|
||||
{
|
||||
- .length = set_width * set_height * 4,
|
||||
- .compare = compare_rgb32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
- .dump = dump_rgb32, .size = {.cx = set_width, .cy = set_height},
|
||||
+ .length = SET_WIDTH * SET_HEIGHT * 4,
|
||||
+ .compare = compare_rgb32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
+ .dump = dump_rgb32, .size = {.cx = SET_WIDTH, .cy = SET_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_rgb32_crop =
|
||||
{
|
||||
@@ -9182,9 +9181,9 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
|
||||
const struct buffer_desc output_buffer_desc_abgr32_crop =
|
||||
{
|
||||
- .length = set_width * set_height * 4,
|
||||
- .compare = compare_abgr32, .compare_rect = {.right = set_width, .bottom = set_height},
|
||||
- .dump = dump_rgb32, .size = {.cx = set_width, .cy = set_height},
|
||||
+ .length = SET_WIDTH * SET_HEIGHT * 4,
|
||||
+ .compare = compare_abgr32, .compare_rect = {.right = SET_WIDTH, .bottom = SET_HEIGHT},
|
||||
+ .dump = dump_rgb32, .size = {.cx = SET_WIDTH, .cy = SET_HEIGHT},
|
||||
};
|
||||
const struct sample_desc output_sample_desc_abgr32_crop =
|
||||
{
|
||||
@@ -9211,7 +9210,7 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
};
|
||||
|
||||
- static const MFVideoArea aperture = {.Area={set_width, set_height}};
|
||||
+ static const MFVideoArea aperture = {.Area={SET_WIDTH, SET_HEIGHT}};
|
||||
const struct attribute_desc nv12_with_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
@@ -9226,14 +9225,14 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_RGB32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, set_width, set_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, SET_WIDTH, SET_HEIGHT),
|
||||
{0},
|
||||
};
|
||||
const struct attribute_desc abgr32_no_aperture[] =
|
||||
{
|
||||
ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video),
|
||||
ATTR_GUID(MF_MT_SUBTYPE, MFVideoFormat_ABGR32),
|
||||
- ATTR_RATIO(MF_MT_FRAME_SIZE, set_width, set_height),
|
||||
+ ATTR_RATIO(MF_MT_FRAME_SIZE, SET_WIDTH, SET_HEIGHT),
|
||||
{0},
|
||||
};
|
||||
|
||||
@@ -9567,8 +9566,8 @@ static void test_video_processor_with_dxgi_manager(void)
|
||||
ok(!desc.CPUAccessFlags, "got %#x.\n", desc.CPUAccessFlags);
|
||||
ok(!desc.MiscFlags, "got %#x.\n", desc.MiscFlags);
|
||||
ok(desc.MipLevels == 1, "git %u.\n", desc.MipLevels);
|
||||
- ok(desc.Width == set_width, "got %u.\n", desc.Width);
|
||||
- ok(desc.Height == set_height, "got %u.\n", desc.Height);
|
||||
+ ok(desc.Width == SET_WIDTH, "got %u.\n", desc.Width);
|
||||
+ ok(desc.Height == SET_HEIGHT, "got %u.\n", desc.Height);
|
||||
|
||||
ID3D11Texture2D_Release(tex2d);
|
||||
IMFDXGIBuffer_Release(dxgi_buffer);
|
||||
@@ -9635,8 +9634,8 @@ skip_rgb32:
|
||||
ok(!desc.CPUAccessFlags, "got %#x.\n", desc.CPUAccessFlags);
|
||||
ok(!desc.MiscFlags, "got %#x.\n", desc.MiscFlags);
|
||||
ok(desc.MipLevels == 1, "git %u.\n", desc.MipLevels);
|
||||
- ok(desc.Width == set_width, "got %u.\n", desc.Width);
|
||||
- ok(desc.Height == set_height, "got %u.\n", desc.Height);
|
||||
+ ok(desc.Width == SET_WIDTH, "got %u.\n", desc.Width);
|
||||
+ ok(desc.Height == SET_HEIGHT, "got %u.\n", desc.Height);
|
||||
|
||||
ID3D11Texture2D_Release(tex2d);
|
||||
IMFDXGIBuffer_Release(dxgi_buffer);
|
||||
--
|
||||
2.45.2
|
||||
|
@ -9,7 +9,9 @@ Sat Jun 29 07:00:18 UTC 2024 - Marcus Meissner <meissner@suse.com>
|
||||
- Various bug fixes.
|
||||
- update staging to 9.12 release
|
||||
- 0001-winewayland-Avoid-crashing-when-the-dummy-window-sur.patch: upstream
|
||||
|
||||
- removed/merged to below: 0001-mf-tests-help-older-compilers-by-using-defines.patch
|
||||
- added: 0001-mf-tests-use-defines-instead-of-static-const-for-old.patch
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Sun Jun 23 11:23:40 UTC 2024 - Marcus Meissner <meissner@suse.com>
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user