[FFmpeg-devel] [PATCH 3/4] avfilter/asrc_sine: increase frequency accuracy
Nicolas George
george at nsup.org
Thu Nov 28 10:47:47 EET 2024
Marton Balint (12024-11-10):
> Previously the delta phase was fixed point fractional with 2^32 fractions,
> which caused inaccuracies in the output frequency, unless the input
> frequency*2^32 was divisable by the sample rate.
>
> This patch improves frequency accuracy by tracking subfractions of the delta
> phase fractions. For this we are using a denominator which is a multiple of the
> sample rate, making sure that integer frequencies are always accurately
> represented.
>
> Signed-off-by: Marton Balint <cus at passwd.hu>
> ---
> libavfilter/asrc_sine.c | 24 +++++++++++++++++++++++-
> 1 file changed, 23 insertions(+), 1 deletion(-)
Sorry for the delay. The logic looks sound, and I am assuming you have
checked that it now gives periodical output when the frequency is a
divisor of the sample frequency, so ok.
Regards,
--
Nicolas George
More information about the ffmpeg-devel
mailing list