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 []
 
AVFilter ff_af_crystalizer
 

Macro Definition Documentation

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

Definition at line 35 of file af_crystalizer.c.

Definition at line 36 of file af_crystalizer.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( crystalizer  )
static int query_formats ( AVFilterContext ctx)
static

Definition at line 46 of file af_crystalizer.c.

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().

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().

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().

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().

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().

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().

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().

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().

static int config_input ( AVFilterLink inlink)
static

Definition at line 364 of file af_crystalizer.c.

Referenced by process_command().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 379 of file af_crystalizer.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 422 of file af_crystalizer.c.

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

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 }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
static int16_t mult(Float11 *f1, Float11 *f2)
Definition: g726.c:55
#define A
static double clip(void *opaque, double val)
Clip value val in the minval - maxval range.
Definition: vf_lut.c:162

Definition at line 38 of file af_crystalizer.c.

const AVFilterPad 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 441 of file af_crystalizer.c.

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

Definition at line 451 of file af_crystalizer.c.

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,
}
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:117
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:117
#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
#define flags(name, subs,...)
Definition: cbs_av1.c:561
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad outputs[]
static const AVFilterPad inputs[]
static av_cold void uninit(AVFilterContext *ctx)

Definition at line 459 of file af_crystalizer.c.