39 #define OFFSET(x) offsetof(HilbertContext, x)
40 #define FLAGS AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
47 {
"nb_samples",
"set the number of samples per requested frame",
OFFSET(nb_samples),
AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX,
FLAGS },
48 {
"n",
"set the number of samples per requested frame",
OFFSET(nb_samples),
AV_OPT_TYPE_INT, {.i64 = 1024}, 1, INT_MAX,
FLAGS },
80 if (!(
s->nb_taps & 1)) {
142 for (
i = 0;
i <
s->nb_taps;
i++) {
143 int k = -(
s->nb_taps / 2) +
i;
148 s->taps[
i] *= (1.f -
cosf(pk)) / pk;
166 nb_samples =
FFMIN(
s->nb_samples,
s->nb_taps -
s->pts);
173 memcpy(
frame->
data[0],
s->taps +
s->pts, nb_samples *
sizeof(
float));
176 s->pts += nb_samples;
199 .priv_class = &hilbert_class,
static enum AVSampleFormat sample_fmts[]
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
static const AVOption hilbert_options[]
static const AVFilterPad hilbert_outputs[]
static av_cold int query_formats(AVFilterContext *ctx)
AVFILTER_DEFINE_CLASS(hilbert)
static int request_frame(AVFilterLink *outlink)
static av_cold int init(AVFilterContext *ctx)
static av_cold void uninit(AVFilterContext *ctx)
static av_cold int config_props(AVFilterLink *outlink)
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
Main libavfilter public API header.
#define AV_CH_LAYOUT_MONO
#define AVERROR_EOF
End of file.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVSampleFormat
Audio sample formats.
common internal API header
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
enum MovChannelLayoutTag * layouts
Describe the class of an AVClass context structure.
A list of supported channel layouts.
A link between two filters.
AVFilterContext * src
source filter
A filter pad used for either input or output.
const char * name
Pad name.
const char * name
Filter name.
This structure describes decoded (raw) audio or video data.
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
#define av_malloc_array(a, b)
static void generate_window_func(float *lut, int N, int win_func, float *overlap)