exclm / wavelet1d

Automatically exported from code.google.com/p/wavelet1d
0 stars 0 forks source link

DWT for very small length 1D/2D signal #1

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
When the size of input 1D signal is very small , the program may exit with 
segmentation fault. This is because of restriction put in the DWT computation

{{{
int Max_Iter;

                    Max_Iter = (int) ceil(log( double(sig.size()))/log (2.0)) - 2;

                    if ( Max_Iter < J) {

                      J = Max_Iter;

                    }

}}}

^^^ J becomes zero or negative if the signal size is less than 5.

You can edit and recompile the libraries for all the instances of Max_Iter in 
the 1D/2D block if this is a major problem.

Original issue reported on code.google.com by rafat....@gmail.com on 17 Sep 2011 at 8:45