From 3155671a2c3b59a8132dd42b0f4ea3e4501df5fe63681798f8e2bcb663f694bb Mon Sep 17 00:00:00 2001 From: Marcus Meissner Date: Wed, 10 Jul 2024 08:11:55 +0000 Subject: [PATCH] OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=1133 --- ...static-specifier-on-variables-refere.patch | 36 + ...ines-instead-of-static-const-for-old.patch | 942 ------------------ wine.spec | 2 +- 3 files changed, 37 insertions(+), 943 deletions(-) create mode 100644 0001-mf-tests-Remove-static-specifier-on-variables-refere.patch delete mode 100644 0001-mf-tests-use-defines-instead-of-static-const-for-old.patch diff --git a/0001-mf-tests-Remove-static-specifier-on-variables-refere.patch b/0001-mf-tests-Remove-static-specifier-on-variables-refere.patch new file mode 100644 index 0000000..c073c88 --- /dev/null +++ b/0001-mf-tests-Remove-static-specifier-on-variables-refere.patch @@ -0,0 +1,36 @@ +From c784fb4bad3519b692e71ff4a46b1263af27c0d8 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?R=C3=A9mi=20Bernon?= +Date: Mon, 8 Jul 2024 14:38:30 +0200 +Subject: [PATCH] mf/tests: Remove static specifier on variables referencing + other variables. + +Signed-off-by: Marcus Meissner +--- + dlls/mf/tests/transform.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/dlls/mf/tests/transform.c b/dlls/mf/tests/transform.c +index 4313d7e3241..ef0bec60ed5 100644 +--- a/dlls/mf/tests/transform.c ++++ b/dlls/mf/tests/transform.c +@@ -3857,7 +3857,7 @@ static void test_h264_encoder(void) + ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), + {0}, + }; +- static const struct attribute_desc expect_available_input_attributes[] = ++ const struct attribute_desc expect_available_input_attributes[] = + { + ATTR_RATIO(MF_MT_FRAME_SIZE, actual_width, actual_height), + ATTR_RATIO(MF_MT_FRAME_RATE, 30000, 1001), +@@ -9244,7 +9244,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}}; ++ const MFVideoArea aperture = {.Area={set_width, set_height}}; + const struct attribute_desc nv12_with_aperture[] = + { + ATTR_GUID(MF_MT_MAJOR_TYPE, MFMediaType_Video), +-- +2.45.2 + diff --git a/0001-mf-tests-use-defines-instead-of-static-const-for-old.patch b/0001-mf-tests-use-defines-instead-of-static-const-for-old.patch deleted file mode 100644 index f2dee3a..0000000 --- a/0001-mf-tests-use-defines-instead-of-static-const-for-old.patch +++ /dev/null @@ -1,942 +0,0 @@ -From 8386536fb7c3d3678c1d022e89fe248c3d8eed79 Mon Sep 17 00:00:00 2001 -From: Marcus Meissner -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 ---- - 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 - diff --git a/wine.spec b/wine.spec index 8d3ad00..2039d82 100644 --- a/wine.spec +++ b/wine.spec @@ -176,7 +176,7 @@ Source7: baselibs.conf Source8: wine-rpmlintrc # SUSE specific patches # - currently none, but add them here -#Patch0: 0001-mf-tests-use-defines-instead-of-static-const-for-old.patch +Patch0: 0001-mf-tests-Remove-static-specifier-on-variables-refere.patch Recommends: wine-gecko >= 2.47.4 Conflicts: wine-gecko < 2.47.4 Recommends: wine-mono >= 9.2.0