Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
F
ffmpeg.wasm-core
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Linshizhi
ffmpeg.wasm-core
Commits
f4fd8ef7
Commit
f4fd8ef7
authored
Jan 12, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_anlmdn: rework how denoising strength is used
Make into account patch size.
parent
ad0d5d75
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
3 deletions
+3
-3
filters.texi
doc/filters.texi
+1
-1
af_anlmdn.c
libavfilter/af_anlmdn.c
+2
-2
No files found.
doc/filters.texi
View file @
f4fd8ef7
...
...
@@ -1762,7 +1762,7 @@ The filter accepts the following options.
@table @option
@item s
Set denoising strength. Allowed range is from
1 to 9999. Default value is
1.
Set denoising strength. Allowed range is from
0.00001 to 10. Default value is 0.0000
1.
@item p
Set patch radius duration. Allowed range is from 1 to 100 milliseconds.
...
...
libavfilter/af_anlmdn.c
View file @
f4fd8ef7
...
...
@@ -66,7 +66,7 @@ typedef struct AudioNLMeansContext {
#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
static
const
AVOption
anlmdn_options
[]
=
{
{
"s"
,
"set denoising strength"
,
OFFSET
(
a
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
},
1
,
9999
,
AF
},
{
"s"
,
"set denoising strength"
,
OFFSET
(
a
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
00001
},
0
.
00001
,
10
,
AF
},
{
"p"
,
"set patch duration"
,
OFFSET
(
pd
),
AV_OPT_TYPE_DURATION
,
{.
i64
=
2000
},
1000
,
100000
,
AF
},
{
"r"
,
"set research duration"
,
OFFSET
(
rd
),
AV_OPT_TYPE_DURATION
,
{.
i64
=
6000
},
2000
,
300000
,
AF
},
{
NULL
}
...
...
@@ -186,7 +186,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
const
int
K
=
s
->
K
;
const
float
*
f
=
(
const
float
*
)(
s
->
in
->
extended_data
[
ch
])
+
K
;
float
*
cache
=
(
float
*
)
s
->
cache
->
extended_data
[
ch
];
const
float
sw
=
32768
.
f
/
s
->
a
;
const
float
sw
=
(
65536
.
f
/
(
4
*
K
+
2
))
/
sqrtf
(
s
->
a
)
;
float
*
dst
=
(
float
*
)
out
->
extended_data
[
ch
]
+
s
->
offset
;
for
(
int
i
=
S
;
i
<
s
->
H
+
S
;
i
++
)
{
...
...
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