adding spectral sharpening C++