Commit 3a50db4b authored by Debargha Mukherjee's avatar Debargha Mukherjee

Increase precision of affine parameters

Improves results for videos that have a strong global motion.

lowres: -0.630%
(waterfall: -9.468%; tempete: -6.560%)

Change-Id: If9e7c7a5cdf12b607c5ef3392e10606789018f3b
parent 614281f9
......@@ -36,8 +36,8 @@ typedef struct mv32 {
#if CONFIG_GLOBAL_MOTION || CONFIG_WARPED_MOTION
// Bits of precision used for the model
#define WARPEDMODEL_PREC_BITS 12
#define WARPEDMODEL_ROW3HOMO_PREC_BITS 14
#define WARPEDMODEL_PREC_BITS 16
#define WARPEDMODEL_ROW3HOMO_PREC_BITS 16
// Bits of subpel precision for warped interpolation
#define WARPEDPIXEL_PREC_BITS 6
......@@ -105,22 +105,21 @@ typedef struct {
// XX_MIN, XX_MAX are also computed to avoid repeated computation
#define GM_TRANS_PREC_BITS 3
#define GM_ABS_TRANS_BITS 9
#define GM_TRANS_PREC_DIFF (WARPEDMODEL_PREC_BITS - GM_TRANS_PREC_BITS)
#define GM_TRANS_DECODE_FACTOR (1 << GM_TRANS_PREC_DIFF)
#define GM_ALPHA_PREC_BITS 12
#define GM_ALPHA_PREC_BITS 15
#define GM_ABS_ALPHA_BITS 12
#define GM_ALPHA_PREC_DIFF (WARPEDMODEL_PREC_BITS - GM_ALPHA_PREC_BITS)
#define GM_ALPHA_DECODE_FACTOR (1 << GM_ALPHA_PREC_DIFF)
#define GM_ROW3HOMO_PREC_BITS 14
#define GM_ROW3HOMO_PREC_BITS 16
#define GM_ABS_ROW3HOMO_BITS 11
#define GM_ROW3HOMO_PREC_DIFF \
(WARPEDMODEL_ROW3HOMO_PREC_BITS - GM_ROW3HOMO_PREC_BITS)
#define GM_ROW3HOMO_DECODE_FACTOR (1 << GM_ROW3HOMO_PREC_DIFF)
#define GM_ABS_TRANS_BITS 9
#define GM_ABS_ALPHA_BITS 9
#define GM_ABS_ROW3HOMO_BITS 9
#define GM_TRANS_MAX (1 << GM_ABS_TRANS_BITS)
#define GM_ALPHA_MAX (1 << GM_ABS_ALPHA_BITS)
#define GM_ROW3HOMO_MAX (1 << GM_ABS_ROW3HOMO_BITS)
......
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