FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_chorus.c File Reference

chorus audio filter More...

#include "libavutil/avstring.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
#include "generate_wave_table.h"

Go to the source code of this file.

Data Structures

struct  ChorusContext
 

Macros

#define OFFSET(x)   offsetof(ChorusContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define MOD(a, b)   (((a) >= (b)) ? (a) - (b) : (a))
 

Functions

 AVFILTER_DEFINE_CLASS (chorus)
 
static void count_items (char *item_str, int *nb_items)
 
static void fill_items (char *item_str, int *nb_items, float *items)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *frame)
 
static int request_frame (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption chorus_options []
 
static const AVFilterPad chorus_inputs []
 
static const AVFilterPad chorus_outputs []
 
AVFilter ff_af_chorus
 

Detailed Description

chorus audio filter

Definition in file af_chorus.c.

Macro Definition Documentation

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

Definition at line 63 of file af_chorus.c.

Definition at line 64 of file af_chorus.c.

#define MOD (   a,
  b 
)    (((a) >= (b)) ? (a) - (b) : (a))

Definition at line 237 of file af_chorus.c.

Referenced by filter_frame().

Function Documentation

AVFILTER_DEFINE_CLASS ( chorus  )
static void count_items ( char *  item_str,
int *  nb_items 
)
static

Definition at line 78 of file af_chorus.c.

Referenced by init().

static void fill_items ( char *  item_str,
int *  nb_items,
float *  items 
)
static

Definition at line 90 of file af_chorus.c.

Referenced by init().

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 105 of file af_chorus.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 156 of file af_chorus.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 185 of file af_chorus.c.

static int filter_frame ( AVFilterLink inlink,
AVFrame frame 
)
static

Definition at line 239 of file af_chorus.c.

Referenced by request_frame().

static int request_frame ( AVFilterLink outlink)
static

Definition at line 292 of file af_chorus.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 324 of file af_chorus.c.

Variable Documentation

const AVOption chorus_options[]
static
Initial value:
= {
{ "in_gain", "set input gain", OFFSET(in_gain), AV_OPT_TYPE_FLOAT, {.dbl=.4}, 0, 1, A },
{ "out_gain", "set output gain", OFFSET(out_gain), AV_OPT_TYPE_FLOAT, {.dbl=.4}, 0, 1, A },
{ "delays", "set delays", OFFSET(delays_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, A },
{ "decays", "set decays", OFFSET(decays_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, A },
{ "speeds", "set speeds", OFFSET(speeds_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, A },
{ "depths", "set depths", OFFSET(depths_str), AV_OPT_TYPE_STRING, {.str=NULL}, 0, 0, A },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define A
Definition: af_chorus.c:64
#define OFFSET(x)
Definition: af_chorus.c:63

Definition at line 66 of file af_chorus.c.

const AVFilterPad chorus_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *frame)
Definition: af_chorus.c:239

Definition at line 352 of file af_chorus.c.

const AVFilterPad chorus_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int request_frame(AVFilterLink *outlink)
Definition: af_chorus.c:292
static int config_output(AVFilterLink *outlink)
Definition: af_chorus.c:185

Definition at line 361 of file af_chorus.c.

AVFilter ff_af_chorus
Initial value:
= {
.name = "chorus",
.description = NULL_IF_CONFIG_SMALL("Add a chorus effect to the audio."),
.query_formats = query_formats,
.priv_size = sizeof(ChorusContext),
.priv_class = &chorus_class,
.init = init,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_chorus.c:156
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:176
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_chorus.c:324
static const AVFilterPad chorus_inputs[]
Definition: af_chorus.c:352
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:386
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:376
static av_cold int init(AVFilterContext *ctx)
Definition: af_chorus.c:105
static const AVFilterPad chorus_outputs[]
Definition: af_chorus.c:361

Definition at line 371 of file af_chorus.c.