/*
* CINELERRA
* Copyright (C) 2008 Adam Williams <broadcast at earthling dot net>
- *
+ *
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
- *
+ *
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
- *
+ *
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
- *
+ *
*/
#ifndef DENOISE_H
DenoiseConfig();
void copy_from(DenoiseConfig &that);
int equivalent(DenoiseConfig &that);
- void interpolate(DenoiseConfig &prev,
- DenoiseConfig &next,
- int64_t prev_frame,
- int64_t next_frame,
+ void interpolate(DenoiseConfig &prev,
+ DenoiseConfig &next,
+ int64_t prev_frame,
+ int64_t next_frame,
int64_t current_frame);
double level;
};
public:
Tree(int input_length, int levels);
~Tree();
-
+
int input_length;
int levels;
double **values;
public:
WaveletCoeffs(double alpha, double beta);
~WaveletCoeffs();
-
+
double values[6];
int length;
};
void process_window();
double dot_product(double *data, double *filter, char filtlen);
- int convolve_dec_2(double *input_sequence,
+ int convolve_dec_2(double *input_sequence,
int64_t length,
- double *filter,
- int filtlen,
+ double *filter,
+ int filtlen,
double *output_sequence);
- int64_t decompose_branches(double *in_data,
- int64_t length,
- WaveletFilters *decomp_filter,
- double *out_low,
+ int64_t decompose_branches(double *in_data,
+ int64_t length,
+ WaveletFilters *decomp_filter,
+ double *out_low,
double *out_high);
- int wavelet_decomposition(double *in_data,
- int64_t in_length,
+ int wavelet_decomposition(double *in_data,
+ int64_t in_length,
double **out_data);
- int tree_copy(double **output,
- double **input,
- int length,
+ int tree_copy(double **output,
+ double **input,
+ int length,
int levels);
int threshold(int window_size, double gammas, int levels);
double dot_product_even(double *data, double *filter, int filtlen);
double dot_product_odd(double *data, double *filter, int filtlen);
- int convolve_int_2(double *input_sequence,
- int64_t length,
- double *filter,
- int filtlen,
- int sum_output,
+ int convolve_int_2(double *input_sequence,
+ int64_t length,
+ double *filter,
+ int filtlen,
+ int sum_output,
double *output_sequence);
- int64_t reconstruct_branches(double *in_low,
- double *in_high,
+ int64_t reconstruct_branches(double *in_low,
+ double *in_high,
int64_t in_length,
- WaveletFilters *recon_filter,
+ WaveletFilters *recon_filter,
double *output);
- int wavelet_reconstruction(double **in_data,
- int64_t in_length,
+ int wavelet_reconstruction(double **in_data,
+ int64_t in_length,
double *out_data);
double *dsp_in;
double *dsp_out;
// buffer for capturing output of a single iteration
- double *dsp_iteration;
+ double *dsp_iteration;
Tree *ex_coeff_d, *ex_coeff_r, *ex_coeff_rn;
WaveletCoeffs *wave_coeff_d, *wave_coeff_r;
WaveletFilters *decomp_filter, *recon_filter;
int64_t iterations;
// daub6 coeffs
double alpha;
- double beta;
+ double beta;
// power
float output_level;
// higher number kills more noise at the expense of more aliasing