]> granicus.if.org Git - libvpx/commitdiff
fix a build issue with MSVC on windows
authorYaowu Xu <yaowu@google.com>
Mon, 4 Feb 2013 23:22:55 +0000 (15:22 -0800)
committerYaowu Xu <yaowu@google.com>
Tue, 5 Feb 2013 20:12:05 +0000 (12:12 -0800)
for idct 16x16 unit test

Change-Id: I51da9405c3a4d7bb3f4cdf062aaccaa90b33dca4

test/dct16x16_test.cc

index a4f1f8d731d3d3892a65a2086bb617682da63f4e..194d5fb742a74cb927336904a261ffb71551898a 100644 (file)
@@ -26,6 +26,15 @@ using libvpx_test::ACMRandom;
 
 namespace {
 
+#ifdef _MSC_VER
+static int round(double x) {
+  if (x < 0)
+    return (int)ceil(x - 0.5);
+  else
+    return (int)floor(x + 0.5);
+}
+#endif
+
 const double PI = 3.1415926535898;
 void reference2_16x16_idct_2d(double *input, double *output) {
   double x;