Unified · Split
| @@ -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 | } |