HARR wavelet decomposition and reconstruction c++ code