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

Go to the source code of this file.

Data Structures

struct  AudioContrastContext
 

Macros

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

Functions

 AVFILTER_DEFINE_CLASS (acontrast)
 
static void filter_flt (void **d, const void **s, int nb_samples, int channels, float contrast)
 
static void filter_dbl (void **d, const void **s, int nb_samples, int channels, float contrast)
 
static void filter_fltp (void **d, const void **s, int nb_samples, int channels, float contrast)
 
static void filter_dblp (void **d, const void **s, int nb_samples, int channels, float contrast)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 

Variables

static const AVOption acontrast_options []
 
static const AVFilterPad inputs []
 
const AVFilter ff_af_acontrast
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 34 of file af_acontrast.c.

◆ A

Definition at line 35 of file af_acontrast.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( acontrast  )

◆ filter_flt()

static void filter_flt ( void **  d,
const void **  s,
int  nb_samples,
int  channels,
float  contrast 
)
static

Definition at line 44 of file af_acontrast.c.

Referenced by config_input().

◆ filter_dbl()

static void filter_dbl ( void **  d,
const void **  s,
int  nb_samples,
int  channels,
float  contrast 
)
static

Definition at line 64 of file af_acontrast.c.

Referenced by config_input().

◆ filter_fltp()

static void filter_fltp ( void **  d,
const void **  s,
int  nb_samples,
int  channels,
float  contrast 
)
static

Definition at line 84 of file af_acontrast.c.

Referenced by config_input().

◆ filter_dblp()

static void filter_dblp ( void **  d,
const void **  s,
int  nb_samples,
int  channels,
float  contrast 
)
static

Definition at line 102 of file af_acontrast.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 120 of file af_acontrast.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 135 of file af_acontrast.c.

Variable Documentation

◆ acontrast_options

const AVOption acontrast_options[]
static
Initial value:
= {
{ "contrast", "set contrast", OFFSET(contrast), AV_OPT_TYPE_FLOAT, {.dbl=33}, 0, 100, A },
{ NULL }
}

Definition at line 37 of file af_acontrast.c.

◆ inputs

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

Definition at line 162 of file af_acontrast.c.

◆ ff_af_acontrast

const AVFilter ff_af_acontrast
Initial value:
= {
.name = "acontrast",
.description = NULL_IF_CONFIG_SMALL("Simple audio dynamic range compression/expansion filter."),
.priv_size = sizeof(AudioContrastContext),
.priv_class = &acontrast_class,
}

Definition at line 171 of file af_acontrast.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:66
AudioContrastContext
Definition: af_acontrast.c:27
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
NULL
#define NULL
Definition: coverity.c:32
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_acontrast.c:120
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:32
OFFSET
#define OFFSET(x)
Definition: af_acontrast.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:106
A
#define A
Definition: af_acontrast.c:35
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:228
inputs
static const AVFilterPad inputs[]
Definition: af_acontrast.c:162
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_acontrast.c:135
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:61
AV_SAMPLE_FMT_FLT
@ AV_SAMPLE_FMT_FLT
float
Definition: samplefmt.h:60
FILTER_SAMPLEFMTS
#define FILTER_SAMPLEFMTS(...)
Definition: internal.h:180