FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_replaygain.c File Reference

ReplayGain scanner. More...

#include "libavutil/avassert.h"
#include "libavutil/channel_layout.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  ReplayGainFreqInfo
 
struct  ReplayGainContext
 

Macros

#define HISTOGRAM_SLOTS   12000
 
#define BUTTER_ORDER   2
 
#define YULE_ORDER   10
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static void calc_stereo_peak (const float *samples, int nb_samples, float *peak_p)
 
static double calc_stereo_rms (const float *samples, int nb_samples)
 
static void butter_filter_stereo_samples (ReplayGainContext *s, float *samples, int nb_samples)
 
static void yule_filter_stereo_samples (ReplayGainContext *s, const float *src, float *dst, int nb_samples)
 
static float calc_replaygain (uint32_t *histogram)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const ReplayGainFreqInfo freqinfos []
 
static const AVFilterPad replaygain_inputs []
 
static const AVFilterPad replaygain_outputs []
 
AVFilter ff_af_replaygain
 

Detailed Description

ReplayGain scanner.

Definition in file af_replaygain.c.

Macro Definition Documentation

#define HISTOGRAM_SLOTS   12000

Definition at line 32 of file af_replaygain.c.

Referenced by calc_replaygain(), and filter_frame().

#define BUTTER_ORDER   2

Definition at line 33 of file af_replaygain.c.

#define YULE_ORDER   10

Definition at line 34 of file af_replaygain.c.

Function Documentation

static int query_formats ( AVFilterContext ctx)
static

Definition at line 322 of file af_replaygain.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 343 of file af_replaygain.c.

static void calc_stereo_peak ( const float *  samples,
int  nb_samples,
float *  peak_p 
)
static

Definition at line 372 of file af_replaygain.c.

Referenced by filter_frame().

static double calc_stereo_rms ( const float *  samples,
int  nb_samples 
)
static

Definition at line 399 of file af_replaygain.c.

Referenced by filter_frame().

static void butter_filter_stereo_samples ( ReplayGainContext s,
float *  samples,
int  nb_samples 
)
static

Definition at line 415 of file af_replaygain.c.

Referenced by filter_frame().

static void yule_filter_stereo_samples ( ReplayGainContext s,
const float *  src,
float *  dst,
int  nb_samples 
)
static

Definition at line 464 of file af_replaygain.c.

Referenced by filter_frame().

static float calc_replaygain ( uint32_t *  histogram)
static

Definition at line 531 of file af_replaygain.c.

Referenced by uninit().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 549 of file af_replaygain.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 580 of file af_replaygain.c.

Variable Documentation

const ReplayGainFreqInfo freqinfos[]
static

Definition at line 44 of file af_replaygain.c.

const AVFilterPad replaygain_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)
static int config_input(AVFilterLink *inlink)

Definition at line 589 of file af_replaygain.c.

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

Definition at line 599 of file af_replaygain.c.

AVFilter ff_af_replaygain
Initial value:
= {
.name = "replaygain",
.description = NULL_IF_CONFIG_SMALL("ReplayGain scanner."),
.query_formats = query_formats,
.uninit = uninit,
.priv_size = sizeof(ReplayGainContext),
}
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:389
static const AVFilterPad replaygain_inputs[]
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:379
static av_cold void uninit(AVFilterContext *ctx)
static const AVFilterPad replaygain_outputs[]
static int query_formats(AVFilterContext *ctx)

Definition at line 607 of file af_replaygain.c.