FFmpeg
Data Structures | Macros | Functions | Variables
af_earwax.c File Reference
#include "libavutil/channel_layout.h"
#include "avfilter.h"
#include "audio.h"
#include "formats.h"

Go to the source code of this file.

Data Structures

struct  EarwaxContext
 

Macros

#define NUMTAPS   32
 

Functions

static int query_formats (AVFilterContext *ctx)
 
static int16_t * scalarproduct (const int16_t *in, const int16_t *endin, const int16_t *filt, int16_t *out)
 
static int config_input (AVFilterLink *inlink)
 
static void convolve (AVFilterContext *ctx, AVFrame *in, int input_ch, int output_ch, int filter_ch, int tap_ch)
 
static void mix (AVFilterContext *ctx, AVFrame *out, int output_ch, int f0, int f1, int i0, int i1)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold void uninit (AVFilterContext *ctx)
 

Variables

static const int8_t filt [NUMTAPS *2]
 
static const AVFilterPad earwax_inputs []
 
const AVFilter ff_af_earwax
 

Detailed Description

Stereo Widening Effect. Adds audio cues to move stereo image in front of the listener. Adapted from the libsox earwax effect.

Definition in file af_earwax.c.

Macro Definition Documentation

◆ NUMTAPS

#define NUMTAPS   32

Definition at line 37 of file af_earwax.c.

Function Documentation

◆ query_formats()

static int query_formats ( AVFilterContext ctx)
static

Definition at line 81 of file af_earwax.c.

◆ scalarproduct()

static int16_t* scalarproduct ( const int16_t *  in,
const int16_t *  endin,
const int16_t *  filt,
int16_t *  out 
)
inlinestatic

Definition at line 100 of file af_earwax.c.

Referenced by convolve().

◆ config_input()

static int config_input ( AVFilterLink inlink)
static

Definition at line 118 of file af_earwax.c.

◆ convolve()

static void convolve ( AVFilterContext ctx,
AVFrame in,
int  input_ch,
int  output_ch,
int  filter_ch,
int  tap_ch 
)
static

Definition at line 130 of file af_earwax.c.

Referenced by filter_frame().

◆ mix()

static void mix ( AVFilterContext ctx,
AVFrame out,
int  output_ch,
int  f0,
int  f1,
int  i0,
int  i1 
)
static

Definition at line 159 of file af_earwax.c.

Referenced by filter_frame().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 171 of file af_earwax.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 208 of file af_earwax.c.

Variable Documentation

◆ filt

const int8_t filt[NUMTAPS *2]
static

Definition at line 39 of file af_earwax.c.

Referenced by apply_tns(), avfilter_graph_create_filter(), avfilter_insert_filter(), common_hv_2ht_2vt_4x4_msa(), common_hv_2ht_2vt_4x8_msa(), common_hv_2ht_2vt_8x4_msa(), common_hv_2ht_2vt_8x8mult_msa(), common_hv_2ht_2vt_and_aver_dst_4x4_msa(), common_hv_2ht_2vt_and_aver_dst_4x8_msa(), common_hv_2ht_2vt_and_aver_dst_8x4_msa(), common_hv_2ht_2vt_and_aver_dst_8x8mult_msa(), common_hv_8ht_8vt_4w_msa(), common_hv_8ht_8vt_8w_msa(), common_hv_8ht_8vt_and_aver_dst_4w_msa(), common_hv_8ht_8vt_and_aver_dst_8w_msa(), common_hz_2t_4x4_msa(), common_hz_2t_4x8_msa(), common_hz_2t_8x4_msa(), common_hz_2t_8x8mult_msa(), common_hz_2t_and_aver_dst_4x4_msa(), common_hz_2t_and_aver_dst_4x8_msa(), common_hz_2t_and_aver_dst_8x4_msa(), common_hz_2t_and_aver_dst_8x8mult_msa(), common_hz_4t_12w_msa(), common_hz_4t_16w_msa(), common_hz_4t_24w_msa(), common_hz_4t_32w_msa(), common_hz_4t_4x16_msa(), common_hz_4t_4x2_msa(), common_hz_4t_4x4_msa(), common_hz_4t_4x8_msa(), common_hz_4t_6w_msa(), common_hz_4t_8x2mult_msa(), common_hz_4t_8x4mult_msa(), common_hz_6t_4x4_msa(), common_hz_6t_4x8_msa(), common_hz_8t_12w_msa(), common_hz_8t_16w_msa(), common_hz_8t_24w_msa(), common_hz_8t_32w_msa(), common_hz_8t_48w_msa(), common_hz_8t_4x16_msa(), common_hz_8t_4x4_msa(), common_hz_8t_4x8_msa(), common_hz_8t_64w_msa(), common_hz_8t_8w_msa(), common_hz_8t_8x4_msa(), common_hz_8t_8x8mult_msa(), common_hz_8t_and_aver_dst_16w_msa(), common_hz_8t_and_aver_dst_32w_msa(), common_hz_8t_and_aver_dst_4x4_msa(), common_hz_8t_and_aver_dst_4x8_msa(), common_hz_8t_and_aver_dst_64w_msa(), common_hz_8t_and_aver_dst_8w_msa(), common_vt_2t_4x4_msa(), common_vt_2t_4x8_msa(), common_vt_2t_8x4_msa(), common_vt_2t_8x8mult_msa(), common_vt_2t_and_aver_dst_4x4_msa(), common_vt_2t_and_aver_dst_4x8_msa(), common_vt_2t_and_aver_dst_8x4_msa(), common_vt_2t_and_aver_dst_8x8mult_msa(), common_vt_4t_16w_msa(), common_vt_4t_24w_msa(), common_vt_4t_32w_msa(), common_vt_4t_4x2_msa(), common_vt_4t_4x4multiple_msa(), common_vt_4t_8x2_msa(), common_vt_4t_8x4mult_msa(), common_vt_4t_8x6_msa(), common_vt_8t_12w_msa(), common_vt_8t_16w_msa(), common_vt_8t_16w_mult_msa(), common_vt_8t_4w_msa(), common_vt_8t_8w_msa(), common_vt_8t_and_aver_dst_16w_mult_msa(), common_vt_8t_and_aver_dst_4w_msa(), common_vt_8t_and_aver_dst_8w_msa(), config_input(), decode_filter(), decode_tns(), ff_aac_apply_tns(), ff_aac_encode_tns_info(), ff_avg_bilin_16h_msa(), ff_avg_bilin_16hv_msa(), ff_avg_bilin_16v_msa(), ff_avg_bilin_32h_msa(), ff_avg_bilin_32v_msa(), ff_avg_bilin_64h_msa(), ff_avg_bilin_64v_msa(), ff_put_bilin_16h_msa(), ff_put_bilin_16hv_msa(), ff_put_bilin_16v_msa(), ff_put_bilin_32h_msa(), ff_put_bilin_32v_msa(), ff_put_bilin_64h_msa(), ff_put_bilin_64v_msa(), ff_put_vp8_bilinear16_h_msa(), ff_put_vp8_bilinear16_hv_msa(), ff_put_vp8_bilinear16_v_msa(), ff_put_vp8_epel16_h4_msa(), ff_put_vp8_epel16_h6_msa(), ff_put_vp8_epel16_v4_msa(), ff_put_vp8_epel16_v6_msa(), ff_put_vp8_epel4_h4v4_msa(), ff_put_vp8_epel4_h4v6_msa(), ff_put_vp8_epel4_h6v4_msa(), ff_put_vp8_epel4_h6v6_msa(), ff_put_vp8_epel4_v4_msa(), ff_put_vp8_epel4_v6_msa(), ff_put_vp8_epel8_h4_msa(), ff_put_vp8_epel8_h4v4_msa(), ff_put_vp8_epel8_h4v6_msa(), ff_put_vp8_epel8_h6_msa(), ff_put_vp8_epel8_h6v4_msa(), ff_put_vp8_epel8_h6v6_msa(), ff_put_vp8_epel8_v4_msa(), ff_put_vp8_epel8_v6_msa(), ff_vk_init_sampler(), filter16_brng(), filter16_tout(), filter16_vrep(), filter8_brng(), filter8_tout(), filter8_vrep(), graph_check_validity(), graph_config_links(), and scalarproduct().

◆ earwax_inputs

const AVFilterPad earwax_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
}

Definition at line 216 of file af_earwax.c.

◆ ff_af_earwax

const AVFilter ff_af_earwax
Initial value:
= {
.name = "earwax",
.description = NULL_IF_CONFIG_SMALL("Widen the stereo image."),
.priv_size = sizeof(EarwaxContext),
}

Definition at line 225 of file af_earwax.c.

FILTER_QUERY_FUNC
#define FILTER_QUERY_FUNC(func)
Definition: internal.h:169
earwax_inputs
static const AVFilterPad earwax_inputs[]
Definition: af_earwax.c:216
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: internal.h:192
filter_frame
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
Definition: af_earwax.c:171
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_earwax.c:208
ff_audio_default_filterpad
const AVFilterPad ff_audio_default_filterpad[1]
An AVFilterPad array whose only entry has name "default" and is of type AVMEDIA_TYPE_AUDIO.
Definition: audio.c:32
NULL_IF_CONFIG_SMALL
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition: internal.h:106
config_input
static int config_input(AVFilterLink *inlink)
Definition: af_earwax.c:118
query_formats
static int query_formats(AVFilterContext *ctx)
Definition: af_earwax.c:81
EarwaxContext
Definition: af_earwax.c:74
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: internal.h:193