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
6d5bf67f
Commit
6d5bf67f
authored
May 01, 2012
by
Justin Ruggles
Committed by
Michael Niedermayer
May 01, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
swr: add lfe_mix_level
Signed-off-by:
Michael Niedermayer
<
michaelni@gmx.at
>
parent
9b42653b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
0 deletions
+13
-0
rematrix.c
libswresample/rematrix.c
+11
-0
swresample.c
libswresample/swresample.c
+1
-0
swresample_internal.h
libswresample/swresample_internal.h
+1
-0
No files found.
libswresample/rematrix.c
View file @
6d5bf67f
...
...
@@ -216,6 +216,17 @@ static int auto_matrix(SwrContext *s)
}
else
av_assert0
(
0
);
}
/* mix LFE into front left/right or center */
if
(
unaccounted
&
AV_CH_LOW_FREQUENCY
)
{
if
(
s
->
out_ch_layout
&
AV_CH_FRONT_CENTER
)
{
matrix
[
FRONT_CENTER
][
LOW_FREQUENCY
]
+=
s
->
lfe_mix_level
;
}
else
if
(
s
->
out_ch_layout
&
AV_CH_FRONT_LEFT
)
{
matrix
[
FRONT_LEFT
][
LOW_FREQUENCY
]
+=
s
->
lfe_mix_level
*
M_SQRT1_2
;
matrix
[
FRONT_RIGHT
][
LOW_FREQUENCY
]
+=
s
->
lfe_mix_level
*
M_SQRT1_2
;
}
else
av_assert0
(
0
);
}
for
(
out_i
=
i
=
0
;
i
<
64
;
i
++
){
double
sum
=
0
;
int
in_i
=
0
;
...
...
libswresample/swresample.c
View file @
6d5bf67f
...
...
@@ -62,6 +62,7 @@ static const AVOption options[]={
{
"center_mix_level"
,
"Center Mix Level"
,
OFFSET
(
clev
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
C_30DB
},
-
32
,
32
,
PARAM
},
{
"slev"
,
"Sourround Mix Level"
,
OFFSET
(
slev
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
C_30DB
},
-
32
,
32
,
PARAM
},
{
"surround_mix_level"
,
"Sourround Mix Level"
,
OFFSET
(
slev
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
C_30DB
},
-
32
,
32
,
PARAM
},
{
"lfe_mix_level"
,
"LFE Mix Level"
,
OFFSET
(
lfe_mix_level
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
0
},
-
32
,
32
,
PARAM
},
{
"rmvol"
,
"Rematrix Volume"
,
OFFSET
(
rematrix_volume
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
-
1000
,
1000
,
PARAM
},
{
"rematrix_volume"
,
"Rematrix Volume"
,
OFFSET
(
rematrix_volume
),
AV_OPT_TYPE_FLOAT
,
{.
dbl
=
1
.
0
},
-
1000
,
1000
,
PARAM
},
{
"flags"
,
NULL
,
OFFSET
(
flags
),
AV_OPT_TYPE_FLAGS
,
{.
dbl
=
0
},
0
,
UINT_MAX
,
PARAM
,
"flags"
},
...
...
libswresample/swresample_internal.h
View file @
6d5bf67f
...
...
@@ -50,6 +50,7 @@ struct SwrContext {
int
flags
;
///< miscellaneous flags such as SWR_FLAG_RESAMPLE
float
slev
;
///< surround mixing level
float
clev
;
///< center mixing level
float
lfe_mix_level
;
///< LFE mixing level
float
rematrix_volume
;
///< rematrixing volume coefficient
const
int
*
channel_map
;
///< channel index (or -1 if muted channel) map
int
used_ch_count
;
///< number of used input channels (mapped channel count if channel_map, otherwise in.ch_count)
...
...
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