DSSIM C implementation