Working version of DCT denoising