diff options
author | Pavel Koshevoy <pkoshevoy@gmail.com> | 2012-06-18 02:45:26 +0400 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-06-19 19:29:27 +0400 |
commit | 5fa82264201c3bcd09615c5983496983b4012566 (patch) | |
tree | 3aad88546da2dadb1a825b6e1e44258f53ad9679 /libavfilter/af_atempo.c | |
parent | 08613d50d6e3088299fae6d2095fecb5e509aa9e (diff) |
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@homestead.aragog.com>
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavfilter/af_atempo.c')
-rw-r--r-- | 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 1ccc3f5629..92390cf217 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; |