Commit 99adc579 authored by Sarah Parker's avatar Sarah Parker
Browse files

Fix precision bug in warped_motion.c

The projected coordiantes in projectPointsTranslation were
being shifted by the incorrect precision.

Change-Id: If6040bea9e5187020d85c6095d85c7ff5786b7f9
parent 814986b8
......@@ -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;
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment