diff options
Diffstat (limited to 'video/out/filter_kernels.c')
-rw-r--r-- | video/out/filter_kernels.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/video/out/filter_kernels.c b/video/out/filter_kernels.c index 11680a064a..09f85af5f4 100644 --- a/video/out/filter_kernels.c +++ b/video/out/filter_kernels.c @@ -152,10 +152,14 @@ static void mp_compute_weights(struct filter_kernel *filter, double f, void mp_compute_lut(struct filter_kernel *filter, int count, float *out_array) { if (filter->polar) { + filter->radius_cutoff = 0.0; // Compute a 1D array indexed by radius for (int x = 0; x < count; x++) { double r = x * filter->f.radius / (count - 1); out_array[x] = sample_filter(filter, r); + + if (fabs(out_array[x]) > filter->value_cutoff) + filter->radius_cutoff = r; } } else { // Compute a 2D array indexed by subpixel position |