History

avfilter/af_afwtdn: add internal timeline support

Paul B Mahol committed 5 years ago

Commit 9fbe54e1 parent 24e349c1 file · +4 −2Browse files

Unified · Split

libavfilter/af_afwtdn.c+4−2
@@ -998,6 +998,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) · 997 unmodified lines
998998 is_noise *= in->sample_rate;
999999 is_noise /= s->nb_samples;
10001000 for (int level = 0; level <= s->levels; level++) {
1001+ const double percent = ctx->is_disabled ? 0. : s->percent;
10011002 const int length = cp->output_length[level];
10021003 const double scale = sqrt(2.0 * log(length));
10031004
@@ -1008,7 +1009,7 @@ static int filter_channel(AVFilterContext *ctx, void *arg, int ch, int nb_jobs) · 4 unmodified lines
10081009
10091010 noise_filter(stddev[level], cp->output_coefs[level], filter, absmean[level],
10101011 s->softness, new_stddev[level], length);
1011− denoise_level(cp->filter_coefs[level], cp->output_coefs[level], filter, s->percent, length);
1012+ denoise_level(cp->filter_coefs[level], cp->output_coefs[level], filter, percent, length);
10121013 }
10131014
10141015 ret = inverse(s, cp->filter_coefs, cp->filter_length, dst, out->nb_samples, ch, s->sn);
@@ -1332,5 +1333,6 @@ const AVFilter ff_af_afwtdn = { · 317 unmodified lines
13321333 FILTER_INPUTS(inputs),
13331334 FILTER_OUTPUTS(outputs),
13341335 .process_command = process_command,
1335− .flags = AVFILTER_FLAG_SLICE_THREADS,
1336+ .flags = AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL |
1337+ AVFILTER_FLAG_SLICE_THREADS,
13361338 };

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t