Commit 29a06a17 authored by Angie Chiang's avatar Angie Chiang

Put vp10_txfm_test.h into libvpx_test namespace

Change-Id: I32ff059143d777fa4518d8e404ff16c890c7fecb
parent c3e07b22
......@@ -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);
......
......@@ -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
......@@ -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());
......
......@@ -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
......@@ -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_
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment