This is the haar wavelet transform.