Commit e3bc0da1 authored by Sean Purser-Haskell's avatar Sean Purser-Haskell

Change parameter limit to be <1, not <=1. This saves a bit.

Change-Id: Ia9220b7b499567e07307444defe86a1d386cb8f9
parent 6e1c7d77
......@@ -669,8 +669,8 @@ static int is_affine_valid(WarpedMotionParams *wm) {
static int is_affine_shear_allowed(int16_t alpha, int16_t beta, int16_t gamma,
int16_t delta) {
if ((4 * abs(alpha) + 7 * abs(beta) > (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(gamma) + 4 * abs(delta) > (1 << WARPEDMODEL_PREC_BITS)))
if ((4 * abs(alpha) + 7 * abs(beta) >= (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(gamma) + 4 * abs(delta) >= (1 << WARPEDMODEL_PREC_BITS)))
return 0;
else
return 1;
......
......@@ -80,8 +80,8 @@ void AV1WarpFilterTest::generate_model(int32_t *mat, int16_t *alpha,
(1 << WARPEDMODEL_PREC_BITS),
INT16_MIN, INT16_MAX);
if ((4 * abs(*alpha) + 7 * abs(*beta) > (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(*gamma) + 4 * abs(*delta) > (1 << WARPEDMODEL_PREC_BITS)))
if ((4 * abs(*alpha) + 7 * abs(*beta) >= (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(*gamma) + 4 * abs(*delta) >= (1 << WARPEDMODEL_PREC_BITS)))
continue;
// We have a valid model, so finish
......@@ -196,8 +196,8 @@ void AV1HighbdWarpFilterTest::generate_model(int32_t *mat, int16_t *alpha,
(1 << WARPEDMODEL_PREC_BITS),
INT16_MIN, INT16_MAX);
if ((4 * abs(*alpha) + 7 * abs(*beta) > (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(*gamma) + 4 * abs(*delta) > (1 << WARPEDMODEL_PREC_BITS)))
if ((4 * abs(*alpha) + 7 * abs(*beta) >= (1 << WARPEDMODEL_PREC_BITS)) ||
(4 * abs(*gamma) + 4 * abs(*delta) >= (1 << WARPEDMODEL_PREC_BITS)))
continue;
// We have a valid model, so finish
......
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