FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
af_aap.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/common.h"
#include "libavutil/float_dsp.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "filters.h"
#include "internal.h"
#include "aap_template.c"

Go to the source code of this file.

Data Structures

struct  AudioAPContext
 

Macros

#define OFFSET(x)   offsetof(AudioAPContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define AT   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define DEPTH   32
 
#define DEPTH   64
 

Enumerations

enum  OutModes {
  IN_MODE, DESIRED_MODE, OUT_MODE, NOISE_MODE,
  ERROR_MODE, NB_OMODES, IN_MODE, OUT_MODE,
  NOISE_MODE, NB_MODES, IN_MODE, OUT_MODE,
  NOISE_MODE, NB_MODES, IN_MODE, DESIRED_MODE,
  OUT_MODE, NOISE_MODE, ERROR_MODE, NB_OMODES,
  IN_MODE, DESIRED_MODE, OUT_MODE, NOISE_MODE,
  ERROR_MODE, NB_OMODES, IN_MODE, OUT_MODE,
  ESS_MODE, NB_MODES
}
 

Functions

 AVFILTER_DEFINE_CLASS (aap)
 
static int query_formats (AVFilterContext *ctx)
 
static int activate (AVFilterContext *ctx)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const AVOption aap_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_aap
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 74 of file af_aap.c.

◆ A

Definition at line 75 of file af_aap.c.

◆ AT

Definition at line 76 of file af_aap.c.

◆ DEPTH [1/2]

#define DEPTH   32

Definition at line 187 of file af_aap.c.

◆ DEPTH [2/2]

#define DEPTH   64

Definition at line 187 of file af_aap.c.

Enumeration Type Documentation

◆ OutModes

enum OutModes
Enumerator
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
OUT_MODE 
NOISE_MODE 
NB_MODES 
IN_MODE 
OUT_MODE 
NOISE_MODE 
NB_MODES 
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
DESIRED_MODE 
OUT_MODE 
NOISE_MODE 
ERROR_MODE 
NB_OMODES 
IN_MODE 
OUT_MODE 
ESS_MODE 
NB_MODES 

Definition at line 32 of file af_aap.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( aap  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 98 of file af_aap.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 117 of file af_aap.c.

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 190 of file af_aap.c.

◆ init()

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 266 of file af_aap.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 277 of file af_aap.c.

Variable Documentation

◆ aap_options

const AVOption aap_options[]
static
Initial value:
= {
{ "order", "set the filter order", OFFSET(order), AV_OPT_TYPE_INT, {.i64=16}, 1, INT16_MAX, A },
{ "projection", "set the filter projection", OFFSET(projection), AV_OPT_TYPE_INT, {.i64=2}, 1, 256, A },
{ "mu", "set the filter mu", OFFSET(mu), AV_OPT_TYPE_FLOAT, {.dbl=0.0001},0,1, AT },
{ "delta", "set the filter delta", OFFSET(delta), AV_OPT_TYPE_FLOAT, {.dbl=0.001},0, 1, AT },
{ "out_mode", "set output mode", OFFSET(output_mode), AV_OPT_TYPE_INT, {.i64=OUT_MODE}, 0, NB_OMODES-1, AT, .unit = "mode" },
{ "i", "input", 0, AV_OPT_TYPE_CONST, {.i64=IN_MODE}, 0, 0, AT, .unit = "mode" },
{ "d", "desired", 0, AV_OPT_TYPE_CONST, {.i64=DESIRED_MODE}, 0, 0, AT, .unit = "mode" },
{ "o", "output", 0, AV_OPT_TYPE_CONST, {.i64=OUT_MODE}, 0, 0, AT, .unit = "mode" },
{ "n", "noise", 0, AV_OPT_TYPE_CONST, {.i64=NOISE_MODE}, 0, 0, AT, .unit = "mode" },
{ "e", "error", 0, AV_OPT_TYPE_CONST, {.i64=ERROR_MODE}, 0, 0, AT, .unit = "mode" },
{ "precision", "set processing precision", OFFSET(precision), AV_OPT_TYPE_INT, {.i64=0}, 0, 2, A, .unit = "precision" },
{ "auto", "set auto processing precision", 0, AV_OPT_TYPE_CONST, {.i64=0}, 0, 0, A, .unit = "precision" },
{ "float", "set single-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=1}, 0, 0, A, .unit = "precision" },
{ "double","set double-floating point processing precision", 0, AV_OPT_TYPE_CONST, {.i64=2}, 0, 0, A, .unit = "precision" },
{ NULL }
}

Definition at line 78 of file af_aap.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "input",
},
{
.name = "desired",
},
}

Definition at line 299 of file af_aap.c.

◆ outputs

const AVFilterPad outputs[]
static

◆ ff_af_aap

const AVFilter ff_af_aap
Initial value:
= {
.name = "aap",
.description = NULL_IF_CONFIG_SMALL("Apply Affine Projection algorithm to first audio stream."),
.priv_size = sizeof(AudioAPContext),
.priv_class = &aap_class,
.init = init,
.process_command = ff_filter_process_command,
}

Definition at line 318 of file af_aap.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:159
activate
static int activate(AVFilterContext *ctx)
Definition: af_aap.c:117
inputs
static const AVFilterPad inputs[]
Definition: af_aap.c:299
ERROR_MODE
@ ERROR_MODE
Definition: af_aap.c:37
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
NB_OMODES
@ NB_OMODES
Definition: af_aap.c:38
DESIRED_MODE
@ DESIRED_MODE
Definition: af_aap.c:34
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:182
NULL
#define NULL
Definition: coverity.c:32
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:106
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_aap.c:190
ff_filter_process_command
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
Definition: avfilter.c:890
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:238
A
#define A
Definition: af_aap.c:75
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_aap.c:98
OFFSET
#define OFFSET(x)
Definition: af_aap.c:74
delta
float delta
Definition: vorbis_enc_data.h:430
init
static av_cold int init(AVFilterContext *ctx)
Definition: af_aap.c:266
AudioAPContext
Definition: af_aap.c:41
outputs
static const AVFilterPad outputs[]
Definition: af_aap.c:310
NOISE_MODE
@ NOISE_MODE
Definition: af_aap.c:36
IN_MODE
@ IN_MODE
Definition: af_aap.c:33
AT
#define AT
Definition: af_aap.c:76
OUT_MODE
@ OUT_MODE
Definition: af_aap.c:35
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:235
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:183
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:155
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Definition: opt.h:244
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_aap.c:277