Commit 5fa82264 authored by Pavel Koshevoy's avatar Pavel Koshevoy Committed by 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: 's avatarPavel Koshevoy <pavel@homestead.aragog.com>
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
parent 08613d50
......@@ -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;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment