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 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 []
 
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  )

◆ 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 }
}

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 }
}

Definition at line 193 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."),
.query_formats = query_formats,
.priv_size = sizeof(AudioContrastContext),
.priv_class = &acontrast_class,
}

Definition at line 211 of file af_acontrast.c.

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:203
NULL
#define NULL
Definition: coverity.c:32
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_acontrast.c:151
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:116
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_acontrast.c:45
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:193
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_acontrast.c:166