[FFmpeg-devel] [PATCH] libavfilter: improve atempo audio quality
pkoshevoy at gmail.com
pkoshevoy at gmail.com
Mon Jun 18 00:45:26 CEST 2012
From: Pavel Koshevoy <pkoshevoy at gmail.com>
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>
---
libavfilter/af_atempo.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
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;
--
1.7.7
More information about the ffmpeg-devel
mailing list