From a5768f61e526c422a74f078a52deb73e2b40fa4c Mon Sep 17 00:00:00 2001 From: James Zern Date: Wed, 18 Dec 2013 16:38:41 -0800 Subject: [PATCH] test/partial_idct_test: fix msvc build Change-Id: I7fa72980d17f1ca997959e9c4f0f82501810d7c4 --- test/partial_idct_test.cc | 58 +++++++++++++++++++++++------------------------ 1 file changed, 29 insertions(+), 29 deletions(-) diff --git a/test/partial_idct_test.cc b/test/partial_idct_test.cc index 14b78f6..3bc3d1e 100644 --- a/test/partial_idct_test.cc +++ b/test/partial_idct_test.cc @@ -90,7 +90,7 @@ TEST_P(PartialIDctTest, ResultsMatch) { memset(test_coef_block2, 0, sizeof(*test_coef_block2) * block_size); int max_energy_leftover = max_coeff * max_coeff; for (int j = 0; j < last_nonzero_; ++j) { - int16_t coef = static_cast(sqrt(max_energy_leftover) * + int16_t coef = static_cast(sqrt(1.0 * max_energy_leftover) * (rnd.Rand16() - 32768) / 65536); max_energy_leftover -= coef * coef; if (max_energy_leftover < 0) { @@ -122,51 +122,51 @@ using std::tr1::make_tuple; INSTANTIATE_TEST_CASE_P( C, PartialIDctTest, ::testing::Values( - make_tuple(vp9_idct32x32_1024_add_c, - vp9_idct32x32_34_add_c, + make_tuple(&vp9_idct32x32_1024_add_c, + &vp9_idct32x32_34_add_c, TX_32X32, 34), - make_tuple(vp9_idct32x32_1024_add_c, - vp9_idct32x32_1_add_c, + make_tuple(&vp9_idct32x32_1024_add_c, + &vp9_idct32x32_1_add_c, TX_32X32, 1), - make_tuple(vp9_idct16x16_256_add_c, - vp9_idct16x16_10_add_c, + make_tuple(&vp9_idct16x16_256_add_c, + &vp9_idct16x16_10_add_c, TX_16X16, 10), - make_tuple(vp9_idct16x16_256_add_c, - vp9_idct16x16_1_add_c, + make_tuple(&vp9_idct16x16_256_add_c, + &vp9_idct16x16_1_add_c, TX_16X16, 1), - make_tuple(vp9_idct8x8_64_add_c, - vp9_idct8x8_10_add_c, + make_tuple(&vp9_idct8x8_64_add_c, + &vp9_idct8x8_10_add_c, TX_8X8, 10), - make_tuple(vp9_idct8x8_64_add_c, - vp9_idct8x8_1_add_c, + make_tuple(&vp9_idct8x8_64_add_c, + &vp9_idct8x8_1_add_c, TX_8X8, 1), - make_tuple(vp9_idct4x4_16_add_c, - vp9_idct4x4_1_add_c, + make_tuple(&vp9_idct4x4_16_add_c, + &vp9_idct4x4_1_add_c, TX_4X4, 1))); #if HAVE_SSE2 INSTANTIATE_TEST_CASE_P( SSE2, PartialIDctTest, ::testing::Values( - make_tuple(vp9_idct32x32_1024_add_c, - vp9_idct32x32_34_add_sse2, + make_tuple(&vp9_idct32x32_1024_add_c, + &vp9_idct32x32_34_add_sse2, TX_32X32, 34), - make_tuple(vp9_idct32x32_1024_add_c, - vp9_idct32x32_1_add_sse2, + make_tuple(&vp9_idct32x32_1024_add_c, + &vp9_idct32x32_1_add_sse2, TX_32X32, 1), - make_tuple(vp9_idct16x16_256_add_c, - vp9_idct16x16_10_add_sse2, + make_tuple(&vp9_idct16x16_256_add_c, + &vp9_idct16x16_10_add_sse2, TX_16X16, 10), - make_tuple(vp9_idct16x16_256_add_c, - vp9_idct16x16_1_add_sse2, + make_tuple(&vp9_idct16x16_256_add_c, + &vp9_idct16x16_1_add_sse2, TX_16X16, 1), - make_tuple(vp9_idct8x8_64_add_c, - vp9_idct8x8_10_add_sse2, + make_tuple(&vp9_idct8x8_64_add_c, + &vp9_idct8x8_10_add_sse2, TX_8X8, 10), - make_tuple(vp9_idct8x8_64_add_c, - vp9_idct8x8_1_add_sse2, + make_tuple(&vp9_idct8x8_64_add_c, + &vp9_idct8x8_1_add_sse2, TX_8X8, 1), - make_tuple(vp9_idct4x4_16_add_c, - vp9_idct4x4_1_add_sse2, + make_tuple(&vp9_idct4x4_16_add_c, + &vp9_idct4x4_1_add_sse2, TX_4X4, 1))); #endif } // namespace -- 2.7.4