FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Enumerations | Functions | Variables
af_afftfilt.c File Reference
#include "libavutil/audio_fifo.h"
#include "libavutil/avstring.h"
#include "libavfilter/internal.h"
#include "libavutil/common.h"
#include "libavutil/opt.h"
#include "libavcodec/avfft.h"
#include "libavutil/eval.h"
#include "audio.h"
#include "window_func.h"

Go to the source code of this file.

Data Structures

struct  AFFTFiltContext
 

Macros

#define OFFSET(x)   offsetof(AFFTFiltContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Enumerations

enum  {
  VAR_SAMPLE_RATE, VAR_BIN, VAR_NBBINS, VAR_CHANNEL,
  VAR_CHANNELS, VAR_PTS, VAR_VARS_NB
}
 

Functions

 AVFILTER_DEFINE_CLASS (afftfilt)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
static int query_formats (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const char *const var_names [] = { "sr", "b", "nb", "ch", "chs", "pts", NULL }
 
static const AVOption afftfilt_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_af_afftfilt
 

Macro Definition Documentation

#define OFFSET (   x)    offsetof(AFFTFiltContext, x)

Definition at line 57 of file af_afftfilt.c.

Definition at line 58 of file af_afftfilt.c.

Enumeration Type Documentation

anonymous enum
Enumerator
VAR_SAMPLE_RATE 
VAR_BIN 
VAR_NBBINS 
VAR_CHANNEL 
VAR_CHANNELS 
VAR_PTS 
VAR_VARS_NB 

Definition at line 55 of file af_afftfilt.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( afftfilt  )
static int config_input ( AVFilterLink inlink)
static

Definition at line 91 of file af_afftfilt.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 188 of file af_afftfilt.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 322 of file af_afftfilt.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 352 of file af_afftfilt.c.

Variable Documentation

const char* const var_names[] = { "sr", "b", "nb", "ch", "chs", "pts", NULL }
static

Definition at line 54 of file af_afftfilt.c.

Referenced by config_input().

const AVOption afftfilt_options[]
static
Initial value:
= {
{ "real", "set channels real expressions", OFFSET(real_str), AV_OPT_TYPE_STRING, {.str = "1" }, 0, 0, A },
{ "imag", "set channels imaginary expressions", OFFSET(img_str), AV_OPT_TYPE_STRING, {.str = NULL }, 0, 0, A },
{ "win_size", "set window size", OFFSET(fft_bits), AV_OPT_TYPE_INT, {.i64=12}, 4, 17, A, "fft" },
{ "w16", 0, 0, AV_OPT_TYPE_CONST, {.i64=4}, 0, 0, A, "fft" },
{ "w32", 0, 0, AV_OPT_TYPE_CONST, {.i64=5}, 0, 0, A, "fft" },
{ "w64", 0, 0, AV_OPT_TYPE_CONST, {.i64=6}, 0, 0, A, "fft" },
{ "w128", 0, 0, AV_OPT_TYPE_CONST, {.i64=7}, 0, 0, A, "fft" },
{ "w256", 0, 0, AV_OPT_TYPE_CONST, {.i64=8}, 0, 0, A, "fft" },
{ "w512", 0, 0, AV_OPT_TYPE_CONST, {.i64=9}, 0, 0, A, "fft" },
{ "w1024", 0, 0, AV_OPT_TYPE_CONST, {.i64=10}, 0, 0, A, "fft" },
{ "w2048", 0, 0, AV_OPT_TYPE_CONST, {.i64=11}, 0, 0, A, "fft" },
{ "w4096", 0, 0, AV_OPT_TYPE_CONST, {.i64=12}, 0, 0, A, "fft" },
{ "w8192", 0, 0, AV_OPT_TYPE_CONST, {.i64=13}, 0, 0, A, "fft" },
{ "w16384", 0, 0, AV_OPT_TYPE_CONST, {.i64=14}, 0, 0, A, "fft" },
{ "w32768", 0, 0, AV_OPT_TYPE_CONST, {.i64=15}, 0, 0, A, "fft" },
{ "w65536", 0, 0, AV_OPT_TYPE_CONST, {.i64=16}, 0, 0, A, "fft" },
{ "w131072",0, 0, AV_OPT_TYPE_CONST, {.i64=17}, 0, 0, A, "fft" },
{ "win_func", "set window function", OFFSET(win_func), AV_OPT_TYPE_INT, {.i64 = WFUNC_HANNING}, 0, NB_WFUNC-1, A, "win_func" },
{ "rect", "Rectangular", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_RECT}, 0, 0, A, "win_func" },
{ "bartlett", "Bartlett", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BARTLETT}, 0, 0, A, "win_func" },
{ "hann", "Hann", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HANNING}, 0, 0, A, "win_func" },
{ "hanning", "Hanning", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HANNING}, 0, 0, A, "win_func" },
{ "hamming", "Hamming", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HAMMING}, 0, 0, A, "win_func" },
{ "sine", "Sine", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_SINE}, 0, 0, A, "win_func" },
{ "overlap", "set window overlap", OFFSET(overlap), AV_OPT_TYPE_FLOAT, {.dbl=0.75}, 0, 1, A },
{ NULL },
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_afftfilt.c:57
#define A
Definition: af_afftfilt.c:58

Definition at line 60 of file af_afftfilt.c.

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_input,
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_input(AVFilterLink *inlink)
Definition: af_afftfilt.c:91
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: af_afftfilt.c:188
Examples:
filtering_audio.c, filtering_video.c, and transcoding.c.

Definition at line 376 of file af_afftfilt.c.

Referenced by avfilter_graph_parse(), configure_filtergraph(), init(), init_complex_filtergraph(), init_filter(), init_filters(), join_config_output(), and push_frame().

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
Examples:
filtering_audio.c, filtering_video.c, and transcoding.c.

Definition at line 386 of file af_afftfilt.c.

Referenced by avfilter_graph_parse(), configure_filtergraph(), init(), init_complex_filtergraph(), init_filter(), and init_filters().

AVFilter ff_af_afftfilt
Initial value:
= {
.name = "afftfilt",
.description = NULL_IF_CONFIG_SMALL("Apply arbitrary expressions to samples in frequency domain."),
.priv_size = sizeof(AFFTFiltContext),
.priv_class = &afftfilt_class,
}
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_afftfilt.c:352
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static int query_formats(AVFilterContext *ctx)
Definition: af_afftfilt.c:322
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376

Definition at line 394 of file af_afftfilt.c.