Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
d4cf74da
Commit
d4cf74da
authored
May 17, 2023
by
Rémi Bernon
Committed by
Alexandre Julliard
May 23, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mf/tests: Rename some variables in video processor transform tests.
parent
cb3a2637
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
35 additions
and
43 deletions
+35
-43
resource.rc
dlls/mf/tests/resource.rc
+2
-2
rgb32frame-flip.bmp
dlls/mf/tests/rgb32frame-flip.bmp
+0
-0
transform.c
dlls/mf/tests/transform.c
+33
-41
No files found.
dlls/mf/tests/resource.rc
View file @
d4cf74da
...
...
@@ -80,8 +80,8 @@ i420frame.bmp RCDATA i420frame.bmp
rgb32frame.bmp RCDATA rgb32frame.bmp
/* Generated from running the tests on Windows */
/* @makedep: rgb32frame-
v
p.bmp */
rgb32frame-
vp.bmp RCDATA rgb32frame-v
p.bmp
/* @makedep: rgb32frame-
fli
p.bmp */
rgb32frame-
flip.bmp RCDATA rgb32frame-fli
p.bmp
/* Generated from running the tests on Windows */
/* @makedep: rgb32frame-grabber.bmp */
...
...
dlls/mf/tests/rgb32frame-
v
p.bmp
→
dlls/mf/tests/rgb32frame-
fli
p.bmp
View file @
d4cf74da
File moved
dlls/mf/tests/transform.c
View file @
d4cf74da
...
...
@@ -5146,7 +5146,7 @@ static void test_wmv_decoder(void)
.
expect_input_info
=
&
expect_input_info_rgb
,
.
expect_output_info
=
&
expect_output_info_rgb
,
.
output_sample_desc
=
&
output_sample_desc_rgb
,
.
result_bitmap
=
L"rgb32frame-
v
p.bmp"
,
.
result_bitmap
=
L"rgb32frame-
fli
p.bmp"
,
.
delta
=
5
,
},
...
...
@@ -5157,7 +5157,7 @@ static void test_wmv_decoder(void)
.
expect_input_info
=
&
expect_input_info_rgb
,
.
expect_output_info
=
&
expect_output_info_rgb
,
.
output_sample_desc
=
&
output_sample_desc_rgb
,
.
result_bitmap
=
L"rgb32frame-
v
p.bmp"
,
.
result_bitmap
=
L"rgb32frame-
fli
p.bmp"
,
.
delta
=
5
,
},
...
...
@@ -5168,7 +5168,7 @@ static void test_wmv_decoder(void)
.
expect_input_info
=
&
expect_input_info_rgb
,
.
expect_output_info
=
&
expect_output_info_rgb
,
.
output_sample_desc
=
&
output_sample_desc_rgb
,
.
result_bitmap
=
L"rgb32frame-
v
p.bmp"
,
.
result_bitmap
=
L"rgb32frame-
fli
p.bmp"
,
.
delta
=
5
,
},
...
...
@@ -5849,7 +5849,7 @@ static void test_color_convert(void)
/* YUV -> RGB (negative stride) */
.
output_type_desc
=
output_type_desc_negative_stride
,
.
expect_output_type_desc
=
expect_output_type_desc_negative_stride
,
.
result_bitmap
=
L"rgb32frame-
v
p.bmp"
,
.
result_bitmap
=
L"rgb32frame-
fli
p.bmp"
,
.
delta
=
6
,
},
...
...
@@ -6134,7 +6134,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
struct
attribute_desc
input_type_desc
[]
=
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
),
...
...
@@ -6142,7 +6142,7 @@ static void test_video_processor(void)
ATTR_BLOB
(
MF_MT_MINIMUM_DISPLAY_APERTURE
,
&
actual_aperture
,
16
),
{
0
},
};
const
struct
attribute_desc
output_type_desc
[]
=
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
),
...
...
@@ -6150,7 +6150,7 @@ static void test_video_processor(void)
ATTR_BLOB
(
MF_MT_MINIMUM_DISPLAY_APERTURE
,
&
actual_aperture
,
16
),
{
0
},
};
const
struct
attribute_desc
output_type_desc
_negative_stride
[]
=
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
),
...
...
@@ -6159,7 +6159,7 @@ static void test_video_processor(void)
ATTR_UINT32
(
MF_MT_DEFAULT_STRIDE
,
-
actual_width
*
4
),
{
0
},
};
const
struct
attribute_desc
output_type_desc
_positive_stride
[]
=
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
),
...
...
@@ -6173,57 +6173,48 @@ static void test_video_processor(void)
MFT_OUTPUT_STREAM_INFO
output_info
=
{
0
};
MFT_INPUT_STREAM_INFO
input_info
=
{
0
};
const
struct
buffer_desc
output_buffer_desc
=
{
.
length
=
actual_width
*
actual_height
*
4
,
.
compare
=
compare_rgb32
,
.
dump
=
dump_rgb32
,
.
rect
=
{.
top
=
12
,
.
right
=
82
,
.
bottom
=
96
},
};
const
struct
attribute_desc
output_sample_attributes
[]
=
{
ATTR_UINT32
(
MFSampleExtension_CleanPoint
,
1
,
.
todo
=
TRUE
),
{
0
},
};
const
struct
sample_desc
output_sample_desc
=
const
struct
buffer_desc
rgb32_buffer_desc
=
{
.
length
=
actual_width
*
actual_height
*
4
,
.
compare
=
compare_rgb32
,
.
dump
=
dump_rgb32
,
.
rect
=
{.
top
=
12
,
.
right
=
82
,
.
bottom
=
96
},
};
const
struct
sample_desc
rgb32_sample_desc
=
{
.
attributes
=
output_sample_attributes
,
.
sample_time
=
0
,
.
sample_duration
=
10000000
,
.
buffer_count
=
1
,
.
buffers
=
&
output
_buffer_desc
,
.
buffer_count
=
1
,
.
buffers
=
&
rgb32
_buffer_desc
,
};
const
struct
transform_desc
{
const
struct
attribute_desc
*
input_type_desc
;
const
struct
attribute_desc
*
output_type_desc
;
const
struct
attribute_desc
*
expect_output_typ
e_desc
;
const
struct
sample_desc
*
output_sampl
e_desc
;
const
WCHAR
*
result_bitmap
;
ULONG
delta
;
}
video_processor_tests
[]
=
{
{
/* YUV -> RGB */
.
output_type_desc
=
output_type_desc
,
.
expect_output_type_desc
=
output_type_desc
,
.
result_bitmap
=
L"rgb32frame-vp.bmp"
,
.
input_type_desc
=
nv12_default_stride
,
.
output_type_desc
=
rgb32_default_stride
,
.
output_sample_desc
=
&
rgb32_sample_desc
,
.
result_bitmap
=
L"rgb32frame-flip.bmp"
,
.
delta
=
2
,
/* Windows returns 0, Wine needs 2 */
},
{
/* YUV -> RGB (negative stride) */
.
output_type_desc
=
output_type_desc_negative_stride
,
.
expect_output_type_desc
=
output_type_desc_negative_stride
,
.
result_bitmap
=
L"rgb32frame-vp.bmp"
,
.
input_type_desc
=
nv12_default_stride
,
.
output_type_desc
=
rgb32_negative_stride
,
.
output_sample_desc
=
&
rgb32_sample_desc
,
.
result_bitmap
=
L"rgb32frame-flip.bmp"
,
.
delta
=
2
,
/* Windows returns 0, Wine needs 2 */
},
{
/* YUV -> RGB (positive stride) */
.
output_type_desc
=
output_type_desc_positive_stride
,
.
expect_output_type_desc
=
output_type_desc_positive_stride
,
.
result_bitmap
=
L"rgb32frame.bmp"
,
.
input_type_desc
=
nv12_default_stride
,
.
output_type_desc
=
rgb32_positive_stride
,
.
output_sample_desc
=
&
rgb32_sample_desc
,
.
result_bitmap
=
L"rgb32frame.bmp"
,
.
delta
=
6
,
},
};
MFT_REGISTER_TYPE_INFO
output_type
=
{
MFMediaType_Video
,
MFVideoFormat_NV12
};
...
...
@@ -6538,15 +6529,17 @@ static void test_video_processor(void)
for
(
i
=
0
;
i
<
ARRAY_SIZE
(
video_processor_tests
);
i
++
)
{
const
struct
transform_desc
*
test
=
video_processor_tests
+
i
;
winetest_push_context
(
"transform #%lu"
,
i
);
check_mft_set_input_type_required
(
transform
,
input_type_desc
);
check_mft_set_input_type
(
transform
,
input_type_desc
);
check_mft_get_input_current_type
(
transform
,
input_type_desc
);
check_mft_set_input_type_required
(
transform
,
test
->
input_type_desc
);
check_mft_set_input_type
(
transform
,
test
->
input_type_desc
);
check_mft_get_input_current_type
(
transform
,
test
->
input_type_desc
);
check_mft_set_output_type_required
(
transform
,
video_processor_tests
[
i
].
output_type_desc
);
check_mft_set_output_type
(
transform
,
video_processor_tests
[
i
].
output_type_desc
,
S_OK
);
check_mft_get_output_current_type
(
transform
,
video_processor_tests
[
i
].
output_type_desc
);
check_mft_set_output_type_required
(
transform
,
test
->
output_type_desc
);
check_mft_set_output_type
(
transform
,
test
->
output_type_desc
,
S_OK
);
check_mft_get_output_current_type
(
transform
,
test
->
output_type_desc
);
input_info
.
cbSize
=
actual_width
*
actual_height
*
3
/
2
;
output_info
.
cbSize
=
actual_width
*
actual_height
*
4
;
...
...
@@ -6594,9 +6587,8 @@ static void test_video_processor(void)
ref
=
IMFSample_Release
(
output_sample
);
ok
(
ref
==
1
,
"Release returned %ld
\n
"
,
ref
);
ret
=
check_mf_sample_collection
(
output_samples
,
&
output_sample_desc
,
video_processor_tests
[
i
].
result_bitmap
);
ok
(
ret
<=
video_processor_tests
[
i
].
delta
ret
=
check_mf_sample_collection
(
output_samples
,
test
->
output_sample_desc
,
test
->
result_bitmap
);
ok
(
ret
<=
test
->
delta
/* w1064v1507 / w1064v1809 incorrectly rescale */
||
broken
(
ret
==
25
)
||
broken
(
ret
==
32
),
"got %lu%% diff
\n
"
,
ret
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment