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"
#include "formats.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 []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_acontrast
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file af_acontrast.c.

◆ A

Definition at line 36 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 45 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 65 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 85 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 103 of file af_acontrast.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 121 of file af_acontrast.c.

Referenced by process_command().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 136 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 38 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 163 of file af_acontrast.c.

◆ outputs

const AVFilterPad outputs[]
static

◆ 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 179 of file af_acontrast.c.

AV_SAMPLE_FMT_FLTP
@ AV_SAMPLE_FMT_FLTP
float, planar
Definition: samplefmt.h:69
AudioContrastContext
Definition: af_acontrast.c:28
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
outputs
static const AVFilterPad outputs[]
Definition: af_acontrast.c:172
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:191
NULL
#define NULL
Definition: coverity.c:32
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_acontrast.c:121
OFFSET
#define OFFSET(x)
Definition: af_acontrast.c:35
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:117
A
#define A
Definition: af_acontrast.c:36
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:227
inputs
static const AVFilterPad inputs[]
Definition: af_acontrast.c:163
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:70
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_acontrast.c:136
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:192
AV_SAMPLE_FMT_DBL
@ AV_SAMPLE_FMT_DBL
double
Definition: samplefmt.h:64
AV_SAMPLE_FMT_FLT
@ AV_SAMPLE_FMT_FLT
float
Definition: samplefmt.h:63
FILTER_SAMPLEFMTS
#define FILTER_SAMPLEFMTS(...)
Definition: internal.h:179