Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
9f7ab36a
Commit
9f7ab36a
authored
Oct 08, 2019
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_anlms: switch to ff_filter_process_command()
parent
8fec9fca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
25 deletions
+10
-25
af_anlms.c
libavfilter/af_anlms.c
+10
-25
No files found.
libavfilter/af_anlms.c
View file @
9f7ab36a
...
...
@@ -60,17 +60,18 @@ typedef struct AudioNLMSContext {
#define OFFSET(x) offsetof(AudioNLMSContext, x)
#define A AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
#define AT AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
static
const
AVOption
anlms_options
[]
=
{
{
"order"
,
"set the filter order"
,
OFFSET
(
order
),
AV_OPT_TYPE_INT
,
{.
i64
=
256
},
1
,
INT16_MAX
,
A
},
{
"mu"
,
"set the filter mu"
,
OFFSET
(
mu
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
75
},
0
,
2
,
A
},
{
"eps"
,
"set the filter eps"
,
OFFSET
(
eps
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
},
0
,
1
,
A
},
{
"leakage"
,
"set the filter leakage"
,
OFFSET
(
leakage
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
1
,
A
},
{
"out_mode"
,
"set output mode"
,
OFFSET
(
output_mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
OUT_MODE
},
0
,
NB_OMODES
-
1
,
A
,
"mode"
},
{
"i"
,
"input"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
IN_MODE
},
0
,
0
,
A
,
"mode"
},
{
"d"
,
"desired"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
DESIRED_MODE
},
0
,
0
,
A
,
"mode"
},
{
"o"
,
"output"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OUT_MODE
},
0
,
0
,
A
,
"mode"
},
{
"n"
,
"noise"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NOISE_MODE
},
0
,
0
,
A
,
"mode"
},
{
"mu"
,
"set the filter mu"
,
OFFSET
(
mu
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
.
75
},
0
,
2
,
A
T
},
{
"eps"
,
"set the filter eps"
,
OFFSET
(
eps
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
},
0
,
1
,
A
T
},
{
"leakage"
,
"set the filter leakage"
,
OFFSET
(
leakage
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
0
,
1
,
A
T
},
{
"out_mode"
,
"set output mode"
,
OFFSET
(
output_mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
OUT_MODE
},
0
,
NB_OMODES
-
1
,
A
T
,
"mode"
},
{
"i"
,
"input"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
IN_MODE
},
0
,
0
,
A
T
,
"mode"
},
{
"d"
,
"desired"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
DESIRED_MODE
},
0
,
0
,
A
T
,
"mode"
},
{
"o"
,
"output"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
OUT_MODE
},
0
,
0
,
A
T
,
"mode"
},
{
"n"
,
"noise"
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
NOISE_MODE
},
0
,
0
,
A
T
,
"mode"
},
{
NULL
}
};
...
...
@@ -281,22 +282,6 @@ static av_cold int init(AVFilterContext *ctx)
return
0
;
}
static
int
process_command
(
AVFilterContext
*
ctx
,
const
char
*
cmd
,
const
char
*
args
,
char
*
res
,
int
res_len
,
int
flags
)
{
AudioNLMSContext
*
s
=
ctx
->
priv
;
int
ret
;
if
(
!
strcmp
(
cmd
,
"mu"
)
||
!
strcmp
(
cmd
,
"eps"
)
||
!
strcmp
(
cmd
,
"leakage"
)
||
!
strcmp
(
cmd
,
"out_mode"
))
{
ret
=
av_opt_set
(
s
,
cmd
,
args
,
0
);
}
else
{
ret
=
AVERROR
(
ENOSYS
);
}
return
ret
;
}
static
av_cold
void
uninit
(
AVFilterContext
*
ctx
)
{
AudioNLMSContext
*
s
=
ctx
->
priv
;
...
...
@@ -341,5 +326,5 @@ AVFilter ff_af_anlms = {
.
inputs
=
inputs
,
.
outputs
=
outputs
,
.
flags
=
AVFILTER_FLAG_SLICE_THREADS
,
.
process_command
=
process_command
,
.
process_command
=
ff_filter_
process_command
,
};
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