Marcus Meissner
da5fda892a
OBS-URL: https://build.opensuse.org/package/show/Emulators/wine?expand=0&rev=1113
117 lines
5.1 KiB
Diff
117 lines
5.1 KiB
Diff
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
|
|
|