Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
V
vlc
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Redmine
Redmine
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Metrics
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
videolan
vlc
Commits
a3972541
Commit
a3972541
authored
Jul 01, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: automatic ITU-R colour space matrix selection
(same as OpenGL shaders)
parent
07946c4e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
2 deletions
+27
-2
modules/hw/vdpau/chroma.c
modules/hw/vdpau/chroma.c
+27
-2
No files found.
modules/hw/vdpau/chroma.c
View file @
a3972541
...
...
@@ -46,6 +46,22 @@ struct filter_sys_t
picture_t
*
history
[
MAX_PAST
+
1
+
MAX_FUTURE
];
};
/** Initialize the colour space conversion matrix */
static
VdpStatus
MixerSetupColors
(
filter_t
*
filter
,
VdpCSCMatrix
*
restrict
csc
)
{
filter_sys_t
*
sys
=
filter
->
p_sys
;
VdpStatus
err
;
VdpColorStandard
std
=
(
filter
->
fmt_in
.
video
.
i_height
>
576
)
?
VDP_COLOR_STANDARD_ITUR_BT_709
:
VDP_COLOR_STANDARD_ITUR_BT_601
;
err
=
vdp_generate_csc_matrix
(
sys
->
vdp
,
NULL
,
std
,
csc
);
if
(
err
!=
VDP_STATUS_OK
)
msg_Err
(
filter
,
"video %s failure: %s"
,
"color space matrix"
,
vdp_get_error_string
(
sys
->
vdp
,
err
));
return
err
;
}
/** Create VDPAU video mixer */
static
VdpVideoMixer
MixerCreate
(
filter_t
*
filter
)
{
...
...
@@ -115,11 +131,20 @@ static VdpVideoMixer MixerCreate(filter_t *filter)
}
/* Set initial features and attributes */
VdpVideoMixerAttribute
attrv
[
1
];
const
void
*
valv
[
1
];
VdpVideoMixerAttribute
attrv
[
2
];
const
void
*
valv
[
2
];
unsigned
attrc
=
0
;
VdpCSCMatrix
csc
;
featc
=
0
;
if
(
MixerSetupColors
(
filter
,
&
csc
)
==
VDP_STATUS_OK
)
{
attrv
[
attrc
]
=
VDP_VIDEO_MIXER_ATTRIBUTE_CSC_MATRIX
;
valv
[
attrc
]
=
&
csc
;
attrc
++
;
}
if
(
noise
>
0
.
f
)
{
featv
[
featc
++
]
=
VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION
;
...
...
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