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
ef178f63
Commit
ef178f63
authored
Jun 19, 2017
by
Paul B Mahol
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
avfilter/af_stereotools: add 2 more modes
Signed-off-by:
Paul B Mahol
<
onemda@gmail.com
>
parent
1a4236e0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
1 deletion
+18
-1
filters.texi
doc/filters.texi
+6
-0
af_stereotools.c
libavfilter/af_stereotools.c
+12
-1
No files found.
doc/filters.texi
View file @
ef178f63
...
...
@@ -3743,6 +3743,12 @@ Left/Right to Left + Right.
@item lr>rl
Left/Right to Right/Left.
@item ms>ll
Mid/Side to Left/Left.
@item ms>rr
Mid/Side to Right/Right.
@end table
@item slev
...
...
libavfilter/af_stereotools.c
View file @
ef178f63
...
...
@@ -69,7 +69,7 @@ static const AVOption stereotools_options[] = {
{
"muter"
,
"mute R"
,
OFFSET
(
mute_r
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
A
},
{
"phasel"
,
"phase L"
,
OFFSET
(
phase_l
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
A
},
{
"phaser"
,
"phase R"
,
OFFSET
(
phase_r
),
AV_OPT_TYPE_BOOL
,
{.
i64
=
0
},
0
,
1
,
A
},
{
"mode"
,
"set stereo mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
6
,
A
,
"mode"
},
{
"mode"
,
"set stereo mode"
,
OFFSET
(
mode
),
AV_OPT_TYPE_INT
,
{.
i64
=
0
},
0
,
8
,
A
,
"mode"
},
{
"lr>lr"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
0
},
0
,
0
,
A
,
"mode"
},
{
"lr>ms"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
1
},
0
,
0
,
A
,
"mode"
},
{
"ms>lr"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
2
},
0
,
0
,
A
,
"mode"
},
...
...
@@ -77,6 +77,8 @@ static const AVOption stereotools_options[] = {
{
"lr>rr"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
4
},
0
,
0
,
A
,
"mode"
},
{
"lr>l+r"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
5
},
0
,
0
,
A
,
"mode"
},
{
"lr>rl"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
6
},
0
,
0
,
A
,
"mode"
},
{
"ms>ll"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
7
},
0
,
0
,
A
,
"mode"
},
{
"ms>rr"
,
0
,
0
,
AV_OPT_TYPE_CONST
,
{.
i64
=
8
},
0
,
0
,
A
,
"mode"
},
{
"slev"
,
"set side level"
,
OFFSET
(
slev
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
1
},
0
.
015625
,
64
,
A
},
{
"sbal"
,
"set side balance"
,
OFFSET
(
sbal
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
0
},
-
1
,
1
,
A
},
{
"mlev"
,
"set middle level"
,
OFFSET
(
mlev
),
AV_OPT_TYPE_DOUBLE
,
{.
dbl
=
1
},
0
.
015625
,
64
,
A
},
...
...
@@ -246,6 +248,15 @@ static int filter_frame(AVFilterLink *inlink, AVFrame *in)
r
=
m
*
mlev
*
FFMIN
(
1
.,
mpan
)
-
S
*
slev
*
FFMIN
(
1
.,
sbal
);
L
=
l
;
R
=
r
;
case
7
:
l
=
L
*
mlev
*
FFMIN
(
1
.,
2
.
-
mpan
)
+
R
*
slev
*
FFMIN
(
1
.,
2
.
-
sbal
);
L
=
l
;
R
=
l
;
break
;
case
8
:
r
=
L
*
mlev
*
FFMIN
(
1
.,
mpan
)
-
R
*
slev
*
FFMIN
(
1
.,
sbal
);
L
=
r
;
R
=
r
;
break
;
}
...
...
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