summaryrefslogtreecommitdiff
path: root/test/idct8x8_test.cc
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-06-27 20:43:04 -0700
committerJames Zern <jzern@google.com>2016-06-29 14:57:47 -0700
commit0a64929f19cc1ce89f993aa5c9d61a29679eb961 (patch)
tree40f25bc2f7ff78c38ad414edf5eef51af5ad7438 /test/idct8x8_test.cc
parentc125f4a594815ad63b50e4b684ada4b44c545932 (diff)
downloadlibvpx-0a64929f19cc1ce89f993aa5c9d61a29679eb961.tar
libvpx-0a64929f19cc1ce89f993aa5c9d61a29679eb961.tar.gz
libvpx-0a64929f19cc1ce89f993aa5c9d61a29679eb961.tar.bz2
libvpx-0a64929f19cc1ce89f993aa5c9d61a29679eb961.zip
tests: remove redundant round() definition
use vpx_ports/msvc.h for compatibility BUG=b/29583530 Change-Id: I9433d8586cd0b790e7f4d697304298feafe801f1
Diffstat (limited to 'test/idct8x8_test.cc')
-rw-r--r--test/idct8x8_test.cc12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/idct8x8_test.cc b/test/idct8x8_test.cc
index 7f9d751d6..04487c452 100644
--- a/test/idct8x8_test.cc
+++ b/test/idct8x8_test.cc
@@ -17,20 +17,12 @@
#include "./vpx_dsp_rtcd.h"
#include "test/acm_random.h"
#include "vpx/vpx_integer.h"
+#include "vpx_ports/msvc.h" // for round()
using libvpx_test::ACMRandom;
namespace {
-#ifdef _MSC_VER
-static int round(double x) {
- if (x < 0)
- return static_cast<int>(ceil(x - 0.5));
- else
- return static_cast<int>(floor(x + 0.5));
-}
-#endif
-
void reference_dct_1d(double input[8], double output[8]) {
const double kPi = 3.141592653589793238462643383279502884;
const double kInvSqrt2 = 0.707106781186547524400844362104;
@@ -86,7 +78,7 @@ TEST(VP9Idct8x8Test, AccuracyCheck) {
reference_dct_2d(input, output_r);
for (int j = 0; j < 64; ++j)
- coeff[j] = round(output_r[j]);
+ coeff[j] = static_cast<tran_low_t>(round(output_r[j]));
vpx_idct8x8_64_add_c(coeff, dst, 8);
for (int j = 0; j < 64; ++j) {
const int diff = dst[j] - src[j];