|
FFmpeg
|
tempo scaling audio filter – an implementation of WSOLA algorithm More...
#include <float.h>#include "libavcodec/avfft.h"#include "libavutil/avassert.h"#include "libavutil/avstring.h"#include "libavutil/channel_layout.h"#include "libavutil/eval.h"#include "libavutil/opt.h"#include "libavutil/samplefmt.h"#include "avfilter.h"#include "audio.h"#include "internal.h"Classes | |
| struct | AudioFragment |
| A fragment of audio waveform. More... | |
| struct | ATempoContext |
| Filter state machine. More... | |
Macros | |
| #define | OFFSET(x) offsetof(ATempoContext, x) |
| #define | RE_MALLOC_OR_FAIL(field, field_size) |
| #define | yae_init_xdat(scalar_type, scalar_max) |
| A helper macro for initializing complex data buffer with scalar data of a given type. | |
| #define | yae_blend(scalar_type) |
| A helper macro for blending the overlap region of previous and current audio fragment. More... | |
Typedefs | |
| typedef struct AudioFragment | AudioFragment |
| A fragment of audio waveform. | |
| typedef struct ATempoContext | ATempoContext |
| Filter state machine. | |
Enumerations | |
| enum | FilterState { YAE_LOAD_FRAGMENT, YAE_ADJUST_POSITION, YAE_RELOAD_FRAGMENT, YAE_OUTPUT_OVERLAP_ADD, YAE_FLUSH_OUTPUT } |
| Filter state machine states. | |
Functions | |
| AVFILTER_DEFINE_CLASS (atempo) | |
Variables | |
| AVFilter | ff_af_atempo |
tempo scaling audio filter – an implementation of WSOLA algorithm
Based on MIT licensed yaeAudioTempoFilter.h and yaeAudioFragment.h from Apprentice Video player by Pavel Koshevoy. https://sourceforge.net/projects/apprenticevideo/
An explanation of SOLA algorithm is available at http://www.surina.net/article/time-and-pitch-scaling.html
WSOLA is very similar to SOLA, only one major difference exists between these algorithms. SOLA shifts audio fragments along the output stream, where as WSOLA shifts audio fragments along the input stream.
The advantage of WSOLA algorithm is that the overlap region size is always the same, therefore the blending function is constant and can be precomputed.
| #define RE_MALLOC_OR_FAIL | ( | field, | |
| field_size | |||
| ) |
| #define yae_blend | ( | scalar_type | ) |
A helper macro for blending the overlap region of previous and current audio fragment.
| AVFilter ff_af_atempo |
1.8.12