From f67196b2edb854c15a81dfeb0f23e3f2383d2145 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Mon, 6 Jun 2016 10:52:25 -0700 Subject: [PATCH] Move #if out of TEST_P in vp10_fwd/inv_txfm2d_test.cc Change-Id: I1d5b2408f27a1e277574c2238f1e49e884596309 --- test/vp10_fwd_txfm2d_test.cc | 82 ++++++++++++++++++------------------ test/vp10_inv_txfm2d_test.cc | 81 ++++++++++++++++++----------------- 2 files changed, 84 insertions(+), 79 deletions(-) diff --git a/test/vp10_fwd_txfm2d_test.cc b/test/vp10_fwd_txfm2d_test.cc index 0e35782df..953ae11c5 100644 --- a/test/vp10_fwd_txfm2d_test.cc +++ b/test/vp10_fwd_txfm2d_test.cc @@ -132,48 +132,50 @@ class VP10FwdTxfm2d : public ::testing::TestWithParam { TEST_P(VP10FwdTxfm2d, RunFwdAccuracyCheck) { RunFwdAccuracyCheck(); } +const VP10FwdTxfm2dParam vp10_fwd_txfm2d_param_c[] = { +#if CONFIG_EXT_TX + VP10FwdTxfm2dParam(FLIPADST_DCT, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(DCT_FLIPADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(ADST_FLIPADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(FLIPADST_ADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(FLIPADST_DCT, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(DCT_FLIPADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(ADST_FLIPADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(FLIPADST_ADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(FLIPADST_DCT, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(DCT_FLIPADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(ADST_FLIPADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(FLIPADST_ADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(FLIPADST_DCT, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(DCT_FLIPADST, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(ADST_FLIPADST, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(FLIPADST_ADST, TX_32X32, 70, 7), +#endif + VP10FwdTxfm2dParam(DCT_DCT, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(ADST_DCT, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(DCT_ADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(ADST_ADST, TX_4X4, 2, 0.2), + VP10FwdTxfm2dParam(DCT_DCT, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(ADST_DCT, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(DCT_ADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(ADST_ADST, TX_8X8, 5, 0.6), + VP10FwdTxfm2dParam(DCT_DCT, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(ADST_DCT, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(DCT_ADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(ADST_ADST, TX_16X16, 11, 1.5), + VP10FwdTxfm2dParam(DCT_DCT, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(ADST_DCT, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(DCT_ADST, TX_32X32, 70, 7), + VP10FwdTxfm2dParam(ADST_ADST, TX_32X32, 70, 7) +}; INSTANTIATE_TEST_CASE_P( C, VP10FwdTxfm2d, - ::testing::Values( -#if CONFIG_EXT_TX - VP10FwdTxfm2dParam(FLIPADST_DCT, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(DCT_FLIPADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(ADST_FLIPADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(FLIPADST_ADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(FLIPADST_DCT, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(DCT_FLIPADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(ADST_FLIPADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(FLIPADST_ADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(FLIPADST_DCT, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(DCT_FLIPADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(ADST_FLIPADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(FLIPADST_ADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(FLIPADST_DCT, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(DCT_FLIPADST, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(FLIPADST_FLIPADST, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(ADST_FLIPADST, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(FLIPADST_ADST, TX_32X32, 70, 7), -#endif - VP10FwdTxfm2dParam(DCT_DCT, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(ADST_DCT, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(DCT_ADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(ADST_ADST, TX_4X4, 2, 0.2), - VP10FwdTxfm2dParam(DCT_DCT, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(ADST_DCT, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(DCT_ADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(ADST_ADST, TX_8X8, 5, 0.6), - VP10FwdTxfm2dParam(DCT_DCT, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(ADST_DCT, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(DCT_ADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(ADST_ADST, TX_16X16, 11, 1.5), - VP10FwdTxfm2dParam(DCT_DCT, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(ADST_DCT, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(DCT_ADST, TX_32X32, 70, 7), - VP10FwdTxfm2dParam(ADST_ADST, TX_32X32, 70, 7))); -#endif // CONFIG_VP9_HIGHBITDEPTH + ::testing::ValuesIn(vp10_fwd_txfm2d_param_c)); +#endif // CONFIG_VP9_HIGHBITDEPTH } // namespace diff --git a/test/vp10_inv_txfm2d_test.cc b/test/vp10_inv_txfm2d_test.cc index c8976dfca..d2ab04bd4 100644 --- a/test/vp10_inv_txfm2d_test.cc +++ b/test/vp10_inv_txfm2d_test.cc @@ -108,47 +108,50 @@ class VP10InvTxfm2d : public ::testing::TestWithParam { TEST_P(VP10InvTxfm2d, RunRoundtripCheck) { RunRoundtripCheck(); } +const VP10InvTxfm2dParam vp10_inv_txfm2d_param[] = { +#if CONFIG_EXT_TX + VP10InvTxfm2dParam(FLIPADST_DCT, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(DCT_FLIPADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(ADST_FLIPADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(FLIPADST_ADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(FLIPADST_DCT, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(DCT_FLIPADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(ADST_FLIPADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(FLIPADST_ADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(FLIPADST_DCT, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(DCT_FLIPADST, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_16X16, 11, 0.04), + VP10InvTxfm2dParam(ADST_FLIPADST, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(FLIPADST_ADST, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(FLIPADST_DCT, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(DCT_FLIPADST, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(ADST_FLIPADST, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(FLIPADST_ADST, TX_32X32, 4, 0.4), +#endif + VP10InvTxfm2dParam(DCT_DCT, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(ADST_DCT, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(DCT_ADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(ADST_ADST, TX_4X4, 2, 0.002), + VP10InvTxfm2dParam(DCT_DCT, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(ADST_DCT, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(DCT_ADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(ADST_ADST, TX_8X8, 2, 0.02), + VP10InvTxfm2dParam(DCT_DCT, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(ADST_DCT, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(DCT_ADST, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(ADST_ADST, TX_16X16, 2, 0.04), + VP10InvTxfm2dParam(DCT_DCT, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(ADST_DCT, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(DCT_ADST, TX_32X32, 4, 0.4), + VP10InvTxfm2dParam(ADST_ADST, TX_32X32, 4, 0.4) +}; + INSTANTIATE_TEST_CASE_P( C, VP10InvTxfm2d, - ::testing::Values( -#if CONFIG_EXT_TX - VP10InvTxfm2dParam(FLIPADST_DCT, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(DCT_FLIPADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(ADST_FLIPADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(FLIPADST_ADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(FLIPADST_DCT, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(DCT_FLIPADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(ADST_FLIPADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(FLIPADST_ADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(FLIPADST_DCT, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(DCT_FLIPADST, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_16X16, 11, 0.04), - VP10InvTxfm2dParam(ADST_FLIPADST, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(FLIPADST_ADST, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(FLIPADST_DCT, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(DCT_FLIPADST, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(FLIPADST_FLIPADST, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(ADST_FLIPADST, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(FLIPADST_ADST, TX_32X32, 4, 0.4), -#endif - VP10InvTxfm2dParam(DCT_DCT, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(ADST_DCT, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(DCT_ADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(ADST_ADST, TX_4X4, 2, 0.002), - VP10InvTxfm2dParam(DCT_DCT, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(ADST_DCT, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(DCT_ADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(ADST_ADST, TX_8X8, 2, 0.02), - VP10InvTxfm2dParam(DCT_DCT, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(ADST_DCT, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(DCT_ADST, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(ADST_ADST, TX_16X16, 2, 0.04), - VP10InvTxfm2dParam(DCT_DCT, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(ADST_DCT, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(DCT_ADST, TX_32X32, 4, 0.4), - VP10InvTxfm2dParam(ADST_ADST, TX_32X32, 4, 0.4))); + ::testing::ValuesIn(vp10_inv_txfm2d_param)); #endif // CONFIG_VP9_HIGHBITDEPTH