[FFmpeg-cvslog] libavfilter: improve atempo audio quality

Pavel Koshevoy git at videolan.org
Tue Jun 19 17:39:41 CEST 2012


ffmpeg | branch: master | Pavel Koshevoy <pkoshevoy at gmail.com> | Sun Jun 17 16:45:26 2012 -0600| [5fa82264201c3bcd09615c5983496983b4012566] | committer: Michael Niedermayer

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 <pavel at homestead.aragog.com>
Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=5fa82264201c3bcd09615c5983496983b4012566
---

 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 1ccc3f5..92390cf 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;



More information about the ffmpeg-cvslog mailing list