FFmpeg
Data Structures | Macros | Functions | Variables
asrc_hilbert.c File Reference
#include "libavutil/channel_layout.h"
#include "libavutil/opt.h"
#include "audio.h"
#include "avfilter.h"
#include "formats.h"
#include "internal.h"
#include "filters.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 activate (AVFilterContext *ctx)
 

Variables

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

Macro Definition Documentation

◆ OFFSET

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

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 ( AVFilterContext ctx)
static

Definition at line 78 of file asrc_hilbert.c.

◆ config_props()

static av_cold int config_props ( AVFilterLink outlink)
static

Definition at line 98 of file asrc_hilbert.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 128 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}
}

Definition at line 45 of file asrc_hilbert.c.

◆ hilbert_outputs

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

Definition at line 154 of file asrc_hilbert.c.

◆ ff_asrc_hilbert

const AVFilter ff_asrc_hilbert
Initial value:
= {
.name = "hilbert",
.description = NULL_IF_CONFIG_SMALL("Generate a Hilbert transform FIR coefficients."),
.init = init,
.uninit = uninit,
.activate = activate,
.priv_size = sizeof(HilbertContext),
.priv_class = &hilbert_class,
}

Definition at line 162 of file asrc_hilbert.c.

hilbert_outputs
static const AVFilterPad hilbert_outputs[]
Definition: asrc_hilbert.c:154
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: asrc_hilbert.c:71
OFFSET
#define OFFSET(x)
Definition: asrc_hilbert.c:42
FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:169
WIN_FUNC_OPTION
#define WIN_FUNC_OPTION(win_func_opt_name, win_func_offset, flag, default_window_func)
Definition: window_func.h:37
sample_rate
sample_rate
Definition: ffmpeg_filter.c:368
init
static av_cold int init(AVFilterContext *ctx)
Definition: asrc_hilbert.c:59
WFUNC_BLACKMAN
@ WFUNC_BLACKMAN
Definition: af_firequalizer.c:38
query_formats
static av_cold int query_formats(AVFilterContext *ctx)
Definition: asrc_hilbert.c:78
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
NULL
#define NULL
Definition: coverity.c:32
inputs
these buffered frames must be flushed immediately if a new input produces new the filter must not call request_frame to get more It must just process the frame or queue it The task of requesting more frames is left to the filter s request_frame method or the application If a filter has several inputs
Definition: filter_design.txt:243
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
FLAGS
#define FLAGS
Definition: asrc_hilbert.c:43
activate
static int activate(AVFilterContext *ctx)
Definition: asrc_hilbert.c:128
HilbertContext
Definition: asrc_hilbert.c:30
config_props
static av_cold int config_props(AVFilterLink *outlink)
Definition: asrc_hilbert.c:98
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Definition: opt.h:225
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193