summaryrefslogtreecommitdiff
path: root/vp9/common
diff options
context:
space:
mode:
authorTristan Matthews <le.businessman@gmail.com>2016-09-22 18:49:27 -0400
committerJames Zern <jzern@google.com>2016-09-27 23:17:31 -0700
commit32c375447c037526f32ea0e8bc50c8c783fa14ce (patch)
tree62aa345f2c41a71953ab89117f9f219affbabccb /vp9/common
parent99ef84c65a2b5760bec5d9300974946303090afb (diff)
downloadlibvpx-32c375447c037526f32ea0e8bc50c8c783fa14ce.tar
libvpx-32c375447c037526f32ea0e8bc50c8c783fa14ce.tar.gz
libvpx-32c375447c037526f32ea0e8bc50c8c783fa14ce.tar.bz2
libvpx-32c375447c037526f32ea0e8bc50c8c783fa14ce.zip
vp9: fix compilation for g++ 6.2.x
Inline function called from test/dct16x16_test.cc wouldn't build due to: invalid operands of types ‘__gnu_cxx::__enable_if<true, double>::__type {aka double}’ and ‘int’ to binary ‘operator>>’ return (abs(ref->row) >> 3) < COMPANDED_MVREF_THRESH && this converts the test to abs() < COMPANDED_MVREF_THRESH << 3 which hides the promotion issue. Regression from commit de993a847f8080d3128420c8ef8495642013bdb1 BUG=webm:1291 Change-Id: I73b5943d07d5b61b709d299114216a2371a8fd62
Diffstat (limited to 'vp9/common')
-rw-r--r--vp9/common/vp9_entropymv.h7
1 files changed, 2 insertions, 5 deletions
diff --git a/vp9/common/vp9_entropymv.h b/vp9/common/vp9_entropymv.h
index a8cc7e93a..e2fe37a32 100644
--- a/vp9/common/vp9_entropymv.h
+++ b/vp9/common/vp9_entropymv.h
@@ -27,12 +27,9 @@ void vp9_init_mv_probs(struct VP9Common *cm);
void vp9_adapt_mv_probs(struct VP9Common *cm, int usehp);
-// 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;
+ const int kMvRefThresh = 64; // threshold for use of high-precision 1/8 mv
+ return abs(ref->row) < kMvRefThresh && abs(ref->col) < kMvRefThresh;
}
#define MV_UPDATE_PROB 252