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 },
141 for (i = 0; i < s->
nb_taps; i++) {
147 s->
taps[i] *= (1.f -
cosf(pk)) / pk;
172 memcpy(frame->
data[0], s->
taps + s->
pts, nb_samples *
sizeof(
float));
175 s->
pts += nb_samples;
198 .priv_class = &hilbert_class,
AVFILTER_DEFINE_CLASS(hilbert)
This structure describes decoded (raw) audio or video data.
static av_cold void uninit(AVFilterContext *ctx)
Main libavfilter public API header.
static av_cold int query_formats(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)
static void generate_window_func(float *lut, int N, int win_func, float *overlap)
const char * name
Pad name.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
static int request_frame(AVFilterLink *outlink)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
#define AVERROR_EOF
End of file.
A filter pad used for either input or output.
A link between two filters.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
void * priv
private data for use by the filter
AVFilterContext * src
source filter
static const AVFilterPad inputs[]
static const AVFilterPad outputs[]
A list of supported channel layouts.
AVSampleFormat
Audio sample formats.
static const AVOption hilbert_options[]
Describe the class of an AVClass context structure.
const char * name
Filter name.
enum MovChannelLayoutTag * layouts
static av_cold int config_props(AVFilterLink *outlink)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
static enum AVSampleFormat sample_fmts[]
#define av_malloc_array(a, b)
static const AVFilterPad hilbert_outputs[]
#define AV_CH_LAYOUT_MONO