Changed scaling of MVs to use higher precision.
This is intended to be a no-op when scaling is not
enabled, but is expected to result in more accurate
prediction when references need to be scaled.
However note all xs, yx, subpel_x and subpel_y values
are now at higher than 1/16th precision.
Change-Id: I4b22573ea290a31fc58ead980bb0d5e5a9e89243
diff --git a/av1/common/scale.h b/av1/common/scale.h
index ea81efa..e035075 100644
--- a/av1/common/scale.h
+++ b/av1/common/scale.h
@@ -19,6 +19,13 @@
extern "C" {
#endif
+#define SCALE_DENOMINATOR 16
+
+#define SCALE_SUBPEL_BITS 8
+#define SCALE_SUBPEL_SHIFTS (1 << SCALE_SUBPEL_BITS)
+#define SCALE_SUBPEL_MASK (SCALE_SUBPEL_SHIFTS - 1)
+#define SCALE_EXTRA_BITS (SCALE_SUBPEL_BITS - SUBPEL_BITS)
+
#define REF_SCALE_SHIFT 14
#define REF_NO_SCALE (1 << REF_SCALE_SHIFT)
#define REF_INVALID_SCALE -1