From 5fa82264201c3bcd09615c5983496983b4012566 Mon Sep 17 00:00:00 2001 From: Pavel Koshevoy Date: Sun, 17 Jun 2012 16:45:26 -0600 Subject: [PATCH] libavfilter: improve atempo audio quality Reduce audio fragment alignment jitter by penalizing alignment correction offsets that deviate too much from the target offset. This is accomplished by multiplying the cross correlation search window with a quadratic function. Signed-off-by: Pavel Koshevoy Signed-off-by: Michael Niedermayer --- libavfilter/af_atempo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libavfilter/af_atempo.c b/libavfilter/af_atempo.c index 1ccc3f56291..92390cf2176 100644 --- a/libavfilter/af_atempo.c +++ b/libavfilter/af_atempo.c @@ -654,7 +654,7 @@ static int yae_align(AudioFragment *frag, // normalize: FFTSample drifti = (FFTSample)(drift + i); - metric *= drifti; + metric *= drifti * (FFTSample)(i - i0) * (FFTSample)(i1 - i); if (metric > best_metric) { best_metric = metric; -- 2.39.5