FFmpeg
Data Structures | Macros | Functions | Variables
af_crystalizer.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  CrystalizerContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define OFFSET(x)   offsetof(CrystalizerContext, x)
 
#define A   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (crystalizer)
 
static int query_formats (AVFilterContext *ctx)
 
static int filter_flt (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_dbl (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_fltp (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int filter_dblp (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int ifilter_flt (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int ifilter_dbl (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int ifilter_fltp (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int ifilter_dblp (AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
 
static int config_input (AVFilterLink *inlink)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const AVOption crystalizer_options []
 
static const AVFilterPad inputs []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_crystalizer
 

Macro Definition Documentation

◆ OFFSET

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

Definition at line 35 of file af_crystalizer.c.

◆ A

Definition at line 36 of file af_crystalizer.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( crystalizer  )

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 46 of file af_crystalizer.c.

◆ filter_flt()

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

Definition at line 86 of file af_crystalizer.c.

Referenced by config_input().

◆ filter_dbl()

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

Definition at line 121 of file af_crystalizer.c.

Referenced by config_input().

◆ filter_fltp()

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

Definition at line 157 of file af_crystalizer.c.

Referenced by config_input().

◆ filter_dblp()

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

Definition at line 190 of file af_crystalizer.c.

Referenced by config_input().

◆ ifilter_flt()

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

Definition at line 223 of file af_crystalizer.c.

Referenced by config_input().

◆ ifilter_dbl()

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

Definition at line 259 of file af_crystalizer.c.

Referenced by config_input().

◆ ifilter_fltp()

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

Definition at line 296 of file af_crystalizer.c.

Referenced by config_input().

◆ ifilter_dblp()

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

Definition at line 330 of file af_crystalizer.c.

Referenced by config_input().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 364 of file af_crystalizer.c.

Referenced by process_command().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 379 of file af_crystalizer.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 422 of file af_crystalizer.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 429 of file af_crystalizer.c.

Variable Documentation

◆ crystalizer_options

const AVOption crystalizer_options[]
static
Initial value:
= {
{ "i", "set intensity", OFFSET(mult), AV_OPT_TYPE_FLOAT, {.dbl=2.0},-10, 10, A },
{ "c", "enable clipping", OFFSET(clip), AV_OPT_TYPE_BOOL, {.i64=1}, 0, 1, A },
{ NULL }
}

Definition at line 38 of file af_crystalizer.c.

◆ inputs

const AVFilterPad inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}

Definition at line 441 of file af_crystalizer.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
},
{ NULL }
}

Definition at line 451 of file af_crystalizer.c.

◆ ff_af_crystalizer

const AVFilter ff_af_crystalizer
Initial value:
= {
.name = "crystalizer",
.description = NULL_IF_CONFIG_SMALL("Simple audio noise sharpening filter."),
.query_formats = query_formats,
.priv_size = sizeof(CrystalizerContext),
.priv_class = &crystalizer_class,
}

Definition at line 459 of file af_crystalizer.c.

outputs
static const AVFilterPad outputs[]
Definition: af_crystalizer.c:451
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_crystalizer.c:364
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_crystalizer.c:422
OFFSET
#define OFFSET(x)
Definition: af_crystalizer.c:35
mult
static int16_t mult(Float11 *f1, Float11 *f2)
Definition: g726.c:56
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_crystalizer.c:46
NULL
#define NULL
Definition: coverity.c:32
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_crystalizer.c:429
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_crystalizer.c:379
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
AV_OPT_TYPE_FLOAT
@ AV_OPT_TYPE_FLOAT
Definition: opt.h:227
inputs
static const AVFilterPad inputs[]
Definition: af_crystalizer.c:441
CrystalizerContext
Definition: af_crystalizer.c:27
A
#define A
Definition: af_crystalizer.c:36
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
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Definition: opt.h:241
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:134
flags
#define flags(name, subs,...)
Definition: cbs_av1.c:561
clip
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:162