[FFmpeg-devel] [PATCH] libavfilter: improve atempo audio quality

Pavel Koshevoy pkoshevoy at gmail.com
Tue Jun 19 17:25:47 CEST 2012


On 6/17/2012 4:45 PM, pkoshevoy at gmail.com wrote:
> 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;


Hi, could someone apply this, please?

Thank you,
     Pavel.



More information about the ffmpeg-devel mailing list