From: Sarah Parker Date: Fri, 12 Aug 2016 23:44:05 +0000 (-0700) Subject: Fix precision bug in warped_motion.c X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=99adc5797676a67f5cabdfba128347a79f7e42da;p=libvpx Fix precision bug in warped_motion.c The projected coordiantes in projectPointsTranslation were being shifted by the incorrect precision. Change-Id: If6040bea9e5187020d85c6095d85c7ff5786b7f9 --- diff --git a/vp10/common/warped_motion.c b/vp10/common/warped_motion.c index 7e3aebf4f..59999f79e 100644 --- a/vp10/common/warped_motion.c +++ b/vp10/common/warped_motion.c @@ -62,17 +62,17 @@ static void projectPointsTranslation(int *mat, int *points, int *proj, if (subsampling_x) *(proj++) = ROUND_POWER_OF_TWO_SIGNED( ((x << (WARPEDMODEL_PREC_BITS + 1)) + mat[0]), - WARPEDPIXEL_PREC_BITS + 1); + WARPEDDIFF_PREC_BITS + 1); else *(proj++) = ROUND_POWER_OF_TWO_SIGNED( - ((x << WARPEDMODEL_PREC_BITS)) + mat[0], WARPEDPIXEL_PREC_BITS); + ((x << WARPEDMODEL_PREC_BITS)) + mat[0], WARPEDDIFF_PREC_BITS); if (subsampling_y) *(proj++) = ROUND_POWER_OF_TWO_SIGNED( ((y << (WARPEDMODEL_PREC_BITS + 1)) + mat[1]), - WARPEDPIXEL_PREC_BITS + 1); + WARPEDDIFF_PREC_BITS + 1); else *(proj++) = ROUND_POWER_OF_TWO_SIGNED( - ((y << WARPEDMODEL_PREC_BITS)) + mat[1], WARPEDPIXEL_PREC_BITS); + ((y << WARPEDMODEL_PREC_BITS)) + mat[1], WARPEDDIFF_PREC_BITS); points += stride_points - 2; proj += stride_proj - 2; }