modified HPSNR

new version HPSNR for adaptive filter size
how about if the image size cannot be fully divided by the dither array size?