From 29a06a173388c9701d19e488095b7d4c3625cb98 Mon Sep 17 00:00:00 2001 From: Angie Chiang Date: Tue, 29 Mar 2016 14:27:50 -0700 Subject: [PATCH] Put vp10_txfm_test.h into libvpx_test namespace Change-Id: I32ff059143d777fa4518d8e404ff16c890c7fecb --- test/vp10_fwd_txfm1d_test.cc | 19 ++++++++++++------- test/vp10_fwd_txfm2d_test.cc | 9 ++++++++- test/vp10_inv_txfm1d_test.cc | 15 ++++++++------- test/vp10_inv_txfm2d_test.cc | 7 ++++++- test/vp10_txfm_test.h | 3 ++- 5 files changed, 36 insertions(+), 17 deletions(-) diff --git a/test/vp10_fwd_txfm1d_test.cc b/test/vp10_fwd_txfm1d_test.cc index 2d09e0d32..d6643e5b9 100644 --- a/test/vp10_fwd_txfm1d_test.cc +++ b/test/vp10_fwd_txfm1d_test.cc @@ -12,23 +12,28 @@ #include "test/vp10_txfm_test.h" using libvpx_test::ACMRandom; +using libvpx_test::base; +using libvpx_test::reference_hybrid_1d; +using libvpx_test::TYPE_TXFM; +using libvpx_test::TYPE_DCT; +using libvpx_test::TYPE_ADST; namespace { -static int txfm_type_num = 2; -static TYPE_TXFM txfm_type_ls[2] = {TYPE_DCT, TYPE_ADST}; +const int txfm_type_num = 2; +const TYPE_TXFM txfm_type_ls[2] = {TYPE_DCT, TYPE_ADST}; -static int txfm_size_num = 5; -static int txfm_size_ls[5] = {4, 8, 16, 32, 64}; +const int txfm_size_num = 5; +const int txfm_size_ls[5] = {4, 8, 16, 32, 64}; -static TxfmFunc fwd_txfm_func_ls[2][5] = { +const TxfmFunc fwd_txfm_func_ls[2][5] = { {vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new, vp10_fdct64_new}, {vp10_fadst4_new, vp10_fadst8_new, vp10_fadst16_new, vp10_fadst32_new, NULL}}; // the maximum stage number of fwd/inv 1d dct/adst txfm is 12 -static int8_t cos_bit[12] = {14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14}; -static int8_t range_bit[12] = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}; +const int8_t cos_bit[12] = {14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14}; +const int8_t range_bit[12] = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}; TEST(vp10_fwd_txfm1d, round_shift) { EXPECT_EQ(round_shift(7, 1), 4); diff --git a/test/vp10_fwd_txfm2d_test.cc b/test/vp10_fwd_txfm2d_test.cc index 137f6531e..adf00a8f8 100644 --- a/test/vp10_fwd_txfm2d_test.cc +++ b/test/vp10_fwd_txfm2d_test.cc @@ -18,6 +18,13 @@ #include "./vp10_rtcd.h" using libvpx_test::ACMRandom; +using libvpx_test::base; +using libvpx_test::bd; +using libvpx_test::compute_avg_abs_error; +using libvpx_test::Fwd_Txfm2d_Func; +using libvpx_test::TYPE_TXFM; +using libvpx_test::TYPE_DCT; +using libvpx_test::TYPE_ADST; namespace { @@ -106,4 +113,4 @@ TEST(vp10_fwd_txfm2d, accuracy) { } #endif // CONFIG_VP9_HIGHBITDEPTH -} // anonymous namespace +} // namespace diff --git a/test/vp10_inv_txfm1d_test.cc b/test/vp10_inv_txfm1d_test.cc index 2e9e58d43..98b277735 100644 --- a/test/vp10_inv_txfm1d_test.cc +++ b/test/vp10_inv_txfm1d_test.cc @@ -13,27 +13,28 @@ #include "vp10/common/vp10_inv_txfm1d.h" using libvpx_test::ACMRandom; +using libvpx_test::base; namespace { -static int txfm_type_num = 2; -static int txfm_size_num = 5; -static int txfm_size_ls[5] = {4, 8, 16, 32, 64}; +const int txfm_type_num = 2; +const int txfm_size_num = 5; +const int txfm_size_ls[5] = {4, 8, 16, 32, 64}; -static TxfmFunc fwd_txfm_func_ls[2][5] = { +const TxfmFunc fwd_txfm_func_ls[2][5] = { {vp10_fdct4_new, vp10_fdct8_new, vp10_fdct16_new, vp10_fdct32_new, vp10_fdct64_new}, {vp10_fadst4_new, vp10_fadst8_new, vp10_fadst16_new, vp10_fadst32_new, NULL}}; -static TxfmFunc inv_txfm_func_ls[2][5] = { +const TxfmFunc inv_txfm_func_ls[2][5] = { {vp10_idct4_new, vp10_idct8_new, vp10_idct16_new, vp10_idct32_new, vp10_idct64_new}, {vp10_iadst4_new, vp10_iadst8_new, vp10_iadst16_new, vp10_iadst32_new, NULL}}; // the maximum stage number of fwd/inv 1d dct/adst txfm is 12 -static int8_t cos_bit[12] = {14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14}; -static int8_t range_bit[12] = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}; +const int8_t cos_bit[12] = {14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14, 14}; +const int8_t range_bit[12] = {32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32, 32}; TEST(vp10_inv_txfm1d, round_trip) { ACMRandom rnd(ACMRandom::DeterministicSeed()); diff --git a/test/vp10_inv_txfm2d_test.cc b/test/vp10_inv_txfm2d_test.cc index 9257244cd..7acb3290a 100644 --- a/test/vp10_inv_txfm2d_test.cc +++ b/test/vp10_inv_txfm2d_test.cc @@ -19,6 +19,11 @@ #include "vp10/common/vp10_inv_txfm2d_cfg.h" using libvpx_test::ACMRandom; +using libvpx_test::base; +using libvpx_test::bd; +using libvpx_test::compute_avg_abs_error; +using libvpx_test::Fwd_Txfm2d_Func; +using libvpx_test::Inv_Txfm2d_Func; namespace { @@ -116,4 +121,4 @@ TEST(vp10_inv_txfm2d, round_trip) { } #endif // CONFIG_VP9_HIGHBITDEPTH -} // anonymous namespace +} // namespace diff --git a/test/vp10_txfm_test.h b/test/vp10_txfm_test.h index a3a4258f9..c5bbb4842 100644 --- a/test/vp10_txfm_test.h +++ b/test/vp10_txfm_test.h @@ -23,6 +23,7 @@ #include "test/acm_random.h" #include "vp10/common/vp10_txfm.h" +namespace libvpx_test { typedef enum { TYPE_DCT = 0, TYPE_ADST, @@ -109,5 +110,5 @@ typedef void (*Inv_Txfm2d_Func)(const int32_t*, uint16_t*, const int, static const int bd = 10; static const int base = (1 << bd); - +} // namespace libvpx_test #endif // VP10_TXFM_TEST_H_ -- 2.40.0