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