summaryrefslogtreecommitdiff
path: root/vp9
diff options
context:
space:
mode:
authorAlex Converse <aconverse@google.com>2015-08-07 18:24:21 -0700
committerAlex Converse <aconverse@google.com>2015-08-07 18:24:21 -0700
commit610e258cc5a9f8093c5d3708d8da8c81ab50bd96 (patch)
tree44959301710ed74688ab745f4035ff8695b8dc2b /vp9
parenta9aa29d90161e5f4f47fb7b9e1346569f233a562 (diff)
downloadlibvpx-610e258cc5a9f8093c5d3708d8da8c81ab50bd96.tar
libvpx-610e258cc5a9f8093c5d3708d8da8c81ab50bd96.tar.gz
libvpx-610e258cc5a9f8093c5d3708d8da8c81ab50bd96.tar.bz2
libvpx-610e258cc5a9f8093c5d3708d8da8c81ab50bd96.zip
Make the round() replacement match C99 and POSIX.
http://pubs.opengroup.org/onlinepubs/009695399/functions/round.html Change-Id: Idf387d944d36bf593f8797db9053e11e5c9b9b39
Diffstat (limited to 'vp9')
-rw-r--r--vp9/common/vp9_systemdependent.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/vp9/common/vp9_systemdependent.h b/vp9/common/vp9_systemdependent.h
index fc77762de..3c5062f85 100644
--- a/vp9/common/vp9_systemdependent.h
+++ b/vp9/common/vp9_systemdependent.h
@@ -35,11 +35,11 @@ void vpx_reset_mmx_state(void);
#if defined(_MSC_VER) && _MSC_VER < 1800
// round is not defined in MSVC before VS2013.
-static INLINE int round(double x) {
+static INLINE double round(double x) {
if (x < 0)
- return (int)ceil(x - 0.5);
+ return ceil(x - 0.5);
else
- return (int)floor(x + 0.5);
+ return floor(x + 0.5);
}
#endif