simplify both psnr() and hpsnr() functions by a factor of at least 10x

Also, set the default ksize of the hpsnr() from 9 to 7