114static inline int16_t *
scalarproduct(
const int16_t *in,
const int16_t *endin,
115 const int16_t *
filt, int16_t *
out)
138 s->filter[1][
i] =
filt[
i * 2 + 1];
145 int input_ch,
int output_ch,
146 int filter_ch,
int tap_ch)
149 int16_t *taps, *endin, *
dst, *
src;
152 taps =
s->taps[tap_ch];
153 dst = (int16_t *)
s->frame[input_ch]->data[output_ch];
154 src = (int16_t *)in->
data[input_ch];
167 memcpy(taps, endin,
NUMTAPS *
sizeof(*taps));
174 int output_ch,
int f0,
int f1,
int i0,
int i1)
177 const int16_t *srcl = (
const int16_t *)
s->frame[f0]->data[i0];
178 const int16_t *srcr = (
const int16_t *)
s->frame[f1]->data[i1];
179 int16_t *
dst = (int16_t *)
out->data[output_ch];
181 for (
int n = 0; n <
out->nb_samples; n++)
192 for (
int ch = 0; ch < 2; ch++) {
193 if (!
s->frame[ch] ||
s->frame[ch]->nb_samples < in->
nb_samples) {
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static int config_input(AVFilterLink *inlink)
static const int8_t filt[NUMTAPS *2]
const FFFilter ff_af_earwax
static int16_t * scalarproduct(const int16_t *in, const int16_t *endin, const int16_t *filt, int16_t *out)
static const AVFilterPad earwax_inputs[]
static void convolve(AVFilterContext *ctx, AVFrame *in, int input_ch, int output_ch, int filter_ch, int tap_ch)
static int config_input(AVFilterLink *inlink)
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int query_formats(const AVFilterContext *ctx, AVFilterFormatsConfig **cfg_in, AVFilterFormatsConfig **cfg_out)
static av_cold void uninit(AVFilterContext *ctx)
static void mix(AVFilterContext *ctx, AVFrame *out, int output_ch, int f0, int f1, int i0, int i1)
static AVFormatContext * ctx
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
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 i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
static const int sample_rates[]
static int filter_frame(DBEDecodeContext *s, AVFrame *frame)
#define AV_CHANNEL_LAYOUT_STEREO
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
int av_frame_copy_props(AVFrame *dst, const AVFrame *src)
Copy only "metadata" fields from src to dst.
AVSampleFormat
Audio sample formats.
@ AV_SAMPLE_FMT_S16P
signed 16 bits, planar
static av_cold void uninit(AVBitStreamFilterContext *ctx)
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FILTER_QUERY_FUNC2(func)
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
enum MovChannelLayoutTag * layouts
An AVChannelLayout holds information about the channel layout of audio data.
void * priv
private data for use by the filter
A link between two filters.
AVFilterContext * dst
dest filter
A filter pad used for either input or output.
This structure describes decoded (raw) audio or video data.
int nb_samples
number of audio samples (per channel) described by this frame
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
int16_t filter[2][NUMTAPS]
int16_t taps[4][NUMTAPS *2]