History

avfilter/avf_showcwt: fix very low freqs leakage

Paul B Mahol committed 3 years ago

Commit 6f6907f1 parent 27b43641 file · +2 −0Browse files

Unified · Split

libavfilter/avf_showcwt.c+2−0
@@ -636,6 +636,7 @@ static int compute_kernel(AVFilterContext *ctx) · 635 unmodified lines
636636 const int fsize = s->frequency_band_count;
637637 int *kernel_start = s->kernel_start;
638638 int *kernel_stop = s->kernel_stop;
639+ const int hsize = size >> 1;
639640 unsigned *index = s->index;
640641 int kernel_min = INT_MAX;
641642 int kernel_max = 0, ret = 0;
@@ -656,6 +657,7 @@ static int compute_kernel(AVFilterContext *ctx) · 14 unmodified lines
656657 for (int n = 0; n < size; n++) {
657658 float ff, f = n-frequency;
658659
660+ f = hsize - fabsf(f - hsize);
659661 ff = expf(-f*f*deviation);
660662 tkernel[n] = ff;
661663 }

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