Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
VLC
Manage
Activity
Members
Labels
Plan
Issues
4k
Issue boards
Milestones
Code
Merge requests
456
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Analyze
Contributor analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
VideoLAN
VLC
Commits
2ec43b29
Commit
2ec43b29
authored
11 years ago
by
Jean-Baptiste Kempf
Browse files
Options
Downloads
Patches
Plain Diff
hqdn3d: allow live modification of params
parent
339e21d5
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
modules/video_filter/hqdn3d.c
+29
-0
29 additions, 0 deletions
modules/video_filter/hqdn3d.c
with
29 additions
and
0 deletions
modules/video_filter/hqdn3d.c
+
29
−
0
View file @
2ec43b29
...
...
@@ -43,6 +43,9 @@
static
int
Open
(
vlc_object_t
*
);
static
void
Close
(
vlc_object_t
*
);
static
picture_t
*
Filter
(
filter_t
*
,
picture_t
*
);
static
int
DenoiseCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
);
/*****************************************************************************
* Module descriptor
...
...
@@ -162,6 +165,11 @@ static int Open(vlc_object_t *this)
PrecalcCoefs
(
cfg
->
Coefs
[
2
],
sys
->
chroma_spat
);
PrecalcCoefs
(
cfg
->
Coefs
[
3
],
sys
->
chroma_temp
);
var_AddCallback
(
filter
,
FILTER_PREFIX
"luma-spat"
,
DenoiseCallback
,
cfg
);
var_AddCallback
(
filter
,
FILTER_PREFIX
"chroma-spat"
,
DenoiseCallback
,
cfg
);
var_AddCallback
(
filter
,
FILTER_PREFIX
"luma-temp"
,
DenoiseCallback
,
cfg
);
var_AddCallback
(
filter
,
FILTER_PREFIX
"chroma-temp"
,
DenoiseCallback
,
cfg
);
return
VLC_SUCCESS
;
}
...
...
@@ -219,3 +227,24 @@ static picture_t *Filter(filter_t *filter, picture_t *src)
return
CopyInfoAndRelease
(
dst
,
src
);
}
static
int
DenoiseCallback
(
vlc_object_t
*
p_this
,
char
const
*
psz_var
,
vlc_value_t
oldval
,
vlc_value_t
newval
,
void
*
p_data
)
{
VLC_UNUSED
(
p_this
);
VLC_UNUSED
(
oldval
);
struct
vf_priv_s
*
cfg
=
(
struct
vf_priv_s
*
)
p_data
;
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"luma-spat"
)
)
PrecalcCoefs
(
cfg
->
Coefs
[
0
],
newval
.
f_float
);
else
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"luma-temp"
)
)
PrecalcCoefs
(
cfg
->
Coefs
[
1
],
newval
.
f_float
);
else
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"chroma-spat"
)
)
PrecalcCoefs
(
cfg
->
Coefs
[
2
],
newval
.
f_float
);
else
if
(
!
strcmp
(
psz_var
,
FILTER_PREFIX
"chroma-temp"
)
)
PrecalcCoefs
(
cfg
->
Coefs
[
3
],
newval
.
f_float
);
return
VLC_SUCCESS
;
}
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment