Browse Source

lavfi: add atempo filter

Add atempo audio filter for adjusting audio tempo without affecting
pitch. This filter implements WSOLA algorithm with fast cross
correlation calculation in frequency domain.

Signed-off-by: Pavel Koshevoy <pavel@homestead.aragog.com>
Signed-off-by: Stefano Sabatini <stefasab@gmail.com>
tags/n1.0
Pavel Koshevoy Stefano Sabatini 13 years ago
parent
commit
a1aac8d004
8 changed files with 1185 additions and 1 deletions
  1. +1
    -0
      Changelog
  2. +1
    -0
      MAINTAINERS
  3. +1
    -0
      configure
  4. +18
    -0
      doc/filters.texi
  5. +2
    -0
      libavfilter/Makefile
  6. +1160
    -0
      libavfilter/af_atempo.c
  7. +1
    -0
      libavfilter/allfilters.c
  8. +1
    -1
      libavfilter/version.h

+ 1
- 0
Changelog View File

@@ -7,6 +7,7 @@ version next:
- Indeo Audio decoder - Indeo Audio decoder
- channelsplit audio filter - channelsplit audio filter
- setnsamples audio filter - setnsamples audio filter
- atempo filter




version 0.11: version 0.11:


+ 1
- 0
MAINTAINERS View File

@@ -275,6 +275,7 @@ Video filters:
graphdump.c Nicolas George graphdump.c Nicolas George
af_amerge.c Nicolas George af_amerge.c Nicolas George
af_astreamsync.c Nicolas George af_astreamsync.c Nicolas George
af_atempo.c Pavel Koshevoy
af_pan.c Nicolas George af_pan.c Nicolas George
vsrc_mandelbrot.c Michael Niedermayer vsrc_mandelbrot.c Michael Niedermayer
vf_yadif.c Michael Niedermayer vf_yadif.c Michael Niedermayer


+ 1
- 0
configure View File

@@ -1702,6 +1702,7 @@ amovie_filter_deps="avcodec avformat"
aresample_filter_deps="swresample" aresample_filter_deps="swresample"
ass_filter_deps="libass" ass_filter_deps="libass"
asyncts_filter_deps="avresample" asyncts_filter_deps="avresample"
atempo_filter_deps="avcodec"
blackframe_filter_deps="gpl" blackframe_filter_deps="gpl"
boxblur_filter_deps="gpl" boxblur_filter_deps="gpl"
colormatrix_filter_deps="gpl" colormatrix_filter_deps="gpl"


+ 18
- 0
doc/filters.texi View File

@@ -406,6 +406,24 @@ amovie=file.ogg [a] ; amovie=file.mp3 [b] ;
[a2] [b2] amerge [a2] [b2] amerge
@end example @end example


@section atempo

Adjust audio tempo.

The filter accepts exactly one parameter, the audio tempo. If not
specified then the filter will assume nominal 1.0 tempo. Tempo must
be in the [0.5, 2.0] range.

For example, to slow down audio to 80% tempo:
@example
atempo=0.8
@end example

For example, to speed up audio to 125% tempo:
@example
atempo=1.25
@end example

@section earwax @section earwax


Make audio easier to listen to on headphones. Make audio easier to listen to on headphones.


+ 2
- 0
libavfilter/Makefile View File

@@ -9,6 +9,7 @@ FFLIBS-$(CONFIG_SCALE_FILTER) += swscale
FFLIBS-$(CONFIG_ACONVERT_FILTER) += swresample FFLIBS-$(CONFIG_ACONVERT_FILTER) += swresample
FFLIBS-$(CONFIG_AMOVIE_FILTER) += avformat avcodec FFLIBS-$(CONFIG_AMOVIE_FILTER) += avformat avcodec
FFLIBS-$(CONFIG_ARESAMPLE_FILTER) += swresample FFLIBS-$(CONFIG_ARESAMPLE_FILTER) += swresample
FFLIBS-$(CONFIG_ATEMPO_FILTER) += avcodec
FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec FFLIBS-$(CONFIG_MOVIE_FILTER) += avformat avcodec
FFLIBS-$(CONFIG_PAN_FILTER) += swresample FFLIBS-$(CONFIG_PAN_FILTER) += swresample
FFLIBS-$(CONFIG_REMOVELOGO_FILTER) += avformat avcodec FFLIBS-$(CONFIG_REMOVELOGO_FILTER) += avformat avcodec
@@ -56,6 +57,7 @@ OBJS-$(CONFIG_ASHOWINFO_FILTER) += af_ashowinfo.o
OBJS-$(CONFIG_ASPLIT_FILTER) += split.o OBJS-$(CONFIG_ASPLIT_FILTER) += split.o
OBJS-$(CONFIG_ASTREAMSYNC_FILTER) += af_astreamsync.o OBJS-$(CONFIG_ASTREAMSYNC_FILTER) += af_astreamsync.o
OBJS-$(CONFIG_ASYNCTS_FILTER) += af_asyncts.o OBJS-$(CONFIG_ASYNCTS_FILTER) += af_asyncts.o
OBJS-$(CONFIG_ATEMPO_FILTER) += af_atempo.o
OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o OBJS-$(CONFIG_CHANNELSPLIT_FILTER) += af_channelsplit.o
OBJS-$(CONFIG_EARWAX_FILTER) += af_earwax.o OBJS-$(CONFIG_EARWAX_FILTER) += af_earwax.o
OBJS-$(CONFIG_PAN_FILTER) += af_pan.o OBJS-$(CONFIG_PAN_FILTER) += af_pan.o


+ 1160
- 0
libavfilter/af_atempo.c
File diff suppressed because it is too large
View File


+ 1
- 0
libavfilter/allfilters.c View File

@@ -45,6 +45,7 @@ void avfilter_register_all(void)
REGISTER_FILTER (ASPLIT, asplit, af); REGISTER_FILTER (ASPLIT, asplit, af);
REGISTER_FILTER (ASTREAMSYNC, astreamsync, af); REGISTER_FILTER (ASTREAMSYNC, astreamsync, af);
REGISTER_FILTER (ASYNCTS, asyncts, af); REGISTER_FILTER (ASYNCTS, asyncts, af);
REGISTER_FILTER (ATEMPO, atempo, af);
REGISTER_FILTER (CHANNELSPLIT,channelsplit,af); REGISTER_FILTER (CHANNELSPLIT,channelsplit,af);
REGISTER_FILTER (EARWAX, earwax, af); REGISTER_FILTER (EARWAX, earwax, af);
REGISTER_FILTER (PAN, pan, af); REGISTER_FILTER (PAN, pan, af);


+ 1
- 1
libavfilter/version.h View File

@@ -29,7 +29,7 @@
#include "libavutil/avutil.h" #include "libavutil/avutil.h"


#define LIBAVFILTER_VERSION_MAJOR 2 #define LIBAVFILTER_VERSION_MAJOR 2
#define LIBAVFILTER_VERSION_MINOR 80
#define LIBAVFILTER_VERSION_MINOR 81
#define LIBAVFILTER_VERSION_MICRO 100 #define LIBAVFILTER_VERSION_MICRO 100


#define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \ #define LIBAVFILTER_VERSION_INT AV_VERSION_INT(LIBAVFILTER_VERSION_MAJOR, \


Loading…
Cancel
Save