FFmpeg  4.0
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 int query_formats (AVFilterContext *ctx)
 
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 []
 
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  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 45 of file af_acontrast.c.

◆ filter_flt()

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

Definition at line 75 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 95 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 115 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 133 of file af_acontrast.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 151 of file af_acontrast.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 166 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 }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
Definition: af_acontrast.c:35
#define A
Definition: af_acontrast.c:36

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,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_acontrast.c:166
static int config_input(AVFilterLink *inlink)
Definition: af_acontrast.c:151
Examples:
filtering_audio.c, filtering_video.c, and transcoding.c.

Definition at line 193 of file af_acontrast.c.

Referenced by avfilter_graph_parse(), compressor(), config_output(), configure_filtergraph(), filter_frame(), gate(), get_aspect_ratio(), get_video_frame(), init(), init_complex_filtergraph(), init_filter(), init_filters(), join_config_output(), plot_spectrum_column(), process_command(), push_frame(), query_formats(), request_frame(), and uninit().

◆ outputs

const AVFilterPad outputs[]
static

◆ ff_af_acontrast

AVFilter ff_af_acontrast
Initial value:
= {
.name = "acontrast",
.description = NULL_IF_CONFIG_SMALL("Simple audio dynamic range compression/expansion filter."),
.query_formats = query_formats,
.priv_size = sizeof(AudioContrastContext),
.priv_class = &acontrast_class,
}
static int query_formats(AVFilterContext *ctx)
Definition: af_acontrast.c:45
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203

Definition at line 211 of file af_acontrast.c.