From: Yaowu Xu Date: Mon, 4 Feb 2013 23:22:55 +0000 (-0800) Subject: fix a build issue with MSVC on windows X-Git-Tag: v1.3.0~1151^2~209^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=77f889b2e34d80f62ddc43642f66f6bda020444c;p=libvpx fix a build issue with MSVC on windows for idct 16x16 unit test Change-Id: I51da9405c3a4d7bb3f4cdf062aaccaa90b33dca4 --- diff --git a/test/dct16x16_test.cc b/test/dct16x16_test.cc index a4f1f8d73..194d5fb74 100644 --- a/test/dct16x16_test.cc +++ b/test/dct16x16_test.cc @@ -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;