Go to the documentation of this file.
100 static inline int16_t *
scalarproduct(
const int16_t *in,
const int16_t *endin,
101 const int16_t *
filt, int16_t *
out)
124 s->filter[1][
i] =
filt[
i * 2 + 1];
131 int input_ch,
int output_ch,
132 int filter_ch,
int tap_ch)
135 int16_t *taps, *endin, *dst, *
src;
138 taps =
s->taps[tap_ch];
139 dst = (int16_t *)
s->frame[input_ch]->data[output_ch];
140 src = (int16_t *)in->
data[input_ch];
153 memcpy(taps, endin,
NUMTAPS *
sizeof(*taps));
160 int output_ch,
int f0,
int f1,
int i0,
int i1)
163 const int16_t *srcl = (
const int16_t *)
s->frame[f0]->data[i0];
164 const int16_t *srcr = (
const int16_t *)
s->frame[f1]->data[i1];
165 int16_t *dst = (int16_t *)
out->data[output_ch];
167 for (
int n = 0; n <
out->nb_samples; n++)
178 for (
int ch = 0; ch < 2; ch++) {
179 if (!
s->frame[ch] ||
s->frame[ch]->nb_samples < in->
nb_samples) {
AVFrame * ff_get_audio_buffer(AVFilterLink *link, int nb_samples)
Request an audio samples buffer with a specific set of permissions.
A list of supported channel layouts.
const AVFilter ff_af_earwax
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
#define AV_CHANNEL_LAYOUT_STEREO
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.
#define FILTER_QUERY_FUNC(func)
const char * name
Filter name.
int16_t taps[4][NUMTAPS *2]
A link between two filters.
static const AVFilterPad earwax_inputs[]
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
A filter pad used for either input or output.
static int16_t * scalarproduct(const int16_t *in, const int16_t *endin, const int16_t *filt, int16_t *out)
#define FILTER_INPUTS(array)
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static av_cold void uninit(AVFilterContext *ctx)
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
An AVChannelLayout holds information about the channel layout of audio data.
static int config_input(AVFilterLink *inlink)
@ AV_SAMPLE_FMT_S16P
signed 16 bits, 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 layout
int nb_samples
number of audio samples (per channel) described by this frame
#define i(width, name, range_min, range_max)
static int query_formats(AVFilterContext *ctx)
static const int8_t filt[NUMTAPS *2]
const char * name
Pad name.
static void mix(AVFilterContext *ctx, AVFrame *out, int output_ch, int f0, int f1, int i0, int i1)
#define FILTER_OUTPUTS(array)
static void convolve(AVFilterContext *ctx, AVFrame *in, int input_ch, int output_ch, int filter_ch, int tap_ch)
int16_t filter[2][NUMTAPS]