summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-11-15 23:41:18 +0000
committerGerrit Code Review <noreply-gerritcodereview@google.com>2016-11-15 23:41:18 +0000
commitf09c687ea913ba246fc98752d0415026a11f5f9c (patch)
tree76fbf8d6a133feada5ee6e94629c4c07d402829d
parent011fdec1e69c462767844877f6e3651b338215ad (diff)
parent2218a4c292f779df94be66ce7270b94a619c5785 (diff)
downloadlibvpx-f09c687ea913ba246fc98752d0415026a11f5f9c.tar
libvpx-f09c687ea913ba246fc98752d0415026a11f5f9c.tar.gz
libvpx-f09c687ea913ba246fc98752d0415026a11f5f9c.tar.bz2
libvpx-f09c687ea913ba246fc98752d0415026a11f5f9c.zip
Merge changes I3950c883,I2b679b04
* changes: partial_idct_test: use <limits> for int16_min/max vpx_timer.h,x86.h: define NOMINMAX for windows.h
-rw-r--r--test/partial_idct_test.cc8
-rw-r--r--vpx_ports/vpx_timer.h2
-rw-r--r--vpx_ports/x86.h3
3 files changed, 10 insertions, 3 deletions
diff --git a/test/partial_idct_test.cc b/test/partial_idct_test.cc
index bc214ad89..b31b82f44 100644
--- a/test/partial_idct_test.cc
+++ b/test/partial_idct_test.cc
@@ -12,6 +12,8 @@
#include <stdlib.h>
#include <string.h>
+#include <limits>
+
#include "third_party/googletest/src/include/gtest/gtest.h"
#include "./vp9_rtcd.h"
@@ -45,7 +47,7 @@ int16_t MaxSupportedCoeff(InvTxfmFunc a) {
#else
(void)a;
#endif
- return INT16_MAX;
+ return std::numeric_limits<int16_t>::max();
}
int16_t MinSupportedCoeff(InvTxfmFunc a) {
@@ -57,11 +59,11 @@ int16_t MinSupportedCoeff(InvTxfmFunc a) {
}
#elif HAVE_NEON
if (a == vpx_idct4x4_16_add_neon) {
- return INT16_MIN + 1;
+ return std::numeric_limits<int16_t>::min() + 1;
}
#endif
#endif // !CONFIG_EMULATE_HARDWARE
- return INT16_MIN;
+ return std::numeric_limits<int16_t>::min();
}
class PartialIDctTest : public ::testing::TestWithParam<PartialInvTxfmParam> {
diff --git a/vpx_ports/vpx_timer.h b/vpx_ports/vpx_timer.h
index 4aae30e94..c1f1b6027 100644
--- a/vpx_ports/vpx_timer.h
+++ b/vpx_ports/vpx_timer.h
@@ -21,6 +21,8 @@
/*
* Win32 specific includes
*/
+#undef NOMINMAX
+#define NOMINMAX
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h
index 6ba02cf1f..11c98fc76 100644
--- a/vpx_ports/x86.h
+++ b/vpx_ports/x86.h
@@ -140,6 +140,9 @@ static INLINE uint64_t xgetbv(void) {
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1700
+#undef NOMINMAX
+#define NOMINMAX
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP)
#define getenv(x) NULL