FFmpeg
Loading...
Searching...
No Matches
asrc_hilbert.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "filters.h"
#include "window_func.h"

Go to the source code of this file.

Data Structures

struct  HilbertContext
 

Macros

#define OFFSET(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 (const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
 
static av_cold int config_props (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

#define OFFSET ( x)
Value:

Definition at line 42 of file asrc_hilbert.c.

◆ FLAGS

Definition at line 43 of file asrc_hilbert.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( hilbert )

◆ init()

static av_cold int init ( AVFilterContext * ctx)
static

Definition at line 59 of file asrc_hilbert.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext * ctx)
static

Definition at line 71 of file asrc_hilbert.c.

◆ query_formats()

static av_cold int query_formats ( const AVFilterContext * ctx,
AVFilterFormatsConfig ** cfg_in,
AVFilterFormatsConfig ** cfg_out )
static

Definition at line 78 of file asrc_hilbert.c.

◆ config_props()

static av_cold int config_props ( AVFilterLink * outlink)
static

Definition at line 100 of file asrc_hilbert.c.

◆ activate()

static int activate ( AVFilterContext * ctx)
static

Definition at line 130 of file asrc_hilbert.c.

Variable Documentation

◆ hilbert_options

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_OPTION("win_func", OFFSET(win_func), FLAGS, WFUNC_BLACKMAN),
{NULL}
}
@ WFUNC_BLACKMAN
#define FLAGS
Definition cmdutils.c:598
#define NULL
Definition coverity.c:32
#define OFFSET(x)
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define WIN_FUNC_OPTION(win_func_opt_name, win_func_offset, flag, default_window_func)
Definition window_func.h:37

Definition at line 45 of file asrc_hilbert.c.

◆ hilbert_outputs

const AVFilterPad hilbert_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_props,
},
}
@ AVMEDIA_TYPE_AUDIO
Definition avutil.h:201
static int config_props(AVBitStreamFilterLink *link)
Definition source.c:181

Definition at line 156 of file asrc_hilbert.c.

◆ ff_asrc_hilbert

const FFFilter ff_asrc_hilbert
Initial value:
= {
.p.name = "hilbert",
.p.description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."),
.p.priv_class = &hilbert_class,
.init = init,
.uninit = uninit,
.activate = activate,
.priv_size = sizeof(HilbertContext),
}
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
Definition aeval.c:246
static const AVFilterPad hilbert_outputs[]
int(* init)(AVBSFContext *ctx)
Definition dts2pts.c:608
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
#define FILTER_OUTPUTS(array)
Definition filters.h:265
#define FILTER_QUERY_FUNC2(func)
Definition filters.h:241
#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 164 of file asrc_hilbert.c.