FFmpeg  4.0
Data Structures | Macros | Functions | Variables
af_dcshift.c File Reference
#include "libavutil/opt.h"
#include "libavutil/samplefmt.h"
#include "avfilter.h"
#include "audio.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  DCShiftContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (dcshift)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption dcshift_options []
 
static const AVFilterPad dcshift_inputs []
 
static const AVFilterPad dcshift_outputs []
 
AVFilter ff_af_dcshift
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file af_dcshift.c.

◆ A

Definition at line 36 of file af_dcshift.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( dcshift  )

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 46 of file af_dcshift.c.

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 55 of file af_dcshift.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 84 of file af_dcshift.c.

Variable Documentation

◆ dcshift_options

const AVOption dcshift_options[]
static
Initial value:
= {
{ "shift", "set DC shift", OFFSET(dcshift), AV_OPT_TYPE_DOUBLE, {.dbl=0}, -1, 1, A },
{ "limitergain", "set limiter gain", OFFSET(limitergain), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 1, A },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_dcshift.c:35
#define A
Definition: af_dcshift.c:36

Definition at line 38 of file af_dcshift.c.

◆ dcshift_inputs

const AVFilterPad dcshift_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_dcshift.c:84

Definition at line 146 of file af_dcshift.c.

◆ dcshift_outputs

const AVFilterPad dcshift_outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}
#define NULL
Definition: coverity.c:32

Definition at line 155 of file af_dcshift.c.

◆ ff_af_dcshift

AVFilter ff_af_dcshift
Initial value:
= {
.name = "dcshift",
.description = NULL_IF_CONFIG_SMALL("Apply a DC shift to the audio."),
.query_formats = query_formats,
.priv_size = sizeof(DCShiftContext),
.priv_class = &dcshift_class,
.init = init,
}
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition: avfilter.h:125
static int flags
Definition: log.c:55
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static int query_formats(AVFilterContext *ctx)
Definition: af_dcshift.c:55
static const AVFilterPad dcshift_inputs[]
Definition: af_dcshift.c:146
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad dcshift_outputs[]
Definition: af_dcshift.c:155
static av_cold int init(AVFilterContext *ctx)
Definition: af_dcshift.c:46

Definition at line 163 of file af_dcshift.c.