FFmpeg
Data Structures | Macros | Enumerations | Functions | Variables
af_afwtdn.c File Reference
#include <float.h>
#include "libavutil/avassert.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"
#include "avfilter.h"
#include "audio.h"
#include "filters.h"

Go to the source code of this file.

Data Structures

struct  ChannelParams
 sample data coding information More...
 
struct  AudioFWTDNContext
 
struct  ThreadData
 Used for passing data between threads. More...
 

Macros

#define MAX_LEVELS   13
 
#define OFFSET(x)   offsetof(AudioFWTDNContext, x)
 
#define AF   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
 
#define AFR   AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
 
#define pow2(x)   (1U << (x))
 
#define mod_pow2(x, power_of_two)   ((x) & ((power_of_two) - 1))
 

Enumerations

enum  WaveletTypes {
  SYM2, SYM4, RBIOR68, DEB10,
  SYM10, COIF5, BL3, NB_WAVELET_TYPES
}
 

Functions

 AVFILTER_DEFINE_CLASS (afwtdn)
 
static void conv_down (double *in, int in_length, double *low, double *high, int out_length, const double *lp, const double *hp, int wavelet_length, int skip, double *buffer, int buffer_length)
 
static int left_ext (int wavelet_length, int levels, uint64_t sn)
 
static int nb_coefs (int length, int level, uint64_t sn)
 
static int reallocate_inputs (double **out, int *out_length, int in_length, int levels, int ch, uint64_t sn)
 
static int max_left_zeros_inverse (int levels, int level, int wavelet_length)
 
static int reallocate_outputs (AudioFWTDNContext *s, double **out, int *out_length, int in_length, int levels, int ch, uint64_t sn)
 
static int discard_left_ext (int wavelet_length, int levels, int level, uint64_t sn)
 
static int forward (AudioFWTDNContext *s, const double *in, int in_length, double **out, int *out_length, int ch, uint64_t sn)
 
static void conv_up (double *low, double *high, int in_length, double *out, int out_length, const double *lp, const double *hp, int filter_length, double *buffer, double *buffer2, int buffer_length)
 
static int append_left_ext (int wavelet_length, int levels, int level, uint64_t sn)
 
static int inverse (AudioFWTDNContext *s, double **in, int *in_length, double *out, int out_length, int ch, uint64_t sn)
 
static int next_pow2 (int in)
 
static void denoise_level (double *out, const double *in, const double *filter, double percent, int length)
 
static double sqr (double in)
 
static double measure_mean (const double *in, int length)
 
static double measure_absmean (const double *in, int length)
 
static double measure_stddev (const double *in, int length, double mean)
 
static void noise_filter (const double stddev, const double *in, double *out, double absmean, double softness, double new_stddev, int length)
 
static int filter_channel (AVFilterContext *ctx, void *arg, int ch, int nb_jobs)
 
static int filter_frame (AVFilterLink *inlink, AVFrame *in)
 
static int max_left_ext (int wavelet_length, int levels)
 
static int min_left_ext (int wavelet_length, int levels)
 
static int config_output (AVFilterLink *outlink)
 
static int activate (AVFilterContext *ctx)
 
static av_cold void uninit (AVFilterContext *ctx)
 
static int process_command (AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
 

Variables

static const double bl3_lp [42]
 
static const double bl3_hp [42]
 
static const double bl3_ilp [42]
 
static const double bl3_ihp [42]
 
static const double sym10_lp [20]
 
static const double sym10_hp [20]
 
static const double sym10_ilp [20]
 
static const double sym10_ihp [20]
 
static const double rbior68_lp [18]
 
static const double rbior68_hp [18]
 
static const double rbior68_ilp [18]
 
static const double rbior68_ihp [18]
 
static const double coif5_lp [30]
 
static const double coif5_hp [30]
 
static const double coif5_ilp [30]
 
static const double coif5_ihp [30]
 
static const double deb10_lp [20]
 
static const double deb10_hp [20]
 
static const double deb10_ilp [20]
 
static const double deb10_ihp [20]
 
static const double sym4_lp [8]
 
static const double sym4_hp [8]
 
static const double sym4_ilp [8]
 
static const double sym4_ihp [8]
 
static const double sym2_lp [4]
 
static const double sym2_hp [4]
 
static const double sym2_ilp [4]
 
static const double sym2_ihp [4]
 
static const AVOption afwtdn_options []
 
static const AVFilterPad outputs []
 
const AVFilter ff_af_afwtdn
 

Macro Definition Documentation

◆ MAX_LEVELS

#define MAX_LEVELS   13

Definition at line 377 of file af_afwtdn.c.

◆ OFFSET

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

Definition at line 439 of file af_afwtdn.c.

◆ AF

Definition at line 440 of file af_afwtdn.c.

◆ AFR

Definition at line 441 of file af_afwtdn.c.

◆ pow2

#define pow2 (   x)    (1U << (x))

Definition at line 464 of file af_afwtdn.c.

◆ mod_pow2

#define mod_pow2 (   x,
  power_of_two 
)    ((x) & ((power_of_two) - 1))

Definition at line 465 of file af_afwtdn.c.

Enumeration Type Documentation

◆ WaveletTypes

Enumerator
SYM2 
SYM4 
RBIOR68 
DEB10 
SYM10 
COIF5 
BL3 
NB_WAVELET_TYPES 

Definition at line 30 of file af_afwtdn.c.

Function Documentation

◆ AVFILTER_DEFINE_CLASS()

AVFILTER_DEFINE_CLASS ( afwtdn  )

◆ conv_down()

static void conv_down ( double in,
int  in_length,
double low,
double high,
int  out_length,
const double lp,
const double hp,
int  wavelet_length,
int  skip,
double buffer,
int  buffer_length 
)
static

Definition at line 467 of file af_afwtdn.c.

Referenced by forward().

◆ left_ext()

static int left_ext ( int  wavelet_length,
int  levels,
uint64_t  sn 
)
static

Definition at line 508 of file af_afwtdn.c.

Referenced by forward(), inverse(), invert_step(), and symmetric_extension().

◆ nb_coefs()

static int nb_coefs ( int  length,
int  level,
uint64_t  sn 
)
static

◆ reallocate_inputs()

static int reallocate_inputs ( double **  out,
int *  out_length,
int  in_length,
int  levels,
int  ch,
uint64_t  sn 
)
static

Definition at line 522 of file af_afwtdn.c.

Referenced by forward().

◆ max_left_zeros_inverse()

static int max_left_zeros_inverse ( int  levels,
int  level,
int  wavelet_length 
)
static

Definition at line 562 of file af_afwtdn.c.

Referenced by reallocate_outputs().

◆ reallocate_outputs()

static int reallocate_outputs ( AudioFWTDNContext s,
double **  out,
int *  out_length,
int  in_length,
int  levels,
int  ch,
uint64_t  sn 
)
static

Definition at line 567 of file af_afwtdn.c.

Referenced by forward().

◆ discard_left_ext()

static int discard_left_ext ( int  wavelet_length,
int  levels,
int  level,
uint64_t  sn 
)
static

Definition at line 613 of file af_afwtdn.c.

Referenced by forward().

◆ forward()

static int forward ( AudioFWTDNContext s,
const double in,
int  in_length,
double **  out,
int *  out_length,
int  ch,
uint64_t  sn 
)
static

Definition at line 620 of file af_afwtdn.c.

Referenced by decode_bmv_frame(), and filter_channel().

◆ conv_up()

static void conv_up ( double low,
double high,
int  in_length,
double out,
int  out_length,
const double lp,
const double hp,
int  filter_length,
double buffer,
double buffer2,
int  buffer_length 
)
static

Definition at line 717 of file af_afwtdn.c.

Referenced by inverse().

◆ append_left_ext()

static int append_left_ext ( int  wavelet_length,
int  levels,
int  level,
uint64_t  sn 
)
static

Definition at line 753 of file af_afwtdn.c.

Referenced by inverse().

◆ inverse()

static int inverse ( AudioFWTDNContext s,
double **  in,
int *  in_length,
double out,
int  out_length,
int  ch,
uint64_t  sn 
)
static

Definition at line 762 of file af_afwtdn.c.

Referenced by filter_channel().

◆ next_pow2()

static int next_pow2 ( int  in)
static

Definition at line 856 of file af_afwtdn.c.

Referenced by config_output().

◆ denoise_level()

static void denoise_level ( double out,
const double in,
const double filter,
double  percent,
int  length 
)
static

Definition at line 861 of file af_afwtdn.c.

Referenced by filter_channel().

◆ sqr()

static double sqr ( double  in)
static

◆ measure_mean()

static double measure_mean ( const double in,
int  length 
)
static

Definition at line 877 of file af_afwtdn.c.

Referenced by filter_channel().

◆ measure_absmean()

static double measure_absmean ( const double in,
int  length 
)
static

Definition at line 887 of file af_afwtdn.c.

Referenced by filter_channel().

◆ measure_stddev()

static double measure_stddev ( const double in,
int  length,
double  mean 
)
static

Definition at line 897 of file af_afwtdn.c.

Referenced by filter_channel().

◆ noise_filter()

static void noise_filter ( const double  stddev,
const double in,
double out,
double  absmean,
double  softness,
double  new_stddev,
int  length 
)
static

Definition at line 908 of file af_afwtdn.c.

Referenced by filter_channel().

◆ filter_channel()

static int filter_channel ( AVFilterContext ctx,
void *  arg,
int  ch,
int  nb_jobs 
)
static

Definition at line 926 of file af_afwtdn.c.

Referenced by config_output().

◆ filter_frame()

static int filter_frame ( AVFilterLink inlink,
AVFrame in 
)
static

Definition at line 1005 of file af_afwtdn.c.

Referenced by activate().

◆ max_left_ext()

static int max_left_ext ( int  wavelet_length,
int  levels 
)
static

Definition at line 1085 of file af_afwtdn.c.

Referenced by config_output().

◆ min_left_ext()

static int min_left_ext ( int  wavelet_length,
int  levels 
)
static

Definition at line 1090 of file af_afwtdn.c.

Referenced by config_output().

◆ config_output()

static int config_output ( AVFilterLink outlink)
static

Definition at line 1095 of file af_afwtdn.c.

◆ activate()

static int activate ( AVFilterContext ctx)
static

Definition at line 1202 of file af_afwtdn.c.

◆ uninit()

static av_cold void uninit ( AVFilterContext ctx)
static

Definition at line 1238 of file af_afwtdn.c.

◆ process_command()

static int process_command ( AVFilterContext ctx,
const char *  cmd,
const char *  args,
char *  res,
int  res_len,
int  flags 
)
static

Definition at line 1280 of file af_afwtdn.c.

Variable Documentation

◆ bl3_lp

const double bl3_lp[42]
static
Initial value:
= {
0.000146098, -0.000232304, -0.000285414, 0.000462093, 0.000559952,
-0.000927187, -0.001103748, 0.00188212, 0.002186714, -0.003882426,
-0.00435384, 0.008201477, 0.008685294, -0.017982291, -0.017176331,
0.042068328, 0.032080869, -0.110036987, -0.050201753, 0.433923147,
0.766130398, 0.433923147, -0.050201753, -0.110036987, 0.032080869,
0.042068328, -0.017176331, -0.017982291, 0.008685294, 0.008201477,
-0.00435384, -0.003882426, 0.002186714, 0.00188212, -0.001103748,
-0.000927187, 0.000559952, 0.000462093, -0.000285414, -0.000232304,
0.000146098, 0.0,
}

Definition at line 45 of file af_afwtdn.c.

Referenced by config_output().

◆ bl3_hp

const double bl3_hp[42]
static
Initial value:
= {
0.0, 0.000146098, 0.000232304, -0.000285414, -0.000462093, 0.000559952,
0.000927187, -0.001103748, -0.00188212, 0.002186714, 0.003882426,
-0.00435384, -0.008201477, 0.008685294, 0.017982291, -0.017176331,
-0.042068328, 0.032080869, 0.110036987, -0.050201753, -0.433923147,
0.766130398, -0.433923147, -0.050201753, 0.110036987, 0.032080869,
-0.042068328, -0.017176331, 0.017982291, 0.008685294, -0.008201477,
-0.00435384, 0.003882426, 0.002186714, -0.00188212, -0.001103748,
0.000927187, 0.000559952, -0.000462093, -0.000285414, 0.000232304,
0.000146098,
}

Definition at line 57 of file af_afwtdn.c.

Referenced by config_output().

◆ bl3_ilp

const double bl3_ilp[42]
static
Initial value:
= {
0.0, 0.000146098, -0.000232304, -0.000285414, 0.000462093, 0.000559952,
-0.000927187, -0.001103748, 0.00188212, 0.002186714, -0.003882426,
-0.00435384, 0.008201477, 0.008685294, -0.017982291, -0.017176331,
0.042068328, 0.032080869, -0.110036987, -0.050201753, 0.433923147,
0.766130398, 0.433923147, -0.050201753, -0.110036987, 0.032080869,
0.042068328, -0.017176331, -0.017982291, 0.008685294, 0.008201477,
-0.00435384, -0.003882426, 0.002186714, 0.00188212, -0.001103748,
-0.000927187, 0.000559952, 0.000462093, -0.000285414, -0.000232304,
0.000146098,
}

Definition at line 69 of file af_afwtdn.c.

Referenced by config_output().

◆ bl3_ihp

const double bl3_ihp[42]
static
Initial value:
= {
0.000146098, 0.000232304, -0.000285414, -0.000462093, 0.000559952,
0.000927187, -0.001103748, -0.00188212, 0.002186714, 0.003882426,
-0.00435384, -0.008201477, 0.008685294, 0.017982291, -0.017176331,
-0.042068328, 0.032080869, 0.110036987, -0.050201753, -0.433923147,
0.766130398, -0.433923147, -0.050201753, 0.110036987, 0.032080869,
-0.042068328, -0.017176331, 0.017982291, 0.008685294, -0.008201477,
-0.00435384, 0.003882426, 0.002186714, -0.00188212, -0.001103748,
0.000927187, 0.000559952, -0.000462093, -0.000285414, 0.000232304,
0.000146098,
}

Definition at line 81 of file af_afwtdn.c.

Referenced by config_output().

◆ sym10_lp

const double sym10_lp[20]
static
Initial value:
= {
0.0007701598091144901, 9.563267072289475e-05,
-0.008641299277022422, -0.0014653825813050513,
0.0459272392310922, 0.011609893903711381,
-0.15949427888491757, -0.07088053578324385,
0.47169066693843925, 0.7695100370211071,
0.38382676106708546, -0.03553674047381755,
-0.0319900568824278, 0.04999497207737669,
0.005764912033581909, -0.02035493981231129,
-0.0008043589320165449, 0.004593173585311828,
5.7036083618494284e-05, -0.0004593294210046588,
}

Definition at line 93 of file af_afwtdn.c.

Referenced by config_output().

◆ sym10_hp

const double sym10_hp[20]
static
Initial value:
= {
0.0004593294210046588, 5.7036083618494284e-05,
-0.004593173585311828, -0.0008043589320165449,
0.02035493981231129, 0.005764912033581909,
-0.04999497207737669, -0.0319900568824278,
0.03553674047381755, 0.38382676106708546,
-0.7695100370211071, 0.47169066693843925,
0.07088053578324385, -0.15949427888491757,
-0.011609893903711381, 0.0459272392310922,
0.0014653825813050513, -0.008641299277022422,
-9.563267072289475e-05, 0.0007701598091144901,
}

Definition at line 106 of file af_afwtdn.c.

Referenced by config_output().

◆ sym10_ilp

const double sym10_ilp[20]
static
Initial value:
= {
-0.0004593294210046588, 5.7036083618494284e-05,
0.004593173585311828, -0.0008043589320165449,
-0.02035493981231129, 0.005764912033581909,
0.04999497207737669, -0.0319900568824278,
-0.03553674047381755, 0.38382676106708546,
0.7695100370211071, 0.47169066693843925,
-0.07088053578324385, -0.15949427888491757,
0.011609893903711381, 0.0459272392310922,
-0.0014653825813050513, -0.008641299277022422,
9.563267072289475e-05, 0.0007701598091144901,
}

Definition at line 119 of file af_afwtdn.c.

Referenced by config_output().

◆ sym10_ihp

const double sym10_ihp[20]
static
Initial value:
= {
0.0007701598091144901, -9.563267072289475e-05,
-0.008641299277022422, 0.0014653825813050513,
0.0459272392310922, -0.011609893903711381,
-0.15949427888491757, 0.07088053578324385,
0.47169066693843925, -0.7695100370211071,
0.38382676106708546, 0.03553674047381755,
-0.0319900568824278, -0.04999497207737669,
0.005764912033581909, 0.02035493981231129,
-0.0008043589320165449, -0.004593173585311828,
5.7036083618494284e-05, 0.0004593294210046588,
}

Definition at line 132 of file af_afwtdn.c.

Referenced by config_output().

◆ rbior68_lp

const double rbior68_lp[18]
static
Initial value:
= {
0.0, 0.0, 0.0, 0.0,
0.014426282505624435, 0.014467504896790148,
-0.07872200106262882, -0.04036797903033992,
0.41784910915027457, 0.7589077294536541,
0.41784910915027457, -0.04036797903033992,
-0.07872200106262882, 0.014467504896790148,
0.014426282505624435, 0.0, 0.0, 0.0,
}

Definition at line 145 of file af_afwtdn.c.

Referenced by config_output().

◆ rbior68_hp

const double rbior68_hp[18]
static
Initial value:
= {
-0.0019088317364812906, -0.0019142861290887667,
0.016990639867602342, 0.01193456527972926,
-0.04973290349094079, -0.07726317316720414,
0.09405920349573646, 0.4207962846098268,
-0.8259229974584023, 0.4207962846098268,
0.09405920349573646, -0.07726317316720414,
-0.04973290349094079, 0.01193456527972926,
0.016990639867602342, -0.0019142861290887667,
-0.0019088317364812906, 0.0,
}

Definition at line 155 of file af_afwtdn.c.

Referenced by config_output().

◆ rbior68_ilp

const double rbior68_ilp[18]
static
Initial value:
= {
0.0019088317364812906, -0.0019142861290887667,
-0.016990639867602342, 0.01193456527972926,
0.04973290349094079, -0.07726317316720414,
-0.09405920349573646, 0.4207962846098268,
0.8259229974584023, 0.4207962846098268,
-0.09405920349573646, -0.07726317316720414,
0.04973290349094079, 0.01193456527972926,
-0.016990639867602342, -0.0019142861290887667,
0.0019088317364812906, 0.0,
}

Definition at line 167 of file af_afwtdn.c.

Referenced by config_output().

◆ rbior68_ihp

const double rbior68_ihp[18]
static
Initial value:
= {
0.0, 0.0, 0.0, 0.0,
0.014426282505624435, -0.014467504896790148,
-0.07872200106262882, 0.04036797903033992,
0.41784910915027457, -0.7589077294536541,
0.41784910915027457, 0.04036797903033992,
-0.07872200106262882, -0.014467504896790148,
0.014426282505624435, 0.0, 0.0, 0.0,
}

Definition at line 179 of file af_afwtdn.c.

Referenced by config_output().

◆ coif5_lp

const double coif5_lp[30]
static
Initial value:
= {
-9.517657273819165e-08, -1.6744288576823017e-07,
2.0637618513646814e-06, 3.7346551751414047e-06,
-2.1315026809955787e-05, -4.134043227251251e-05,
0.00014054114970203437, 0.00030225958181306315,
-0.0006381313430451114, -0.0016628637020130838,
0.0024333732126576722, 0.006764185448053083,
-0.009164231162481846, -0.01976177894257264,
0.03268357426711183, 0.0412892087501817,
-0.10557420870333893, -0.06203596396290357,
0.4379916261718371, 0.7742896036529562,
0.4215662066908515, -0.05204316317624377,
-0.09192001055969624, 0.02816802897093635,
0.023408156785839195, -0.010131117519849788,
-0.004159358781386048, 0.0021782363581090178,
0.00035858968789573785, -0.00021208083980379827,
}

Definition at line 189 of file af_afwtdn.c.

Referenced by config_output().

◆ coif5_hp

const double coif5_hp[30]
static
Initial value:
= {
0.00021208083980379827, 0.00035858968789573785,
-0.0021782363581090178, -0.004159358781386048,
0.010131117519849788, 0.023408156785839195,
-0.02816802897093635, -0.09192001055969624,
0.05204316317624377, 0.4215662066908515,
-0.7742896036529562, 0.4379916261718371,
0.06203596396290357, -0.10557420870333893,
-0.0412892087501817, 0.03268357426711183,
0.01976177894257264, -0.009164231162481846,
-0.006764185448053083, 0.0024333732126576722,
0.0016628637020130838, -0.0006381313430451114,
-0.00030225958181306315, 0.00014054114970203437,
4.134043227251251e-05, -2.1315026809955787e-05,
-3.7346551751414047e-06, 2.0637618513646814e-06,
1.6744288576823017e-07, -9.517657273819165e-08,
}

Definition at line 207 of file af_afwtdn.c.

Referenced by config_output().

◆ coif5_ilp

const double coif5_ilp[30]
static
Initial value:
= {
-0.00021208083980379827, 0.00035858968789573785,
0.0021782363581090178, -0.004159358781386048,
-0.010131117519849788, 0.023408156785839195,
0.02816802897093635, -0.09192001055969624,
-0.05204316317624377, 0.4215662066908515,
0.7742896036529562, 0.4379916261718371,
-0.06203596396290357, -0.10557420870333893,
0.0412892087501817, 0.03268357426711183,
-0.01976177894257264, -0.009164231162481846,
0.006764185448053083, 0.0024333732126576722,
-0.0016628637020130838, -0.0006381313430451114,
0.00030225958181306315, 0.00014054114970203437,
-4.134043227251251e-05, -2.1315026809955787e-05,
3.7346551751414047e-06, 2.0637618513646814e-06,
-1.6744288576823017e-07, -9.517657273819165e-08,
}

Definition at line 225 of file af_afwtdn.c.

Referenced by config_output().

◆ coif5_ihp

const double coif5_ihp[30]
static
Initial value:
= {
-9.517657273819165e-08, 1.6744288576823017e-07,
2.0637618513646814e-06, -3.7346551751414047e-06,
-2.1315026809955787e-05, 4.134043227251251e-05,
0.00014054114970203437, -0.00030225958181306315,
-0.0006381313430451114, 0.0016628637020130838,
0.0024333732126576722, -0.006764185448053083,
-0.009164231162481846, 0.01976177894257264,
0.03268357426711183, -0.0412892087501817,
-0.10557420870333893, 0.06203596396290357,
0.4379916261718371, -0.7742896036529562,
0.4215662066908515, 0.05204316317624377,
-0.09192001055969624, -0.02816802897093635,
0.023408156785839195, 0.010131117519849788,
-0.004159358781386048, -0.0021782363581090178,
0.00035858968789573785, 0.00021208083980379827,
}

Definition at line 243 of file af_afwtdn.c.

Referenced by config_output().

◆ deb10_lp

const double deb10_lp[20]
static
Initial value:
= {
-1.326420300235487e-05, 9.358867000108985e-05,
-0.0001164668549943862, -0.0006858566950046825,
0.00199240529499085, 0.0013953517469940798,
-0.010733175482979604, 0.0036065535669883944,
0.03321267405893324, -0.02945753682194567,
-0.07139414716586077, 0.09305736460380659,
0.12736934033574265, -0.19594627437659665,
-0.24984642432648865, 0.2811723436604265,
0.6884590394525921, 0.5272011889309198,
0.18817680007762133, 0.026670057900950818,
}

Definition at line 261 of file af_afwtdn.c.

Referenced by config_output().

◆ deb10_hp

const double deb10_hp[20]
static
Initial value:
= {
-0.026670057900950818, 0.18817680007762133,
-0.5272011889309198, 0.6884590394525921,
-0.2811723436604265, -0.24984642432648865,
0.19594627437659665, 0.12736934033574265,
-0.09305736460380659, -0.07139414716586077,
0.02945753682194567, 0.03321267405893324,
-0.0036065535669883944, -0.010733175482979604,
-0.0013953517469940798, 0.00199240529499085,
0.0006858566950046825, -0.0001164668549943862,
-9.358867000108985e-05, -1.326420300235487e-05,
}

Definition at line 274 of file af_afwtdn.c.

Referenced by config_output().

◆ deb10_ilp

const double deb10_ilp[20]
static
Initial value:
= {
0.026670057900950818, 0.18817680007762133,
0.5272011889309198, 0.6884590394525921,
0.2811723436604265, -0.24984642432648865,
-0.19594627437659665, 0.12736934033574265,
0.09305736460380659, -0.07139414716586077,
-0.02945753682194567, 0.03321267405893324,
0.0036065535669883944, -0.010733175482979604,
0.0013953517469940798, 0.00199240529499085,
-0.0006858566950046825, -0.0001164668549943862,
9.358867000108985e-05, -1.326420300235487e-05,
}

Definition at line 287 of file af_afwtdn.c.

Referenced by config_output().

◆ deb10_ihp

const double deb10_ihp[20]
static
Initial value:
= {
-1.326420300235487e-05, -9.358867000108985e-05,
-0.0001164668549943862, 0.0006858566950046825,
0.00199240529499085, -0.0013953517469940798,
-0.010733175482979604, -0.0036065535669883944,
0.03321267405893324, 0.02945753682194567,
-0.07139414716586077, -0.09305736460380659,
0.12736934033574265, 0.19594627437659665,
-0.24984642432648865, -0.2811723436604265,
0.6884590394525921, -0.5272011889309198,
0.18817680007762133, -0.026670057900950818,
}

Definition at line 300 of file af_afwtdn.c.

Referenced by config_output().

◆ sym4_lp

const double sym4_lp[8]
static
Initial value:
= {
-0.07576571478927333,
-0.02963552764599851,
0.49761866763201545,
0.8037387518059161,
0.29785779560527736,
-0.09921954357684722,
-0.012603967262037833,
0.0322231006040427,
}

Definition at line 313 of file af_afwtdn.c.

Referenced by config_output().

◆ sym4_hp

const double sym4_hp[8]
static
Initial value:
= {
-0.0322231006040427,
-0.012603967262037833,
0.09921954357684722,
0.29785779560527736,
-0.8037387518059161,
0.49761866763201545,
0.02963552764599851,
-0.07576571478927333,
}

Definition at line 324 of file af_afwtdn.c.

Referenced by config_output().

◆ sym4_ilp

const double sym4_ilp[8]
static
Initial value:
= {
0.0322231006040427,
-0.012603967262037833,
-0.09921954357684722,
0.29785779560527736,
0.8037387518059161,
0.49761866763201545,
-0.02963552764599851,
-0.07576571478927333,
}

Definition at line 335 of file af_afwtdn.c.

Referenced by config_output().

◆ sym4_ihp

const double sym4_ihp[8]
static
Initial value:
= {
-0.07576571478927333,
0.02963552764599851,
0.49761866763201545,
-0.8037387518059161,
0.29785779560527736,
0.09921954357684722,
-0.012603967262037833,
-0.0322231006040427,
}

Definition at line 346 of file af_afwtdn.c.

Referenced by config_output().

◆ sym2_lp

const double sym2_lp[4]
static
Initial value:
= {
-0.12940952255092145, 0.22414386804185735,
0.836516303737469, 0.48296291314469025,
}

Definition at line 357 of file af_afwtdn.c.

Referenced by config_output().

◆ sym2_hp

const double sym2_hp[4]
static
Initial value:
= {
-0.48296291314469025, 0.836516303737469,
-0.22414386804185735, -0.12940952255092145,
}

Definition at line 362 of file af_afwtdn.c.

Referenced by config_output().

◆ sym2_ilp

const double sym2_ilp[4]
static
Initial value:
= {
0.48296291314469025, 0.836516303737469,
0.22414386804185735, -0.12940952255092145,
}

Definition at line 367 of file af_afwtdn.c.

Referenced by config_output().

◆ sym2_ihp

const double sym2_ihp[4]
static
Initial value:
= {
-0.12940952255092145, -0.22414386804185735,
0.836516303737469, -0.48296291314469025,
}

Definition at line 372 of file af_afwtdn.c.

Referenced by config_output().

◆ afwtdn_options

const AVOption afwtdn_options[]
static
Initial value:
= {
{ "sigma", "set noise sigma", OFFSET(sigma), AV_OPT_TYPE_DOUBLE, {.dbl=0}, 0, 1, AFR },
{ "levels", "set number of wavelet levels", OFFSET(levels), AV_OPT_TYPE_INT, {.i64=10}, 1, MAX_LEVELS-1, AF },
{ "wavet", "set wavelet type", OFFSET(wavelet_type), AV_OPT_TYPE_INT, {.i64=SYM10}, 0, NB_WAVELET_TYPES - 1, AF, .unit = "wavet" },
{ "sym2", "sym2", 0, AV_OPT_TYPE_CONST, {.i64=SYM2}, 0, 0, AF, .unit = "wavet" },
{ "sym4", "sym4", 0, AV_OPT_TYPE_CONST, {.i64=SYM4}, 0, 0, AF, .unit = "wavet" },
{ "rbior68", "rbior68", 0, AV_OPT_TYPE_CONST, {.i64=RBIOR68}, 0, 0, AF, .unit = "wavet" },
{ "deb10", "deb10", 0, AV_OPT_TYPE_CONST, {.i64=DEB10}, 0, 0, AF, .unit = "wavet" },
{ "sym10", "sym10", 0, AV_OPT_TYPE_CONST, {.i64=SYM10}, 0, 0, AF, .unit = "wavet" },
{ "coif5", "coif5", 0, AV_OPT_TYPE_CONST, {.i64=COIF5}, 0, 0, AF, .unit = "wavet" },
{ "bl3", "bl3", 0, AV_OPT_TYPE_CONST, {.i64=BL3}, 0, 0, AF, .unit = "wavet" },
{ "percent", "set percent of full denoising", OFFSET(percent),AV_OPT_TYPE_DOUBLE, {.dbl=85}, 0, 100, AFR },
{ "profile", "profile noise", OFFSET(need_profile), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, AFR },
{ "adaptive", "adaptive profiling of noise", OFFSET(adaptive), AV_OPT_TYPE_BOOL, {.i64=0}, 0, 1, AFR },
{ "samples", "set frame size in number of samples", OFFSET(nb_samples), AV_OPT_TYPE_INT, {.i64=8192}, 512, 65536, AF },
{ "softness", "set thresholding softness", OFFSET(softness), AV_OPT_TYPE_DOUBLE, {.dbl=1}, 0, 10, AFR },
{ NULL }
}

Definition at line 443 of file af_afwtdn.c.

◆ outputs

const AVFilterPad outputs[]
static
Initial value:
= {
{
.name = "default",
.config_props = config_output,
},
}

Definition at line 1296 of file af_afwtdn.c.

◆ ff_af_afwtdn

const AVFilter ff_af_afwtdn
Initial value:
= {
.name = "afwtdn",
.description = NULL_IF_CONFIG_SMALL("Denoise audio stream using Wavelets."),
.priv_size = sizeof(AudioFWTDNContext),
.priv_class = &afwtdn_class,
.process_command = process_command,
}

Definition at line 1304 of file af_afwtdn.c.

FILTER_INPUTS
#define FILTER_INPUTS(array)
Definition: filters.h:262
SYM2
@ SYM2
Definition: af_afwtdn.c:31
SYM4
@ SYM4
Definition: af_afwtdn.c:32
AV_OPT_TYPE_DOUBLE
@ AV_OPT_TYPE_DOUBLE
Underlying C type is double.
Definition: opt.h:267
AVMEDIA_TYPE_AUDIO
@ AVMEDIA_TYPE_AUDIO
Definition: avutil.h:202
SYM10
@ SYM10
Definition: af_afwtdn.c:35
FILTER_OUTPUTS
#define FILTER_OUTPUTS(array)
Definition: filters.h:263
NULL
#define NULL
Definition: coverity.c:32
OFFSET
#define OFFSET(x)
Definition: af_afwtdn.c:439
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:34
AudioFWTDNContext
Definition: af_afwtdn.c:403
NB_WAVELET_TYPES
@ NB_WAVELET_TYPES
Definition: af_afwtdn.c:38
FILTER_SINGLE_SAMPLEFMT
#define FILTER_SINGLE_SAMPLEFMT(sample_fmt_)
Definition: filters.h:255
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:94
BL3
@ BL3
Definition: af_afwtdn.c:37
MAX_LEVELS
#define MAX_LEVELS
Definition: af_afwtdn.c:377
AFR
#define AFR
Definition: af_afwtdn.c:441
AF
#define AF
Definition: af_afwtdn.c:440
DEB10
@ DEB10
Definition: af_afwtdn.c:34
uninit
static av_cold void uninit(AVFilterContext *ctx)
Definition: af_afwtdn.c:1238
config_output
static int config_output(AVFilterLink *outlink)
Definition: af_afwtdn.c:1095
outputs
static const AVFilterPad outputs[]
Definition: af_afwtdn.c:1296
AV_OPT_TYPE_INT
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition: opt.h:259
AV_SAMPLE_FMT_DBLP
@ AV_SAMPLE_FMT_DBLP
double, planar
Definition: samplefmt.h:67
AVFILTER_FLAG_SLICE_THREADS
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
Definition: avfilter.h:152
AV_OPT_TYPE_BOOL
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
Definition: opt.h:327
AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
Definition: avfilter.h:190
COIF5
@ COIF5
Definition: af_afwtdn.c:36
activate
static int activate(AVFilterContext *ctx)
Definition: af_afwtdn.c:1202
RBIOR68
@ RBIOR68
Definition: af_afwtdn.c:33
process_command
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
Definition: af_afwtdn.c:1280
AV_OPT_TYPE_CONST
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition: opt.h:299