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
636 const int fsize = s->frequency_band_count;636 const int fsize = s->frequency_band_count;
637 int *kernel_start = s->kernel_start;637 int *kernel_start = s->kernel_start;
638 int *kernel_stop = s->kernel_stop;638 int *kernel_stop = s->kernel_stop;
639 const int hsize = size >> 1;
639 unsigned *index = s->index;640 unsigned *index = s->index;
640 int kernel_min = INT_MAX;641 int kernel_min = INT_MAX;
641 int kernel_max = 0, ret = 0;642 int kernel_max = 0, ret = 0;
@@ -656,6 +657,7 @@ static int compute_kernel(AVFilterContext *ctx) · 14 unmodified lines
656 for (int n = 0; n < size; n++) {657 for (int n = 0; n < size; n++) {
657 float ff, f = n-frequency;658 float ff, f = n-frequency;
658 659
660 f = hsize - fabsf(f - hsize);
659 ff = expf(-f*f*deviation);661 ff = expf(-f*f*deviation);
660 tkernel[n] = ff;662 tkernel[n] = ff;
661 }663 }

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