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
c0090b15
Commit
c0090b15
authored
Jun 28, 2013
by
Rémi Denis-Courmont
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
vdpau: configurable noise reduction
parent
913a4283
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
56 additions
and
1 deletion
+56
-1
modules/hw/vdpau/chroma.c
modules/hw/vdpau/chroma.c
+56
-1
No files found.
modules/hw/vdpau/chroma.c
View file @
c0090b15
...
...
@@ -55,9 +55,21 @@ static VdpVideoMixer MixerCreate(filter_t *filter)
VdpBool
ok
;
/* Check for potentially useful features */
VdpVideoMixerFeature
featv
[
1
];
VdpVideoMixerFeature
featv
[
2
];
unsigned
featc
=
0
;
const
float
noise
=
var_InheritFloat
(
filter
,
"vdpau-noise-reduction"
);
if
(
noise
>
0
.
f
)
{
err
=
vdp_video_mixer_query_feature_support
(
sys
->
vdp
,
sys
->
device
,
VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION
,
&
ok
);
if
(
err
==
VDP_STATUS_OK
&&
ok
==
VDP_TRUE
)
{
msg_Dbg
(
filter
,
"using video mixer %s feature"
,
"noise reduction"
);
featv
[
featc
++
]
=
VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION
;
}
}
err
=
vdp_video_mixer_query_feature_support
(
sys
->
vdp
,
sys
->
device
,
VDP_VIDEO_MIXER_FEATURE_SHARPNESS
,
&
ok
);
if
(
err
==
VDP_STATUS_OK
&&
ok
==
VDP_TRUE
)
...
...
@@ -84,6 +96,45 @@ static VdpVideoMixer MixerCreate(filter_t *filter)
vdp_get_error_string
(
sys
->
vdp
,
err
));
mixer
=
VDP_INVALID_HANDLE
;
}
/* Set initial features and attributes */
VdpVideoMixerAttribute
attrv
[
1
];
const
void
*
valv
[
1
];
unsigned
attrc
=
0
;
featc
=
0
;
if
(
noise
>
0
.
f
)
{
featv
[
featc
++
]
=
VDP_VIDEO_MIXER_FEATURE_NOISE_REDUCTION
;
attrv
[
attrc
]
=
VDP_VIDEO_MIXER_ATTRIBUTE_NOISE_REDUCTION_LEVEL
;
valv
[
attrc
]
=
&
noise
;
attrc
++
;
}
if
(
featc
>
0
)
{
VdpBool
enablev
[
featc
];
for
(
unsigned
i
=
0
;
i
<
featc
;
i
++
)
enablev
[
i
]
=
VDP_TRUE
;
err
=
vdp_video_mixer_set_feature_enables
(
sys
->
vdp
,
mixer
,
featc
,
featv
,
enablev
);
if
(
err
!=
VDP_STATUS_OK
)
msg_Err
(
filter
,
"video %s %s failure: %s"
,
"mixer"
,
"features"
,
vdp_get_error_string
(
sys
->
vdp
,
err
));
}
if
(
attrc
>
0
)
{
err
=
vdp_video_mixer_set_attribute_values
(
sys
->
vdp
,
mixer
,
attrc
,
attrv
,
valv
);
if
(
err
!=
VDP_STATUS_OK
)
msg_Err
(
filter
,
"video %s %s failure: %s"
,
"mixer"
,
"attributes"
,
vdp_get_error_string
(
sys
->
vdp
,
err
));
}
return
mixer
;
}
...
...
@@ -516,6 +567,10 @@ vlc_module_begin()
set_category
(
CAT_VIDEO
)
set_subcategory
(
SUBCAT_VIDEO_VFILTER
)
set_callbacks
(
OutputOpen
,
OutputClose
)
add_float_with_range
(
"vdpau-noise-reduction"
,
0
.,
0
.,
1
.,
N_
(
"Noise reduction level"
),
N_
(
"Noise reduction level"
),
true
)
add_submodule
()
set_callbacks
(
YCbCrOpen
,
YCbCrClose
)
vlc_module_end
()
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