mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
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>
This commit is contained in:
parent
08613d50d6
commit
5fa8226420
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user