FFmpeg
Loading...
Searching...
No Matches
af_adecorrelate.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/ffmath.h"
#include "libavutil/lfg.h"
#include "libavutil/mem.h"
#include "libavutil/random_seed.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"

Go to the source code of this file.

Data Structures

struct  APContext
 
struct  ADecorrelateContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define MAX_STAGES   16
 
#define FILTER_FC   1100.0
 
#define RT60_LF   0.1
 
#define RT60_HF   0.008
 
#define OFFSET(x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

static int ap_init (APContext *ap, int fs, double delay)
 
static void ap_free (APContext *ap)
 
static double ap_run (APContext *ap, double x)
 
static void filter_channel_dbl (AVFilterContext *ctx, int ch, AVFrame *in, AVFrame *out)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_channels (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (adecorrelate)
 

Variables

static const AVOption adecorrelate_options []
 
static const AVFilterPad inputs []
 
const FFFilter ff_af_adecorrelate
 

Macro Definition Documentation

◆ MAX_STAGES

#define MAX_STAGES   16

Definition at line 32 of file af_adecorrelate.c.

◆ FILTER_FC

#define FILTER_FC   1100.0

Definition at line 33 of file af_adecorrelate.c.

Referenced by ap_init().

◆ RT60_LF

#define RT60_LF   0.1

Definition at line 34 of file af_adecorrelate.c.

Referenced by ap_init().

◆ RT60_HF

#define RT60_HF   0.008

Definition at line 35 of file af_adecorrelate.c.

Referenced by ap_init().

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 214 of file af_adecorrelate.c.

◆ FLAGS

Definition at line 215 of file af_adecorrelate.c.

Function Documentation

◆ ap_init()

static int ap_init ( APContext * ap,
int fs,
double delay )
static

Definition at line 59 of file af_adecorrelate.c.

Referenced by config_input().

◆ ap_free()

static void ap_free ( APContext * ap)
static

Definition at line 86 of file af_adecorrelate.c.

Referenced by uninit().

◆ ap_run()

static double ap_run ( APContext * ap,
double x )
static

Definition at line 92 of file af_adecorrelate.c.

Referenced by filter_channel_dbl().

◆ filter_channel_dbl()

static void filter_channel_dbl ( AVFilterContext * ctx,
int ch,
AVFrame * in,
AVFrame * out )
static

Definition at line 105 of file af_adecorrelate.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink * inlink)
static

Definition at line 125 of file af_adecorrelate.c.

◆ filter_channels()

static int filter_channels ( AVFilterContext * ctx,
void * arg,
int jobnr,
int nb_jobs )
static

Definition at line 158 of file af_adecorrelate.c.

◆ filter_frame()

static int filter_frame ( AVFilterLink * inlink,
AVFrame * in )
static

Definition at line 173 of file af_adecorrelate.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 200 of file af_adecorrelate.c.

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( adecorrelate )

Variable Documentation

◆ adecorrelate_options

const AVOption adecorrelate_options[]
static
Initial value:
= {
{ "stages", "set filtering stages", OFFSET(stages), AV_OPT_TYPE_INT, {.i64=6}, 1, MAX_STAGES, FLAGS },
{ "seed", "set random seed", OFFSET(seed), AV_OPT_TYPE_INT64, {.i64=-1}, -1, UINT_MAX, FLAGS },
{ NULL }
}
#define MAX_STAGES
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT64
Underlying C type is int64_t.
Definition opt.h:262
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
static unsigned int seed
Definition videogen.c:78

Definition at line 217 of file af_adecorrelate.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}
static int config_input(AVFilterLink *inlink)
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
Definition dolby_e.c:1067
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201

Definition at line 225 of file af_adecorrelate.c.

◆ ff_af_adecorrelate

const FFFilter ff_af_adecorrelate
Initial value:
= {
.p.name = "adecorrelate",
.p.description = NULL_IF_CONFIG_SMALL("Apply decorrelation to input audio."),
.p.priv_class = &adecorrelate_class,
.priv_size = sizeof(ADecorrelateContext),
}
static const AVFilterPad inputs[]
Definition af_aap.c:299
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:34
#define AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC
Some filters support a generic "enable" expression option that can be used to enable or disable a fil...
Definition avfilter.h:196
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition avfilter.h:166
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition samplefmt.h:67
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
Definition filters.h:264
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition filters.h:257
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88

Definition at line 234 of file af_adecorrelate.c.