Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-cw
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-cw
Commits
43dd2fbf
Commit
43dd2fbf
authored
Jul 15, 2021
by
Nikolay Sivov
Committed by
Alexandre Julliard
Jul 19, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evr/mixer: Set MF_MT_INTERLACE_MODE for the mixer output types.
Signed-off-by:
Nikolay Sivov
<
nsivov@codeweavers.com
>
Signed-off-by:
Alexandre Julliard
<
julliard@winehq.org
>
parent
c889bab4
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
mixer.c
dlls/evr/mixer.c
+20
-1
evr.c
dlls/evr/tests/evr.c
+3
-0
No files found.
dlls/evr/mixer.c
View file @
43dd2fbf
...
...
@@ -657,11 +657,28 @@ static void video_mixer_append_rt_format(struct rt_format *rt_formats, unsigned
*
count
+=
1
;
}
static
unsigned
int
video_mixer_get_interlace_mode_from_video_desc
(
const
DXVA2_VideoDesc
*
video_desc
)
{
switch
(
video_desc
->
SampleFormat
.
SampleFormat
)
{
case
DXVA2_SampleFieldInterleavedEvenFirst
:
return
MFVideoInterlace_FieldInterleavedUpperFirst
;
case
DXVA2_SampleFieldInterleavedOddFirst
:
return
MFVideoInterlace_FieldInterleavedLowerFirst
;
case
DXVA2_SampleFieldSingleEven
:
return
MFVideoInterlace_FieldSingleUpper
;
case
DXVA2_SampleFieldSingleOdd
:
return
MFVideoInterlace_FieldSingleLower
;
default:
return
MFVideoInterlace_Progressive
;
}
}
static
HRESULT
video_mixer_collect_output_types
(
struct
video_mixer
*
mixer
,
const
DXVA2_VideoDesc
*
video_desc
,
IMFMediaType
*
media_type
,
IDirectXVideoProcessorService
*
service
,
unsigned
int
device_count
,
const
GUID
*
devices
,
unsigned
int
flags
)
{
unsigned
int
i
,
j
,
format_count
,
count
;
unsigned
int
i
,
j
,
format_count
,
count
,
interlace_mode
;
struct
rt_format
*
rt_formats
=
NULL
,
*
ptr
;
HRESULT
hr
=
MF_E_INVALIDMEDIATYPE
;
MFVideoArea
aperture
;
...
...
@@ -702,6 +719,7 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
memset
(
&
aperture
,
0
,
sizeof
(
aperture
));
aperture
.
Area
.
cx
=
video_desc
->
SampleWidth
;
aperture
.
Area
.
cy
=
video_desc
->
SampleHeight
;
interlace_mode
=
video_mixer_get_interlace_mode_from_video_desc
(
video_desc
);
for
(
i
=
0
;
i
<
count
;
++
i
)
{
IMFMediaType
*
rt_media_type
;
...
...
@@ -714,6 +732,7 @@ static HRESULT video_mixer_collect_output_types(struct video_mixer *mixer, const
IMFMediaType_SetGUID
(
rt_media_type
,
&
MF_MT_SUBTYPE
,
&
subtype
);
IMFMediaType_SetBlob
(
rt_media_type
,
&
MF_MT_GEOMETRIC_APERTURE
,
(
const
UINT8
*
)
&
aperture
,
sizeof
(
aperture
));
IMFMediaType_SetBlob
(
rt_media_type
,
&
MF_MT_MINIMUM_DISPLAY_APERTURE
,
(
const
UINT8
*
)
&
aperture
,
sizeof
(
aperture
));
IMFMediaType_SetUINT32
(
rt_media_type
,
&
MF_MT_INTERLACE_MODE
,
interlace_mode
);
mixer
->
output
.
rt_formats
[
i
].
media_type
=
rt_media_type
;
}
...
...
dlls/evr/tests/evr.c
View file @
43dd2fbf
...
...
@@ -1056,6 +1056,9 @@ static void test_default_mixer_type_negotiation(void)
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetUINT32
(
media_type
,
&
MF_MT_ALL_SAMPLES_INDEPENDENT
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
hr
=
IMFMediaType_GetUINT32
(
media_type
,
&
MF_MT_INTERLACE_MODE
,
&
value
);
ok
(
hr
==
S_OK
,
"Unexpected hr %#x.
\n
"
,
hr
);
ok
(
value
==
MFVideoInterlace_Progressive
,
"Unexpected interlace mode.
\n
"
);
IMFMediaType_Release
(
media_type
);
}
...
...
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