FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
af_superequalizer.c File Reference
#include "libavutil/opt.h"
#include "libavcodec/avfft.h"
#include "audio.h"
#include "avfilter.h"
#include "internal.h"

Go to the source code of this file.

Data Structures

struct  EqParameter
 
struct  SuperEqualizerContext
 

Macros

#define NBANDS   17
 
#define M   15
 
#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define OFFSET(x)   offsetof(SuperEqualizerContext, x)
 

Functions

static float izero (SuperEqualizerContext *s, float x)
 
static float hn_lpf (int n, float f, float fs)
 
static float hn_imp (int n)
 
static float hn (int n, EqParameter *param, float fs)
 
static float alpha (float a)
 
static float win (SuperEqualizerContext *s, float n, int N)
 
static void process_param (float *bc, EqParameter *param, float fs)
 
static int equ_init (SuperEqualizerContext *s, int wb)
 
static void make_fir (SuperEqualizerContext *s, float *lbc, float *rbc, EqParameter *param, float fs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static av_cold int init (AVFilterContext *ctx)
 
static int query_formats (AVFilterContext *ctx)
 
static int config_input (AVFilterLink *inlink)
 
static int config_output (AVFilterLink *outlink)
 
static av_cold void uninit (AVFilterContext *ctx)
 
 AVFILTER_DEFINE_CLASS (superequalizer)
 

Variables

static const float bands []
 
static const AVFilterPad superequalizer_inputs []
 
static const AVFilterPad superequalizer_outputs []
 
static const AVOption superequalizer_options []
 
AVFilter ff_af_superequalizer
 

Macro Definition Documentation

#define NBANDS   17

Definition at line 30 of file af_superequalizer.c.

Referenced by hn(), and process_param().

#define M   15

Definition at line 31 of file af_superequalizer.c.

Referenced by equ_init(), and izero().

Definition at line 332 of file af_superequalizer.c.

#define OFFSET (   x)    offsetof(SuperEqualizerContext, x)

Definition at line 333 of file af_superequalizer.c.

Function Documentation

static float izero ( SuperEqualizerContext s,
float  x 
)
static

Definition at line 60 of file af_superequalizer.c.

Referenced by equ_init(), and win().

static float hn_lpf ( int  n,
float  f,
float  fs 
)
static

Definition at line 75 of file af_superequalizer.c.

Referenced by hn().

static float hn_imp ( int  n)
static

Definition at line 85 of file af_superequalizer.c.

Referenced by hn().

static float hn ( int  n,
EqParameter param,
float  fs 
)
static

Definition at line 90 of file af_superequalizer.c.

Referenced by make_fir().

static float alpha ( float  a)
static

Definition at line 109 of file af_superequalizer.c.

Referenced by adaptive_gain_control(), alpha_composite(), av_parse_color(), avc_h_loop_filter_chroma422_mbaff_msa(), avc_h_loop_filter_chroma422_msa(), avc_h_loop_filter_luma_mbaff_intra_msa(), avc_h_loop_filter_luma_mbaff_msa(), avc_loopfilter_cb_or_cr_inter_edge_hor_msa(), avc_loopfilter_cb_or_cr_inter_edge_ver_msa(), avc_loopfilter_cb_or_cr_intra_edge_hor_msa(), avc_loopfilter_cb_or_cr_intra_edge_ver_msa(), avc_loopfilter_luma_inter_edge_hor_msa(), avc_loopfilter_luma_inter_edge_ver_msa(), avc_loopfilter_luma_intra_edge_ver_msa(), bidirectional_obmc(), blend_image_packed_rgb(), blend_line(), blend_line16(), blend_pixel(), blend_plane(), bmp_decode_frame(), celt_decode_coarse_energy(), config_input(), config_output(), deblock_v8_luma_intra_8_mmi(), decode_dvd_subtitles(), do_lumakey_slice16(), do_lumakey_slice8(), dvbsub_parse_clut_segment(), dxt3_block_internal(), dxt5_block_internal(), encode_frame(), encode_headers(), equ_init(), exp_quant_coarse(), ff_adaptive_gain_control(), ff_ass_split_override_codes(), ff_blend_mask(), ff_blend_rectangle(), ff_cavs_filter(), ff_deblock_h_chroma_8_mmi(), ff_deblock_h_chroma_intra_8_mmi(), ff_deblock_v8_luma_8_mmi(), ff_mdct15_init(), ff_mdct_init(), ff_sws_alphablendaway(), fft_ref_init(), filter(), filter_frame(), filter_mb_edgech(), filter_mb_edgecv(), filter_mb_edgeh(), filter_mb_edgev(), filter_mb_mbaff_edgecv(), filter_mb_mbaff_edgev(), g2m_paint_cursor(), guess_palette(), interpolate(), loop_filter_c2(), loop_filter_l2(), mpeg4_decode_sprite_trajectory(), parse_palette_segment(), predict(), process_frame(), ps_tableinit(), Rgb16ToPlanarRgb16Wrapper(), rv40_adaptive_loop_filter(), rv40_loop_filter(), sbr_dequant(), sbr_hf_gen_c(), set_frame_data(), set_highshelf_rbj(), set_lp_rbj(), sub_left_prediction_bgr32(), tdsc_paint_cursor(), update_alpha(), vp7_fade_frame(), and win().

static float win ( SuperEqualizerContext s,
float  n,
int  N 
)
static
static void process_param ( float *  bc,
EqParameter param,
float  fs 
)
static

Definition at line 123 of file af_superequalizer.c.

Referenced by make_fir().

static int equ_init ( SuperEqualizerContext s,
int  wb 
)
static

Definition at line 134 of file af_superequalizer.c.

Referenced by init().

static void make_fir ( SuperEqualizerContext s,
float *  lbc,
float *  rbc,
EqParameter param,
float  fs 
)
static

Definition at line 162 of file af_superequalizer.c.

Referenced by config_output().

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 184 of file af_superequalizer.c.

static av_cold int init ( AVFilterContext ctx)
static

Definition at line 243 of file af_superequalizer.c.

static int query_formats ( AVFilterContext ctx)
static

Definition at line 250 of file af_superequalizer.c.

static int config_input ( AVFilterLink inlink)
static

Definition at line 275 of file af_superequalizer.c.

static int config_output ( AVFilterLink outlink)
static

Definition at line 291 of file af_superequalizer.c.

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 301 of file af_superequalizer.c.

AVFILTER_DEFINE_CLASS ( superequalizer  )

Variable Documentation

const float bands[]
static
Initial value:
= {
65.406392, 92.498606, 130.81278, 184.99721, 261.62557, 369.99442, 523.25113, 739.9884, 1046.5023,
1479.9768, 2093.0045, 2959.9536, 4186.0091, 5919.9072, 8372.0181, 11839.814, 16744.036
}

Definition at line 55 of file af_superequalizer.c.

Referenced by decode_component(), ff_ivi_init_planes(), ff_ivi_init_tiles(), ff_mpc_dequantize_and_synth(), ivi_free_buffers(), make_filters_from_proto(), mpc7_decode_frame(), mpc8_decode_frame(), process_param(), set_best_abits_code(), and set_special_band_scalefactors().

const AVFilterPad superequalizer_inputs[]
static
Initial value:
= {
{
.name = "default",
.filter_frame = filter_frame,
.config_props = config_input,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int filter_frame(AVFilterLink *inlink, AVFrame *in)
static int config_input(AVFilterLink *inlink)

Definition at line 313 of file af_superequalizer.c.

const AVFilterPad superequalizer_outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
{ NULL }
}
#define NULL
Definition: coverity.c:32
static int config_output(AVFilterLink *outlink)

Definition at line 323 of file af_superequalizer.c.

const AVOption superequalizer_options[]
static
Initial value:
= {
{ "1b", "set 65Hz band gain", OFFSET(gains [0]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "2b", "set 92Hz band gain", OFFSET(gains [1]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "3b", "set 131Hz band gain", OFFSET(gains [2]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "4b", "set 185Hz band gain", OFFSET(gains [3]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "5b", "set 262Hz band gain", OFFSET(gains [4]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "6b", "set 370Hz band gain", OFFSET(gains [5]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "7b", "set 523Hz band gain", OFFSET(gains [6]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "8b", "set 740Hz band gain", OFFSET(gains [7]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "9b", "set 1047Hz band gain", OFFSET(gains [8]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "10b", "set 1480Hz band gain", OFFSET(gains [9]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "11b", "set 2093Hz band gain", OFFSET(gains[10]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "12b", "set 2960Hz band gain", OFFSET(gains[11]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "13b", "set 4186Hz band gain", OFFSET(gains[12]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "14b", "set 5920Hz band gain", OFFSET(gains[13]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "15b", "set 8372Hz band gain", OFFSET(gains[14]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "16b", "set 11840Hz band gain", OFFSET(gains[15]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "17b", "set 16744Hz band gain", OFFSET(gains[16]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ "18b", "set 20000Hz band gain", OFFSET(gains[17]), AV_OPT_TYPE_FLOAT, {.dbl=1}, 0, 20, AF },
{ NULL }
}
#define NULL
Definition: coverity.c:32
#define OFFSET(x)
#define AF

Definition at line 335 of file af_superequalizer.c.

AVFilter ff_af_superequalizer
Initial value:
= {
.name = "superequalizer",
.description = NULL_IF_CONFIG_SMALL("Apply 18 band equalization filter."),
.priv_size = sizeof(SuperEqualizerContext),
.priv_class = &superequalizer_class,
.init = init,
}
static int query_formats(AVFilterContext *ctx)
static const AVFilterPad superequalizer_outputs[]
static const AVFilterPad superequalizer_inputs[]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification. ...
Definition: internal.h:179
static const AVFilterPad outputs[]
Definition: af_afftfilt.c:389
static const AVFilterPad inputs[]
Definition: af_afftfilt.c:379
static av_cold void uninit(AVFilterContext *ctx)
static av_cold int init(AVFilterContext *ctx)

Definition at line 359 of file af_superequalizer.c.