Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(50)

Unified Diff: source/libvpx/vpx_ports/msvc.h

Issue 1302353004: libvpx: Pull from upstream (Closed) Base URL: https://chromium.googlesource.com/chromium/deps/libvpx.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « source/libvpx/vpx_ports/bitops.h ('k') | source/libvpx/vpx_ports/system_state.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/libvpx/vpx_ports/msvc.h
diff --git a/source/libvpx/vpx_ports/msvc.h b/source/libvpx/vpx_ports/msvc.h
index 43a36e761841c367cb6d84ec8fc49b5851f646f5..cab77405f47ef34f7406c81dc4da4741f62ca630 100644
--- a/source/libvpx/vpx_ports/msvc.h
+++ b/source/libvpx/vpx_ports/msvc.h
@@ -18,5 +18,15 @@
# define snprintf _snprintf
# endif // _MSC_VER < 1900
+#if _MSC_VER < 1800 // VS2013 provides round
+#include <math.h>
+static INLINE double round(double x) {
+ if (x < 0)
+ return ceil(x - 0.5);
+ else
+ return floor(x + 0.5);
+}
+#endif // _MSC_VER < 1800
+
#endif // _MSC_VER
#endif // VPX_PORTS_MSVC_H_
« no previous file with comments | « source/libvpx/vpx_ports/bitops.h ('k') | source/libvpx/vpx_ports/system_state.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698