summaryrefslogtreecommitdiff
path: root/vp9/common/vp9_entropymv.h
diff options
context:
space:
mode:
Diffstat (limited to 'vp9/common/vp9_entropymv.h')
-rw-r--r--vp9/common/vp9_entropymv.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/vp9/common/vp9_entropymv.h b/vp9/common/vp9_entropymv.h
index 8c817bf7b..2f05ad44b 100644
--- a/vp9/common/vp9_entropymv.h
+++ b/vp9/common/vp9_entropymv.h
@@ -27,7 +27,14 @@ struct VP9Common;
void vp9_init_mv_probs(struct VP9Common *cm);
void vp9_adapt_mv_probs(struct VP9Common *cm, int usehp);
-int vp9_use_mv_hp(const MV *ref);
+
+// Integer pel reference mv threshold for use of high-precision 1/8 mv
+#define COMPANDED_MVREF_THRESH 8
+
+static INLINE int use_mv_hp(const MV *ref) {
+ return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH &&
+ (abs(ref->col) >> 3) < COMPANDED_MVREF_THRESH;
+}
#define MV_UPDATE_PROB 252