resample: limit the amount of phases

If we have in and out rates with a very small GCD, we might end up with
a lot of phases. Limit the number of phases to 1024 and switch to
interpolating mode. 1024 phases is enough to accurately interpolate
from.

Together with the MAX_TAPS limit we will never create a filter
size that overflows 32 bits.

Fixes #5073
This commit is contained in:
Wim Taymans 2026-01-15 12:05:07 +01:00
parent 8eb60b132c
commit 429505e91c
2 changed files with 9 additions and 3 deletions

View file

@ -47,6 +47,7 @@ struct native_data {
float *filter;
float *hist_mem;
const struct resample_info *info;
bool force_inter;
};
#define DEFINE_RESAMPLER(type,arch) \