33#define C (M_LN10 * 0.1)
35#define NB_PROFILE_BANDS (15)
163#define OFFSET(x) offsetof(AudioFFTDeNoiseContext, x)
164#define AF AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM
165#define AFR AV_OPT_FLAG_AUDIO_PARAM|AV_OPT_FLAG_FILTERING_PARAM|AV_OPT_FLAG_RUNTIME_PARAM
230 d1 =
a /
s->band_centre[band];
231 d1 = 10.0 * log(1.0 + d1 * d1) /
M_LN10;
232 d2 =
b /
s->band_centre[band];
233 d2 = 10.0 * log(1.0 + d2 * d2) /
M_LN10;
234 d3 =
s->band_centre[band] /
c;
235 d3 = 10.0 * log(1.0 + d3 * d3) /
M_LN10;
237 return -d1 + d2 - d3;
242 for (
int i = 0;
i <
size - 1;
i++) {
243 for (
int j =
i + 1; j <
size; j++) {
247 for (
int k =
i + 1; k <
size; k++) {
256 for (
int i = 0;
i <
size - 1;
i++) {
257 for (
int j =
i + 1; j <
size; j++) {
259 vector[j] -= d * vector[
i];
265 for (
int i =
size - 2;
i >= 0;
i--) {
266 double d = vector[
i];
267 for (
int j =
i + 1; j <
size; j++)
277 double product, sum,
f;
287 s->vector_b[j] = sum;
292 f = 15.0 + log(
f / 1.5) / log(1.5);
296 sum += product *
s->vector_b[j];
306 return (
b *
a - 1.0) / (
b +
a - 2.0);
308 return (
b *
a - 2.0 *
a + 1.0) / (
b -
a);
313 double floor,
int len,
double *rnum,
double *rden)
315 double num = 0., den = 0.;
318 for (
int n = 0; n <
len; n++) {
319 const double v = spectral[n];
344 for (
int n = 0; n <
size; n++) {
345 const double p =
S[n] -
mean;
355 double *prior,
double *prior_band_excit,
int track_noise)
359 const double *abs_var = dnch->
abs_var;
361 const double rratio = 1. - ratio;
362 const int *bin2band =
s->bin2band;
369 double *gain = dnch->
gain;
371 for (
int i = 0;
i <
s->bin_count;
i++) {
372 double sqr_new_gain, new_gain,
power, mag, mag_abs_var, new_mag_abs_var;
376 noisy_data[
i] = mag =
hypot(fft_data_flt[
i].re, fft_data_flt[
i].im);
379 noisy_data[
i] = mag =
hypot(fft_data_dbl[
i].re, fft_data_dbl[
i].im);
386 mag_abs_var =
power / abs_var[
i];
387 new_mag_abs_var = ratio * prior[
i] + rratio *
fmax(mag_abs_var - 1.0, 0.0);
388 new_gain = new_mag_abs_var / (1.0 + new_mag_abs_var);
389 sqr_new_gain = new_gain * new_gain;
390 prior[
i] = mag_abs_var * sqr_new_gain;
396 double flatness, num, den;
400 flatness = num / den;
401 if (flatness > 0.8) {
403 const double new_floor =
av_clipd(10.0 * log10(den) - 100.0 +
offset, -90., -20.);
410 for (
int i = 0;
i <
s->number_of_bands;
i++) {
415 for (
int i = 0;
i <
s->bin_count;
i++)
418 for (
int i = 0;
i <
s->number_of_bands;
i++) {
419 band_excit[
i] =
fmax(band_excit[
i],
420 s->band_alpha[
i] * band_excit[
i] +
421 s->band_beta[
i] * prior_band_excit[
i]);
422 prior_band_excit[
i] = band_excit[
i];
425 for (
int j = 0,
i = 0; j <
s->number_of_bands; j++) {
426 for (
int k = 0; k <
s->number_of_bands; k++) {
431 for (
int i = 0;
i <
s->bin_count;
i++)
432 dnch->
amt[
i] = band_amt[bin2band[
i]];
434 for (
int i = 0;
i <
s->bin_count;
i++) {
435 if (dnch->
amt[
i] > abs_var[
i]) {
438 const double limit = sqrt(abs_var[
i] / dnch->
amt[
i]);
446 memcpy(smoothed_gain, gain,
s->bin_count *
sizeof(*smoothed_gain));
447 if (
s->gain_smooth > 0) {
448 const int r =
s->gain_smooth;
450 for (
int i =
r;
i <
s->bin_count -
r;
i++) {
451 const double gc = gain[
i];
452 double num = 0., den = 0.;
454 for (
int j = -
r; j <=
r; j++) {
455 const double g = gain[
i + j];
456 const double d = 1. -
fabs(
g - gc);
462 smoothed_gain[
i] = num / den;
468 for (
int i = 0;
i <
s->bin_count;
i++) {
469 const float new_gain = smoothed_gain[
i];
471 fft_data_flt[
i].
re *= new_gain;
472 fft_data_flt[
i].
im *= new_gain;
476 for (
int i = 0;
i <
s->bin_count;
i++) {
477 const double new_gain = smoothed_gain[
i];
479 fft_data_dbl[
i].
re *= new_gain;
480 fft_data_dbl[
i].
im *= new_gain;
488 double d = x / 7500.0;
490 return 13.0 * atan(7.6E-4 * x) + 3.5 * atan(d * d);
496 return lrint(
s->band_centre[0] / 1.5);
498 return s->band_centre[band];
508 i =
lrint(
s->band_centre[band] / 1.224745);
511 return FFMIN(
i,
s->sample_rate / 2);
517 double band_noise, d2, d3, d4, d5;
518 int i = 0, j = 0, k = 0;
522 for (
int m = j; m <
s->bin_count; m++) {
537 dnch->
rel_var[m] =
exp((d5 * d3 + band_noise * d4) *
C);
548 char *custom_noise_str, *p, *
arg, *saveptr =
NULL;
552 if (!
s->band_noise_str)
555 custom_noise_str = p =
av_strdup(
s->band_noise_str);
577 memcpy(dnch->
band_noise, band_noise,
sizeof(band_noise));
585 if (
s->track_residual)
589 if (update_auto_var) {
594 if (
s->track_residual) {
613 for (
int i = 0;
i <
s->bin_count;
i++) {
625 mean += band_noise[
i];
629 band_noise[
i] -=
mean;
636 double wscale, sar, sum, sdiv;
637 int i, j, k, m, n, ret, tx_type;
646 s->sample_size =
sizeof(
float);
652 s->sample_size =
sizeof(
double);
665 s->sample_advance =
s->sample_rate / 80;
666 s->window_length = 3 *
s->sample_advance;
667 s->fft_length2 = 1 << (32 -
ff_clz(
s->window_length));
668 s->fft_length =
s->fft_length2;
669 s->buffer_length =
s->fft_length * 2;
670 s->bin_count =
s->fft_length2 / 2 + 1;
672 s->band_centre[0] = 80;
674 s->band_centre[
i] =
lrint(1.5 *
s->band_centre[
i - 1] + 5.0);
675 if (
s->band_centre[
i] < 1000) {
676 s->band_centre[
i] = 10 * (
s->band_centre[
i] / 10);
677 }
else if (
s->band_centre[
i] < 5000) {
678 s->band_centre[
i] = 50 * ((
s->band_centre[
i] + 20) / 50);
679 }
else if (
s->band_centre[
i] < 15000) {
680 s->band_centre[
i] = 100 * ((
s->band_centre[
i] + 45) / 100);
682 s->band_centre[
i] = 1000 * ((
s->band_centre[
i] + 495) / 1000);
699 s->matrix_b[
i++] = pow(k, j);
704 s->matrix_c[
i++] = pow(j, k);
706 s->window =
av_calloc(
s->window_length,
sizeof(*
s->window));
707 s->bin2band =
av_calloc(
s->bin_count,
sizeof(*
s->bin2band));
708 if (!
s->window || !
s->bin2band)
711 sdiv =
s->band_multiplier;
712 for (
i = 0;
i <
s->bin_count;
i++)
715 s->number_of_bands =
s->bin2band[
s->bin_count - 1] + 1;
717 s->band_alpha =
av_calloc(
s->number_of_bands,
sizeof(*
s->band_alpha));
718 s->band_beta =
av_calloc(
s->number_of_bands,
sizeof(*
s->band_beta));
719 if (!
s->band_alpha || !
s->band_beta)
725 switch (
s->noise_type) {
798 p1 = pow(0.1, 2.5 / sdiv);
799 p2 = pow(0.1, 1.0 / sdiv);
801 for (m = 0; m <
s->number_of_bands; m++) {
802 for (n = 0; n <
s->number_of_bands; n++) {
813 for (m = 0; m <
s->number_of_bands; m++) {
815 prior_band_excit[m] = 0.0;
818 for (m = 0; m <
s->bin_count; m++)
822 for (m = 0; m <
s->number_of_bands; m++) {
823 for (n = 0; n <
s->number_of_bands; n++)
829 for (
int i = 0;
i <
s->number_of_bands;
i++) {
830 if (
i <
lrint(12.0 * sdiv)) {
833 dnch->
band_excit[
i] = pow(0.1, 2.5 - 0.2 * (
i / sdiv - 14.0));
838 for (
int i = 0;
i <
s->buffer_length;
i++)
842 for (
int i = 0;
i <
s->number_of_bands;
i++)
843 for (
int k = 0; k <
s->number_of_bands; k++)
848 sar =
s->sample_advance /
s->sample_rate;
849 for (
int i = 0;
i <
s->bin_count;
i++) {
850 if ((
i ==
s->fft_length2) || (
s->bin2band[
i] > j)) {
851 double d6 = (
i - 1) *
s->sample_rate /
s->fft_length;
852 double d7 =
fmin(0.008 + 2.2 / d6, 0.03);
853 s->band_alpha[j] =
exp(-sar / d7);
854 s->band_beta[j] = 1.0 -
s->band_alpha[j];
863 wscale = sqrt(8.0 / (9.0 *
s->fft_length));
865 for (
int i = 0;
i <
s->window_length;
i++) {
866 double d10 = sin(
i *
M_PI /
s->window_length);
872 s->window_weight = 0.5 * sum;
873 s->floor = (1LL << 48) *
exp(-23.025558369790467) *
s->window_weight;
874 s->sample_floor =
s->floor *
exp(4.144600506562284);
890 if (
s->noise_band_edge[j] >
lrint(1.1 *
s->noise_band_edge[j - 1]))
915 double mag2, var = 0.0, avr = 0.0, avi = 0.0;
918 double *fft_in_dbl = dnch->
fft_in;
919 float *fft_in_flt = dnch->
fft_in;
920 int edge, j, k, n, edgemax;
924 for (
int i = 0;
i <
s->window_length;
i++)
925 fft_in_flt[
i] =
s->window[
i] * src_flt[
i] * (1LL << 23);
927 for (
int i =
s->window_length;
i < s->fft_length2;
i++)
931 for (
int i = 0;
i <
s->window_length;
i++)
932 fft_in_dbl[
i] =
s->window[
i] * src_dbl[
i] * (1LL << 23);
934 for (
int i =
s->window_length;
i < s->fft_length2;
i++)
941 edge =
s->noise_band_edge[0];
946 for (
int i = j;
i <= edgemax;
i++) {
947 if ((
i == j) && (
i < edgemax)) {
956 j =
s->noise_band_edge[k];
967 avr += fft_out_flt[n].
re;
968 avi += fft_out_flt[n].
im;
969 mag2 = fft_out_flt[n].
re * fft_out_flt[n].
re +
970 fft_out_flt[n].
im * fft_out_flt[n].
im;
973 avr += fft_out_dbl[n].
re;
974 avi += fft_out_dbl[n].
im;
975 mag2 = fft_out_dbl[n].
re * fft_out_dbl[n].
re +
976 fft_out_dbl[n].
im * fft_out_dbl[n].
im;
982 mag2 =
fmax(mag2,
s->sample_floor);
996 double *sample_noise)
998 for (
int i = 0;
i <
s->noise_band_count;
i++) {
1009 sample_noise[
i] = sample_noise[
i - 1];
1015 double *sample_noise)
1023 temp[m] = sample_noise[m];
1028 sum +=
s->matrix_b[
i++] *
temp[n];
1029 s->vector_b[m] = sum;
1035 sum +=
s->matrix_c[
i++] *
s->vector_b[n];
1043 new_band_noise[m] =
temp[m];
1044 new_band_noise[m] =
av_clipd(new_band_noise[m], -24.0, 24.0);
1048 memcpy(dnch->
band_noise, new_band_noise,
sizeof(new_band_noise));
1057 const int window_length =
s->window_length;
1058 const double *
window =
s->window;
1060 for (
int ch = start; ch < end; ch++) {
1062 const double *src_dbl = (
const double *)in->
extended_data[ch];
1063 const float *src_flt = (
const float *)in->
extended_data[ch];
1065 double *fft_in_dbl = dnch->
fft_in;
1066 float *fft_in_flt = dnch->
fft_in;
1068 switch (
s->format) {
1070 for (
int m = 0; m < window_length; m++)
1071 fft_in_flt[m] =
window[m] * src_flt[m] * (1LL << 23);
1073 for (
int m = window_length; m <
s->fft_length2; m++)
1074 fft_in_flt[m] = 0.f;
1077 for (
int m = 0; m < window_length; m++)
1078 fft_in_dbl[m] =
window[m] * src_dbl[m] * (1LL << 23);
1080 for (
int m = window_length; m <
s->fft_length2; m++)
1094 switch (
s->format) {
1096 for (
int m = 0; m < window_length; m++)
1097 dst[m] +=
s->window[m] * fft_in_flt[m] / (1LL << 23);
1100 for (
int m = 0; m < window_length; m++)
1101 dst[m] +=
s->window[m] * fft_in_dbl[m] / (1LL << 23);
1114 const int output_mode =
ctx->is_disabled ?
IN_MODE :
s->output_mode;
1115 const int offset =
s->window_length -
s->sample_advance;
1118 for (
int ch = 0; ch <
s->channels; ch++) {
1119 uint8_t *
src = (uint8_t *)
s->winframe->extended_data[ch];
1121 memmove(
src,
src +
s->sample_advance *
s->sample_size,
1126 (
s->sample_advance - in->
nb_samples) *
s->sample_size);
1129 if (
s->track_noise) {
1130 double average = 0.0,
min = DBL_MAX,
max = -DBL_MAX;
1145 switch (
s->noise_floor_link) {
1166 s->sample_noise = 1;
1167 s->sample_noise_blocks = 0;
1170 if (
s->sample_noise) {
1176 s->sample_noise_blocks++;
1184 if (
s->sample_noise_blocks <= 0)
1190 s->sample_noise = 0;
1191 s->sample_noise_blocks = 0;
1213 const double *orig_dbl = (
const double *)
s->winframe->extended_data[ch];
1214 const float *orig_flt = (
const float *)
s->winframe->extended_data[ch];
1215 double *dst_dbl = (
double *)
out->extended_data[ch];
1216 float *dst_flt = (
float *)
out->extended_data[ch];
1218 switch (output_mode) {
1220 switch (
s->format) {
1222 for (
int m = 0; m <
out->nb_samples; m++)
1223 dst_flt[m] = orig_flt[m];
1226 for (
int m = 0; m <
out->nb_samples; m++)
1227 dst_dbl[m] = orig_dbl[m];
1232 switch (
s->format) {
1234 for (
int m = 0; m <
out->nb_samples; m++)
1235 dst_flt[m] =
src[m];
1238 for (
int m = 0; m <
out->nb_samples; m++)
1239 dst_dbl[m] =
src[m];
1244 switch (
s->format) {
1246 for (
int m = 0; m <
out->nb_samples; m++)
1247 dst_flt[m] = orig_flt[m] -
src[m];
1250 for (
int m = 0; m <
out->nb_samples; m++)
1251 dst_dbl[m] = orig_dbl[m] -
src[m];
1262 memmove(
src,
src +
s->sample_advance, (
s->window_length -
s->sample_advance) *
sizeof(*
src));
1263 memset(
src + (
s->window_length -
s->sample_advance), 0,
s->sample_advance *
sizeof(*
src));
1309 for (
int ch = 0; ch <
s->channels; ch++) {
1335 char *res,
int res_len,
int flags)
1344 if (!strcmp(cmd,
"sample_noise") || !strcmp(cmd,
"sn"))
1347 for (
int ch = 0; ch <
s->channels; ch++) {
1371 .p.priv_class = &afftdn_class,
uint8_t ptrdiff_t const uint8_t ptrdiff_t int intptr_t intptr_t int int16_t * dst
static const AVFilterPad inputs[]
static int config_input(AVFilterLink *inlink)
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static int get_band_edge(AudioFFTDeNoiseContext *s, int band)
static void read_custom_noise(AVFilterContext *ctx, int ch)
static void process_frame(AVFilterContext *ctx, AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch, double *prior, double *prior_band_excit, int track_noise)
static double process_get_band_noise(AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch, int band)
const FFFilter ff_af_afftdn
static void reduce_mean(double *band_noise)
static void set_noise_profile(AVFilterContext *ctx, DeNoiseChannel *dnch, double *sample_noise)
static double get_band_noise(AudioFFTDeNoiseContext *s, int band, double a, double b, double c)
static const AVOption afftdn_options[]
static int config_input(AVFilterLink *inlink)
static void set_band_parameters(AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch)
static void finish_sample_noise(AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch, double *sample_noise)
static double floor_offset(const double *S, int size, double mean)
static void sample_noise_block(AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch, AVFrame *in, int ch)
static void solve(double *matrix, double *vector, int size)
static int get_band_centre(AudioFFTDeNoiseContext *s, int band)
static int process_command(AVFilterContext *ctx, const char *cmd, const char *args, char *res, int res_len, int flags)
static int activate(AVFilterContext *ctx)
static av_cold void uninit(AVFilterContext *ctx)
static void set_parameters(AudioFFTDeNoiseContext *s, DeNoiseChannel *dnch, int update_var, int update_auto_var)
static double freq2bark(double x)
static void init_sample_noise(DeNoiseChannel *dnch)
static int filter_channel(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
static double limit_gain(double a, double b)
static void spectral_flatness(AudioFFTDeNoiseContext *s, const double *const spectral, double floor, int len, double *rnum, double *rden)
static int output_frame(AVFilterLink *inlink, AVFrame *in)
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.
simple assert() macros that are a bit more flexible than ISO C assert().
#define av_assert2(cond)
assert() equivalent, that does lie in speed critical code.
#define av_assert0(cond)
assert() equivalent, that is always enabled.
int ff_filter_frame(AVFilterLink *link, AVFrame *frame)
Send a frame of data to the next filter.
int ff_filter_process_command(AVFilterContext *ctx, const char *cmd, const char *arg, char *res, int res_len, int flags)
Generic processing of user supplied commands that are set in the same way as the filter options.
int ff_filter_execute(AVFilterContext *ctx, avfilter_action_func *func, void *arg, int *ret, int nb_jobs)
int ff_inlink_consume_samples(AVFilterLink *link, unsigned min, unsigned max, AVFrame **rframe)
Take samples from the link's FIFO and update the link's stats.
int ff_filter_get_nb_threads(AVFilterContext *ctx)
Get number of threads for current filter instance.
void ff_filter_set_ready(AVFilterContext *filter, unsigned priority)
Mark a filter ready and schedule it for activation.
int ff_inlink_queued_samples(AVFilterLink *link)
Main libavfilter public API header.
int av_sscanf(const char *string, const char *format,...)
#define flags(name, subs,...)
#define i(width, name, range_min, range_max)
Public libavutil channel layout APIs header.
static __device__ float fabs(float a)
static __device__ float floor(float a)
double fmin(double, double)
double fmax(double, double)
static SDL_Window * window
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
@ AV_OPT_TYPE_INT
Underlying C type is int.
@ AV_OPT_TYPE_FLOAT
Underlying C type is float.
@ AV_OPT_TYPE_BOOL
Underlying C type is int.
@ AV_OPT_TYPE_STRING
Underlying C type is a uint8_t* that is either NULL or points to a C string allocated with the av_mal...
#define AVFILTER_FLAG_SLICE_THREADS
The filter supports multithreading by splitting frames into multiple parts and processing them concur...
#define AVFILTER_FLAG_SUPPORT_TIMELINE_INTERNAL
Same as AVFILTER_FLAG_SUPPORT_TIMELINE_GENERIC, except that the filter will have its filter_frame() c...
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
int av_frame_is_writable(AVFrame *frame)
Check if the frame data is writable.
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.
#define AV_LOG_INFO
Standard information.
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
@ AV_SAMPLE_FMT_FLTP
float, planar
@ AV_SAMPLE_FMT_DBLP
double, planar
char * av_strtok(char *s, const char *delim, char **saveptr)
Split the string into several tokens which can be accessed by successive calls to av_strtok().
static void scale(int *out, const int *in, const int w, const int h, const int shift)
static av_cold void uninit(AVBitStreamFilterContext *ctx)
static int activate(AVBitStreamFilterContext *ctx)
static void filter_channel(MLPDecodeContext *m, unsigned int substr, unsigned int channel)
Generate PCM samples using the prediction filters and residual values read from the data stream,...
#define FILTER_INPUTS(array)
#define FILTER_OUTPUTS(array)
#define FILTER_SAMPLEFMTS(...)
static int ff_slice_pos(int total, int jobnr, int nb_jobs)
Compute the boundary index for a slice when work of size total is split into nb_jobs slices.
#define FF_FILTER_FORWARD_WANTED(outlink, inlink)
Forward the frame_wanted_out flag from an output link to an input link.
#define FF_FILTER_FORWARD_STATUS(inlink, outlink)
Acknowledge the status on an input link and forward it to an output link.
#define FFERROR_NOT_READY
Filters implementation helper functions and internal structures.
#define FF_FILTER_FORWARD_STATUS_BACK(outlink, inlink)
Forward the status on an output link to an input link.
static FilterLink * ff_filter_link(AVFilterLink *link)
#define AVFILTER_DEFINE_CLASS(fname)
static const int factor[16]
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
static av_const double hypot(double x, double y)
void * av_calloc(size_t nmemb, size_t size)
Memory handling functions.
static int noise(AVBSFContext *ctx, AVPacket *pkt)
static float power(float r, float g, float b, float max)
int nb_channels
Number of channels in this layout.
Describe the class of an AVClass context structure.
A link between two filters.
int sample_rate
samples per second
AVChannelLayout ch_layout
channel layout of current buffer (see libavutil/channel_layout.h)
AVFilterContext * dst
dest filter
int format
agreed upon media format
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
AVChannelLayout ch_layout
Channel layout of the audio data.
uint8_t ** extended_data
pointers to the data planes/channels.
size_t complex_sample_size
double vector_b[SOLVE_SIZE]
double matrix_c[SOLVE_SIZE *NB_PROFILE_BANDS]
int noise_band_edge[NB_PROFILE_BANDS+2]
int band_centre[NB_PROFILE_BANDS]
double matrix_a[SOLVE_SIZE *SOLVE_SIZE]
double matrix_b[SOLVE_SIZE *NB_PROFILE_BANDS]
double last_noise_reduction
double * prior_band_excit
double noise_band_avr[NB_PROFILE_BANDS]
double noise_band_sample[NB_PROFILE_BANDS]
double noise_band_auto_var[NB_PROFILE_BANDS]
double noise_band_norm[NB_PROFILE_BANDS]
double last_residual_floor
double noise_band_avi[NB_PROFILE_BANDS]
double noise_band_var[NB_PROFILE_BANDS]
double band_noise[NB_PROFILE_BANDS]
Link properties exposed to filter code, but not external callers.
static int array[MAX_W *MAX_W]
static AVFormatContext * ctx
av_cold void av_tx_uninit(AVTXContext **ctx)
Frees a context and sets *ctx to NULL, does nothing when *ctx == NULL.
av_cold int av_tx_init(AVTXContext **ctx, av_tx_fn *tx, enum AVTXType type, int inv, int len, const void *scale, uint64_t flags)
Initialize a transform context with the given configuration (i)MDCTs with an odd length are currently...
@ AV_TX_FLOAT_RDFT
Real to complex and complex to real DFTs.
void(* av_tx_fn)(AVTXContext *s, void *out, void *in, ptrdiff_t stride)
Function pointer to a function to perform the transform.
static float mean(const float *input, int size)
static double limit(double x)