mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-03-01 18:21:04 +00:00
pan: reindent after remap commit.
This commit is contained in:
parent
6728dd37ac
commit
94dc4a5046
@ -231,12 +231,12 @@ static int query_formats(AVFilterContext *ctx)
|
|||||||
avfilter_set_common_packing_formats(ctx, avfilter_make_all_packing_formats());
|
avfilter_set_common_packing_formats(ctx, avfilter_make_all_packing_formats());
|
||||||
pan->filter_samples = filter_samples_channel_mapping;
|
pan->filter_samples = filter_samples_channel_mapping;
|
||||||
} else {
|
} else {
|
||||||
const enum AVSampleFormat sample_fmts[] = {AV_SAMPLE_FMT_S16, -1};
|
const enum AVSampleFormat sample_fmts[] = {AV_SAMPLE_FMT_S16, -1};
|
||||||
const int packing_fmts[] = {AVFILTER_PACKED, -1};
|
const int packing_fmts[] = {AVFILTER_PACKED, -1};
|
||||||
|
|
||||||
avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts));
|
avfilter_set_common_sample_formats (ctx, avfilter_make_format_list(sample_fmts));
|
||||||
avfilter_set_common_packing_formats(ctx, avfilter_make_format_list(packing_fmts));
|
avfilter_set_common_packing_formats(ctx, avfilter_make_format_list(packing_fmts));
|
||||||
pan->filter_samples = filter_samples_panning;
|
pan->filter_samples = filter_samples_panning;
|
||||||
}
|
}
|
||||||
|
|
||||||
// inlink supports any channel layout
|
// inlink supports any channel layout
|
||||||
@ -307,23 +307,23 @@ static int config_props(AVFilterLink *link)
|
|||||||
if (r < 0)
|
if (r < 0)
|
||||||
return r;
|
return r;
|
||||||
} else {
|
} else {
|
||||||
// renormalize
|
// renormalize
|
||||||
for (i = 0; i < pan->nb_output_channels; i++) {
|
for (i = 0; i < pan->nb_output_channels; i++) {
|
||||||
if (!((pan->need_renorm >> i) & 1))
|
if (!((pan->need_renorm >> i) & 1))
|
||||||
continue;
|
continue;
|
||||||
t = 0;
|
t = 0;
|
||||||
for (j = 0; j < pan->nb_input_channels; j++)
|
for (j = 0; j < pan->nb_input_channels; j++)
|
||||||
t += pan->gain.d[i][j];
|
t += pan->gain.d[i][j];
|
||||||
if (t > -1E-5 && t < 1E-5) {
|
if (t > -1E-5 && t < 1E-5) {
|
||||||
// t is almost 0 but not exactly, this is probably a mistake
|
// t is almost 0 but not exactly, this is probably a mistake
|
||||||
if (t)
|
if (t)
|
||||||
av_log(ctx, AV_LOG_WARNING,
|
av_log(ctx, AV_LOG_WARNING,
|
||||||
"Degenerate coefficients while renormalizing\n");
|
"Degenerate coefficients while renormalizing\n");
|
||||||
continue;
|
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
|
// summary
|
||||||
for (i = 0; i < pan->nb_output_channels; i++) {
|
for (i = 0; i < pan->nb_output_channels; i++) {
|
||||||
|
Loading…
Reference in New Issue
Block a user