Merge "fixed an overflow in ssim calculation"