FFmpeg
Data Structures | Macros | Functions | Variables
af_stereowiden.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"
#include "formats.h"

Go to the source code of this file.

Data Structures

struct  StereoWidenContext
 

Macros

#define OFFSET(x)   offsetof(StereoWidenContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define AT   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (stereowiden)
 
static int query_formats (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption stereowiden_options []
 
static const AVFilterPad inputs []
 
const AVFilter ff_af_stereowiden
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 43 of file af_stereowiden.c.

◆ A

Definition at line 44 of file af_stereowiden.c.

◆ AT

Definition at line 45 of file af_stereowiden.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( stereowiden  )

◆ query_formats()

static int query_formats ( const AVFilterContext ctx,
AVFilterFormatsConfig **  cfg_in,
AVFilterFormatsConfig **  cfg_out 
)
static

Definition at line 57 of file af_stereowiden.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 83 of file af_stereowiden.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 100 of file af_stereowiden.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 148 of file af_stereowiden.c.

Variable Documentation

◆ stereowiden_options

const AVOption stereowiden_options[]
static
Initial value:
= {
{ "delay", "set delay time", OFFSET(delay), AV_OPT_TYPE_FLOAT, {.dbl=20}, 1, 100, A },
{ "feedback", "set feedback gain", OFFSET(feedback), AV_OPT_TYPE_FLOAT, {.dbl=.3}, 0, 0.9, AT },
{ "crossfeed", "set cross feed", OFFSET(crossfeed), AV_OPT_TYPE_FLOAT, {.dbl=.3}, 0, 0.8, AT },
{ "drymix", "set dry-mix", OFFSET(drymix), AV_OPT_TYPE_FLOAT, {.dbl=.8}, 0, 1.0, AT },
{ NULL }
}

Definition at line 47 of file af_stereowiden.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}

Definition at line 155 of file af_stereowiden.c.

◆ ff_af_stereowiden

const AVFilter ff_af_stereowiden
Initial value:
= {
.name = "stereowiden",
.description = NULL_IF_CONFIG_SMALL("Apply stereo widening effect."),
.priv_size = sizeof(StereoWidenContext),
.priv_class = &stereowiden_class,
.process_command = ff_filter_process_command,
}

Definition at line 164 of file af_stereowiden.c.

query_formats
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition: af_stereowiden.c:57
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_stereowiden.c:148
A
#define A
Definition: af_stereowiden.c:44
inputs
static const AVFilterPad inputs[]
Definition: af_stereowiden.c:155
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
StereoWidenContext
Definition: af_stereowiden.c:30
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_stereowiden.c:100
NULL
#define NULL
Definition: coverity.c:32
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:34
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:94
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:900
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
Definition: opt.h:271
AT
#define AT
Definition: af_stereowiden.c:45
FILTER_QUERY_FUNC2
#define FILTER_QUERY_FUNC2(func)
Definition: filters.h:239
OFFSET
#define OFFSET(x)
Definition: af_stereowiden.c:43
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_stereowiden.c:83