Go to the documentation of this file.
52 for (
i = 0;
i <
ctx->nb_inputs && nb_samples > 0;
i++) {
63 if (
s->frames[0] &&
s->frames[1]) {
68 plane_samples =
FFALIGN(
s->frames[0]->nb_samples,
s->samples_align);
70 plane_samples =
FFALIGN(
s->frames[0]->nb_samples *
s->channels,
s->samples_align);
76 out->pts =
s->frames[0]->pts;
79 for (
i = 0;
i <
s->planes;
i++) {
80 s->fdsp->vector_fmul((
float *)
out->extended_data[
i],
81 (
const float *)
s->frames[0]->extended_data[
i],
82 (
const float *)
s->frames[1]->extended_data[
i],
86 for (
i = 0;
i <
s->planes;
i++) {
87 s->fdsp->vector_dmul((
double *)
out->extended_data[
i],
88 (
const double *)
s->frames[0]->extended_data[
i],
89 (
const double *)
s->frames[1]->extended_data[
i],
103 for (
i = 0;
i < 2;
i++) {
112 for (
i = 0;
i < 2;
i++) {
128 s->channels =
inlink->ch_layout.nb_channels;
130 s->samples_align = 16;
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
@ AV_SAMPLE_FMT_FLTP
float, planar
Filter the word “frame” indicates either a video frame or a group of audio as stored in an AVFrame structure Format for each input and each output the list of supported formats For video that means pixel format For audio that means channel sample they are references to shared objects When the negotiation mechanism computes the intersection of the formats supported at each end of a all references to both lists are replaced with a reference to the intersection And when a single format is eventually chosen for a link amongst the remaining all references to the list are updated That means that if a filter requires that its input and output have the same format amongst a supported all it has to do is use a reference to the same list of formats query_formats can leave some formats unset and return AVERROR(EAGAIN) to cause the negotiation mechanism toagain later. That can be used by filters with complex requirements to use the format negotiated on one link to set the formats supported on another. Frame references ownership and permissions
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
The exact code depends on how similar the blocks are and how related they are to the and needs to apply these operations to the correct inlink or outlink if there are several Macros are available to factor that when no extra processing is inlink
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
This structure describes decoded (raw) audio or video data.
const char * name
Filter name.
A link between two filters.
#define FF_FILTER_FORWARD_STATUS_BACK_ALL(outlink, filter)
Forward the status on an output link to all input links.
A filter pad used for either input or output.
int ff_inlink_check_available_samples(AVFilterLink *link, unsigned min)
Test if enough samples are available on the link.
static int config_output(AVFilterLink *outlink)
static void ff_outlink_set_status(AVFilterLink *link, int status, int64_t pts)
Set the status field of a link from the source filter.
void ff_inlink_request_frame(AVFilterLink *link)
Mark that a frame is wanted on the link.
int av_sample_fmt_is_planar(enum AVSampleFormat sample_fmt)
Check if the sample format is planar.
static av_cold void uninit(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)
static const AVFilterPad inputs[]
#define FILTER_INPUTS(array)
Describe the class of an AVClass context structure.
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
int ff_inlink_acknowledge_status(AVFilterLink *link, int *rstatus, int64_t *rpts)
Test and acknowledge the change of status on the link.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
AVFilterContext * src
source filter
static int activate(AVFilterContext *ctx)
#define i(width, name, range_min, range_max)
const char * name
Pad name.
int ff_inlink_queued_samples(AVFilterLink *link)
enum AVSampleFormat av_get_packed_sample_fmt(enum AVSampleFormat sample_fmt)
Get the packed alternative form of the given sample format.
@ AV_SAMPLE_FMT_DBLP
double, planar
const AVFilter ff_af_amultiply
static const AVFilterPad outputs[]
#define FILTER_OUTPUTS(array)
av_cold AVFloatDSPContext * avpriv_float_dsp_alloc(int bit_exact)
Allocate a float DSP context.
the definition of that something depends on the semantic of the filter The callback must examine the status of the filter s links and proceed accordingly The status of output links is stored in the status_in and status_out fields and tested by the ff_outlink_frame_wanted() function. If this function returns true
@ AV_SAMPLE_FMT_DBL
double
#define FILTER_SAMPLEFMTS(...)