Commit 218dfbd5 authored by Angie Chiang's avatar Angie Chiang

Change the naming of txfm#d_test

Change-Id: I151b18b38f7a000fb6e431cd42675ac4e7e9e3ca
parent ab759be8
......@@ -12,7 +12,7 @@
#include "test/vp10_txfm_test.h"
using libvpx_test::ACMRandom;
using libvpx_test::base;
using libvpx_test::input_base;
using libvpx_test::reference_hybrid_1d;
using libvpx_test::TYPE_TXFM;
using libvpx_test::TYPE_DCT;
......@@ -103,7 +103,7 @@ TEST(vp10_fwd_txfm1d, accuracy) {
if (fwd_txfm_func != NULL) {
for (int ti = 0; ti < count_test_block; ++ti) {
for (int ni = 0; ni < txfm_size; ++ni) {
input[ni] = rnd.Rand16() % base - rnd.Rand16() % base;
input[ni] = rnd.Rand16() % input_base - rnd.Rand16() % input_base;
ref_input[ni] = static_cast<double>(input[ni]);
}
......
......@@ -9,7 +9,7 @@
using libvpx_test::ACMRandom;
using libvpx_test::Fwd_Txfm2d_Func;
using libvpx_test::base;
using libvpx_test::input_base;
using libvpx_test::bd;
namespace {
......@@ -57,7 +57,7 @@ TEST(vp10_fwd_txfm2d_sse4_1, accuracy) {
// init input
for (int r = 0; r < txfm_size; r++) {
for (int c = 0; c < txfm_size; c++) {
input[r * txfm_size + c] = rnd.Rand16() % base;
input[r * txfm_size + c] = rnd.Rand16() % input_base;
}
}
......
......@@ -18,7 +18,7 @@
#include "./vp10_rtcd.h"
using libvpx_test::ACMRandom;
using libvpx_test::base;
using libvpx_test::input_base;
using libvpx_test::bd;
using libvpx_test::compute_avg_abs_error;
using libvpx_test::Fwd_Txfm2d_Func;
......@@ -77,7 +77,7 @@ TEST(vp10_fwd_txfm2d, accuracy) {
double avg_abs_error = 0;
for (int ci = 0; ci < count; ci++) {
for (int ni = 0; ni < sqr_txfm_size; ++ni) {
input[ni] = rnd.Rand16() % base;
input[ni] = rnd.Rand16() % input_base;
ref_input[ni] = static_cast<double>(input[ni]);
output[ni] = 0;
ref_output[ni] = 0;
......
......@@ -13,7 +13,7 @@
#include "vp10/common/vp10_inv_txfm1d.h"
using libvpx_test::ACMRandom;
using libvpx_test::base;
using libvpx_test::input_base;
namespace {
const int txfm_type_num = 2;
......@@ -53,7 +53,7 @@ TEST(vp10_inv_txfm1d, round_trip) {
const int count_test_block = 5000;
for (int ci = 0; ci < count_test_block; ++ci) {
for (int ni = 0; ni < txfm_size; ++ni) {
input[ni] = rnd.Rand16() % base - rnd.Rand16() % base;
input[ni] = rnd.Rand16() % input_base - rnd.Rand16() % input_base;
}
fwd_txfm_func(input, output, cos_bit, range_bit);
......
......@@ -19,7 +19,7 @@
#include "vp10/common/vp10_inv_txfm2d_cfg.h"
using libvpx_test::ACMRandom;
using libvpx_test::base;
using libvpx_test::input_base;
using libvpx_test::bd;
using libvpx_test::compute_avg_abs_error;
using libvpx_test::Fwd_Txfm2d_Func;
......@@ -85,11 +85,11 @@ TEST(vp10_inv_txfm2d, round_trip) {
for (int ci = 0; ci < count; ci++) {
for (int ni = 0; ni < sqr_txfm_size; ++ni) {
if (ci == 0) {
int extreme_input = base - 1;
int extreme_input = input_base - 1;
input[ni] = extreme_input; // extreme case
ref_input[ni] = 0;
} else {
input[ni] = rnd.Rand16() % base;
input[ni] = rnd.Rand16() % input_base;
ref_input[ni] = 0;
}
}
......
......@@ -109,6 +109,6 @@ typedef void (*Inv_Txfm2d_Func)(const int32_t*, uint16_t*, const int,
const TXFM_2D_CFG*, const int);
static const int bd = 10;
static const int base = (1 << bd);
static const int input_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