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

Go to the source code of this file.

Data Structures

struct  CrossfeedContext
 

Macros

#define OFFSET(x)   offsetof(CrossfeedContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 
 AVFILTER_DEFINE_CLASS (crossfeed)
 

Variables

static const AVOption crossfeed_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
AVFilter ff_af_crossfeed
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 149 of file af_crossfeed.c.

◆ FLAGS

Definition at line 150 of file af_crossfeed.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 42 of file af_crossfeed.c.

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 58 of file af_crossfeed.c.

Referenced by process_command().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 84 of file af_crossfeed.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 137 of file af_crossfeed.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( crossfeed  )

Variable Documentation

◆ crossfeed_options

const AVOption crossfeed_options[]
static
Initial value:
= {
{ "strength", "set crossfeed strength", OFFSET(strength), AV_OPT_TYPE_DOUBLE, {.dbl=.2}, 0, 1, FLAGS },
{ "range", "set soundstage wideness", OFFSET(range), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, 0, 1, FLAGS },
{ "slope", "set curve slope", OFFSET(slope), AV_OPT_TYPE_DOUBLE, {.dbl=.5}, .01, 1, FLAGS },
{ "level_in", "set level in", OFFSET(level_in), AV_OPT_TYPE_DOUBLE, {.dbl=.9}, 0, 1, FLAGS },
{ "level_out", "set level out", OFFSET(level_out), AV_OPT_TYPE_DOUBLE, {.dbl=1.}, 0, 1, FLAGS },
{ NULL }
}

Definition at line 152 of file af_crossfeed.c.

◆ inputs

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

Definition at line 163 of file af_crossfeed.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 173 of file af_crossfeed.c.

◆ ff_af_crossfeed

AVFilter ff_af_crossfeed
Initial value:
= {
.name = "crossfeed",
.description = NULL_IF_CONFIG_SMALL("Apply headphone crossfeed filter."),
.query_formats = query_formats,
.priv_size = sizeof(CrossfeedContext),
.priv_class = &crossfeed_class,
}

Definition at line 181 of file af_crossfeed.c.

filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_crossfeed.c:84
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_crossfeed.c:137
inputs
static const AVFilterPad inputs[]
Definition: af_crossfeed.c:163
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_crossfeed.c:58
CrossfeedContext
Definition: af_crossfeed.c:26
FLAGS
#define FLAGS
Definition: af_crossfeed.c:150
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Definition: opt.h:225
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
NULL
#define NULL
Definition: coverity.c:32
outputs
static const AVFilterPad outputs[]
Definition: af_crossfeed.c:173
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:188
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_crossfeed.c:42
OFFSET
#define OFFSET(x)
Definition: af_crossfeed.c:149
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:133
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:565