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
5b106215
Commit
5b106215
authored
Nov 25, 2015
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_sidechaincompress: add forgotten option
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
29af74e4
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
1 deletion
+8
-1
filters.texi
doc/filters.texi
+4
-0
af_sidechaincompress.c
libavfilter/af_sidechaincompress.c
+4
-1
No files found.
doc/filters.texi
View file @
5b106215
...
@@ -2383,6 +2383,10 @@ reduction. Default is @code{average}.
...
@@ -2383,6 +2383,10 @@ reduction. Default is @code{average}.
@item detection
@item detection
Should the exact signal be taken in case of @code{peak} or an RMS one in case
Should the exact signal be taken in case of @code{peak} or an RMS one in case
of @code{rms}. Default is @code{rms} which is mainly smoother.
of @code{rms}. Default is @code{rms} which is mainly smoother.
@item mix
How much to use compressed signal in output. Default is 1.
Range is between 0 and 1.
@end table
@end table
@subsection Examples
@subsection Examples
...
...
libavfilter/af_sidechaincompress.c
View file @
5b106215
...
@@ -44,6 +44,7 @@ typedef struct SidechainCompressContext {
...
@@ -44,6 +44,7 @@ typedef struct SidechainCompressContext {
double
ratio
;
double
ratio
;
double
threshold
;
double
threshold
;
double
makeup
;
double
makeup
;
double
mix
;
double
thres
;
double
thres
;
double
knee
;
double
knee
;
double
knee_start
;
double
knee_start
;
...
@@ -73,6 +74,7 @@ static const AVOption sidechaincompress_options[] = {
...
@@ -73,6 +74,7 @@ static const AVOption sidechaincompress_options[] = {
{
"detection"
,
"set detection"
,
OFFSET
(
detection
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
A
|
F
,
"detection"
},
{
"detection"
,
"set detection"
,
OFFSET
(
detection
),
AV_OPT_TYPE_INT
,
{.
i64
=
1
},
0
,
1
,
A
|
F
,
"detection"
},
{
"peak"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
A
|
F
,
"detection"
},
{
"peak"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
A
|
F
,
"detection"
},
{
"rms"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
A
|
F
,
"detection"
},
{
"rms"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
A
|
F
,
"detection"
},
{
"mix"
,
"set mix"
,
OFFSET
(
mix
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
1
},
0
,
1
,
A
|
F
},
{
NULL
}
{
NULL
}
};
};
...
@@ -131,6 +133,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
...
@@ -131,6 +133,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
AVFilterLink
*
sclink
=
ctx
->
inputs
[
1
];
AVFilterLink
*
sclink
=
ctx
->
inputs
[
1
];
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
AVFilterLink
*
outlink
=
ctx
->
outputs
[
0
];
const
double
makeup
=
s
->
makeup
;
const
double
makeup
=
s
->
makeup
;
const
double
mix
=
s
->
mix
;
const
double
*
scsrc
;
const
double
*
scsrc
;
double
*
sample
;
double
*
sample
;
int
nb_samples
;
int
nb_samples
;
...
@@ -177,7 +180,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
...
@@ -177,7 +180,7 @@ static int filter_frame(AVFilterLink *link, AVFrame *frame)
s
->
compressed_knee_stop
,
s
->
detection
);
s
->
compressed_knee_stop
,
s
->
detection
);
for
(
c
=
0
;
c
<
outlink
->
channels
;
c
++
)
for
(
c
=
0
;
c
<
outlink
->
channels
;
c
++
)
sample
[
c
]
*=
gain
*
makeup
;
sample
[
c
]
*=
(
gain
*
makeup
*
mix
+
(
1
.
-
mix
))
;
sample
+=
outlink
->
channels
;
sample
+=
outlink
->
channels
;
scsrc
+=
sclink
->
channels
;
scsrc
+=
sclink
->
channels
;
...
...
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