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
94dc4a50
Commit
94dc4a50
authored
Jan 23, 2012
by
Clément Bœsch
Committed by
Clément Bœsch
Jan 24, 2012
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pan: reindent after remap commit.
parent
6728dd37
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
21 additions
and
21 deletions
+21
-21
af_pan.c
libavfilter/af_pan.c
+21
-21
No files found.
libavfilter/af_pan.c
View file @
94dc4a50
...
...
@@ -231,12 +231,12 @@ static int query_formats(AVFilterContext *ctx)
avfilter_set_common_packing_formats
(
ctx
,
avfilter_make_all_packing_formats
());
pan
->
filter_samples
=
filter_samples_channel_mapping
;
}
else
{
const
enum
AVSampleFormat
sample_fmts
[]
=
{
AV_SAMPLE_FMT_S16
,
-
1
};
const
int
packing_fmts
[]
=
{
AVFILTER_PACKED
,
-
1
};
const
enum
AVSampleFormat
sample_fmts
[]
=
{
AV_SAMPLE_FMT_S16
,
-
1
};
const
int
packing_fmts
[]
=
{
AVFILTER_PACKED
,
-
1
};
avfilter_set_common_sample_formats
(
ctx
,
avfilter_make_format_list
(
sample_fmts
));
avfilter_set_common_packing_formats
(
ctx
,
avfilter_make_format_list
(
packing_fmts
));
pan
->
filter_samples
=
filter_samples_panning
;
avfilter_set_common_sample_formats
(
ctx
,
avfilter_make_format_list
(
sample_fmts
));
avfilter_set_common_packing_formats
(
ctx
,
avfilter_make_format_list
(
packing_fmts
));
pan
->
filter_samples
=
filter_samples_panning
;
}
// inlink supports any channel layout
...
...
@@ -307,23 +307,23 @@ static int config_props(AVFilterLink *link)
if
(
r
<
0
)
return
r
;
}
else
{
// renormalize
for
(
i
=
0
;
i
<
pan
->
nb_output_channels
;
i
++
)
{
if
(
!
((
pan
->
need_renorm
>>
i
)
&
1
))
continue
;
t
=
0
;
for
(
j
=
0
;
j
<
pan
->
nb_input_channels
;
j
++
)
t
+=
pan
->
gain
.
d
[
i
][
j
];
if
(
t
>
-
1E-5
&&
t
<
1E-5
)
{
// t is almost 0 but not exactly, this is probably a mistake
if
(
t
)
av_log
(
ctx
,
AV_LOG_WARNING
,
"Degenerate coefficients while renormalizing
\n
"
);
continue
;
// renormalize
for
(
i
=
0
;
i
<
pan
->
nb_output_channels
;
i
++
)
{
if
(
!
((
pan
->
need_renorm
>>
i
)
&
1
))
continue
;
t
=
0
;
for
(
j
=
0
;
j
<
pan
->
nb_input_channels
;
j
++
)
t
+=
pan
->
gain
.
d
[
i
][
j
];
if
(
t
>
-
1E-5
&&
t
<
1E-5
)
{
// t is almost 0 but not exactly, this is probably a mistake
if
(
t
)
av_log
(
ctx
,
AV_LOG_WARNING
,
"Degenerate coefficients while renormalizing
\n
"
);
continue
;
}
for
(
j
=
0
;
j
<
pan
->
nb_input_channels
;
j
++
)
pan
->
gain
.
d
[
i
][
j
]
/=
t
;
}
for
(
j
=
0
;
j
<
pan
->
nb_input_channels
;
j
++
)
pan
->
gain
.
d
[
i
][
j
]
/=
t
;
}
}
// summary
for
(
i
=
0
;
i
<
pan
->
nb_output_channels
;
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