FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
asrc_hilbert.c File Reference
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"
#include "window_func.h"

Go to the source code of this file.

Data Structures

struct  HilbertContext
 

Macros

#define OFFSET(x)   offsetof(HilbertContext, x)
 
#define FLAGS   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 

Functions

 AVFILTER_DEFINE_CLASS (hilbert)
 
static av_cold int init (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static av_cold int query_formats (AVFilterContext *ctx)
 
static av_cold int config_props (AVFilterLink *outlink)
 
static int request_frame (AVFilterLink *outlink)
 

Variables

static const AVOption hilbert_options []
 
static const AVFilterPad hilbert_outputs []
 
AVFilter ff_asrc_hilbert
 

Macro Definition Documentation

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

Definition at line 39 of file asrc_hilbert.c.

Definition at line 40 of file asrc_hilbert.c.

Function Documentation

AVFILTER_DEFINE_CLASS ( hilbert  )
static av_cold int init ( AVFilterContext ctx)
static

Definition at line 75 of file asrc_hilbert.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 87 of file asrc_hilbert.c.

static av_cold int query_formats ( AVFilterContext ctx)
static

Definition at line 94 of file asrc_hilbert.c.

static av_cold int config_props ( AVFilterLink outlink)
static

Definition at line 128 of file asrc_hilbert.c.

static int request_frame ( AVFilterLink outlink)
static

Definition at line 158 of file asrc_hilbert.c.

Variable Documentation

const AVOption hilbert_options[]
static
Initial value:
= {
{ "sample_rate", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64=44100}, 1, INT_MAX, FLAGS },
{ "r", "set sample rate", OFFSET(sample_rate), AV_OPT_TYPE_INT, {.i64=44100}, 1, INT_MAX, FLAGS },
{ "taps", "set number of taps", OFFSET(nb_taps), AV_OPT_TYPE_INT, {.i64=22051}, 11, UINT16_MAX, FLAGS },
{ "t", "set number of taps", OFFSET(nb_taps), AV_OPT_TYPE_INT, {.i64=22051}, 11, UINT16_MAX, FLAGS },
{ "nb_samples", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, FLAGS },
{ "n", "set the number of samples per requested frame", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX, FLAGS },
{ "win_func", "set window function", OFFSET(win_func), AV_OPT_TYPE_INT, {.i64=WFUNC_BLACKMAN}, 0, NB_WFUNC-1, FLAGS, "win_func" },
{ "w", "set window function", OFFSET(win_func), AV_OPT_TYPE_INT, {.i64=WFUNC_BLACKMAN}, 0, NB_WFUNC-1, FLAGS, "win_func" },
{ "rect", "Rectangular", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_RECT}, 0, 0, FLAGS, "win_func" },
{ "bartlett", "Bartlett", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BARTLETT}, 0, 0, FLAGS, "win_func" },
{ "hanning", "Hanning", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HANNING}, 0, 0, FLAGS, "win_func" },
{ "hamming", "Hamming", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_HAMMING}, 0, 0, FLAGS, "win_func" },
{ "blackman", "Blackman", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BLACKMAN}, 0, 0, FLAGS, "win_func" },
{ "welch", "Welch", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_WELCH}, 0, 0, FLAGS, "win_func" },
{ "flattop", "Flat-top", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_FLATTOP}, 0, 0, FLAGS, "win_func" },
{ "bharris", "Blackman-Harris", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BHARRIS}, 0, 0, FLAGS, "win_func" },
{ "bnuttall", "Blackman-Nuttall", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BNUTTALL}, 0, 0, FLAGS, "win_func" },
{ "bhann", "Bartlett-Hann", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_BHANN}, 0, 0, FLAGS, "win_func" },
{ "sine", "Sine", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_SINE}, 0, 0, FLAGS, "win_func" },
{ "nuttall", "Nuttall", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_NUTTALL}, 0, 0, FLAGS, "win_func" },
{ "lanczos", "Lanczos", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_LANCZOS}, 0, 0, FLAGS, "win_func" },
{ "gauss", "Gauss", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_GAUSS}, 0, 0, FLAGS, "win_func" },
{ "tukey", "Tukey", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_TUKEY}, 0, 0, FLAGS, "win_func" },
{ "dolph", "Dolph-Chebyshev", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_DOLPH}, 0, 0, FLAGS, "win_func" },
{ "cauchy", "Cauchy", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_CAUCHY}, 0, 0, FLAGS, "win_func" },
{ "parzen", "Parzen", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_PARZEN}, 0, 0, FLAGS, "win_func" },
{ "poisson", "Poisson", 0, AV_OPT_TYPE_CONST, {.i64=WFUNC_POISSON}, 0, 0, FLAGS, "win_func" },
{NULL}
}
#define NULL
Definition: coverity.c:32
#define FLAGS
Definition: asrc_hilbert.c:40
sample_rate
#define OFFSET(x)
Definition: asrc_hilbert.c:39

Definition at line 42 of file asrc_hilbert.c.

const AVFilterPad hilbert_outputs[]
static
Initial value:
= {
{
.name = "default",
.request_frame = request_frame,
.config_props = config_props,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int request_frame(AVFilterLink *outlink)
Definition: asrc_hilbert.c:158
static av_cold int config_props(AVFilterLink *outlink)
Definition: asrc_hilbert.c:128

Definition at line 179 of file asrc_hilbert.c.

AVFilter ff_asrc_hilbert
Initial value:
= {
.name = "hilbert",
.description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."),
.query_formats = query_formats,
.init = init,
.uninit = uninit,
.priv_size = sizeof(HilbertContext),
.priv_class = &hilbert_class,
}
#define NULL
Definition: coverity.c:32
static av_cold void uninit(AVFilterContext *ctx)
Definition: asrc_hilbert.c:87
static av_cold int query_formats(AVFilterContext *ctx)
Definition: asrc_hilbert.c:94
static av_cold int init(AVFilterContext *ctx)
Definition: asrc_hilbert.c:75
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:186
static const AVFilterPad inputs[]
Definition: af_acontrast.c:193
static const AVFilterPad outputs[]
Definition: af_acontrast.c:203
static const AVFilterPad hilbert_outputs[]
Definition: asrc_hilbert.c:179

Definition at line 189 of file asrc_hilbert.c.