History

avfilter/showcqt: make minimum timeclamp option lower

high basefreq does not require high timeclamp

Muhammad Faiz committed 9 years ago

Commit c4a35261 parent 2ae82782 files · +4 −4Browse files

Unified · Split

2 files
  1. doc/filters.texi +1 −1
  2. libavfilter/avf_showcqt.c +3 −3
doc/filters.texi+1−1
@@ -17029,7 +17029,7 @@ Specify the transform timeclamp. At low frequency, there is trade-off between · 17028 unmodified lines
17029accuracy in time domain and frequency domain. If timeclamp is lower,17029accuracy in time domain and frequency domain. If timeclamp is lower,
17030event in time domain is represented more accurately (such as fast bass drum),17030event in time domain is represented more accurately (such as fast bass drum),
17031otherwise event in frequency domain is represented more accurately17031otherwise event in frequency domain is represented more accurately
17032(such as bass guitar). Acceptable range is @code{[0.1, 1]}. Default value is @code{0.17}.17032(such as bass guitar). Acceptable range is @code{[0.002, 1]}. Default value is @code{0.17}.
17033 17033
17034@item basefreq17034@item basefreq
17035Specify the transform base frequency. Default value is @code{20.01523126408007475},17035Specify the transform base frequency. Default value is @code{20.01523126408007475},
libavfilter/avf_showcqt.c+3−3
@@ -76,8 +76,8 @@ static const AVOption showcqt_options[] = { · 75 unmodified lines
76 { "bar_g", "set bargraph gamma", OFFSET(bar_g), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 1.0, 7.0, FLAGS },76 { "bar_g", "set bargraph gamma", OFFSET(bar_g), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 1.0, 7.0, FLAGS },
77 { "gamma2", "set bargraph gamma", OFFSET(bar_g), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 1.0, 7.0, FLAGS },77 { "gamma2", "set bargraph gamma", OFFSET(bar_g), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 1.0, 7.0, FLAGS },
78 { "bar_t", "set bar transparency", OFFSET(bar_t), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 0.0, 1.0, FLAGS },78 { "bar_t", "set bar transparency", OFFSET(bar_t), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 0.0, 1.0, FLAGS },
79 { "timeclamp", "set timeclamp", OFFSET(timeclamp), AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 }, 0.1, 1.0, FLAGS },79 { "timeclamp", "set timeclamp", OFFSET(timeclamp), AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 }, 0.002, 1.0, FLAGS },
80 { "tc", "set timeclamp", OFFSET(timeclamp), AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 }, 0.1, 1.0, FLAGS },80 { "tc", "set timeclamp", OFFSET(timeclamp), AV_OPT_TYPE_DOUBLE, { .dbl = 0.17 }, 0.002, 1.0, FLAGS },
81 { "basefreq", "set base frequency", OFFSET(basefreq), AV_OPT_TYPE_DOUBLE, { .dbl = BASEFREQ }, 10.0, 100000.0, FLAGS },81 { "basefreq", "set base frequency", OFFSET(basefreq), AV_OPT_TYPE_DOUBLE, { .dbl = BASEFREQ }, 10.0, 100000.0, FLAGS },
82 { "endfreq", "set end frequency", OFFSET(endfreq), AV_OPT_TYPE_DOUBLE, { .dbl = ENDFREQ }, 10.0, 100000.0, FLAGS },82 { "endfreq", "set end frequency", OFFSET(endfreq), AV_OPT_TYPE_DOUBLE, { .dbl = ENDFREQ }, 10.0, 100000.0, FLAGS },
83 { "coeffclamp", "set coeffclamp", OFFSET(coeffclamp), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 0.1, 10.0, FLAGS },83 { "coeffclamp", "set coeffclamp", OFFSET(coeffclamp), AV_OPT_TYPE_FLOAT, { .dbl = 1.0 }, 0.1, 10.0, FLAGS },
@@ -1366,7 +1366,7 @@ static int config_output(AVFilterLink *outlink) · 1282 unmodified lines
1366 if ((ret = init_volume(s)) < 0)1366 if ((ret = init_volume(s)) < 0)
1367 return ret;1367 return ret;
1368 1368
1369 s->fft_bits = ceil(log2(inlink->sample_rate * s->timeclamp));1369 s->fft_bits = FFMAX(ceil(log2(inlink->sample_rate * s->timeclamp)), 4);
1370 s->fft_len = 1 << s->fft_bits;1370 s->fft_len = 1 << s->fft_bits;
1371 av_log(ctx, AV_LOG_INFO, "fft_len = %d, cqt_len = %d.\n", s->fft_len, s->cqt_len);1371 av_log(ctx, AV_LOG_INFO, "fft_len = %d, cqt_len = %d.\n", s->fft_len, s->cqt_len);
1372 1372

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