Add unit tests for 4x4, 8x8, 16x16 hybrid txfm

- Add TODO note for unoptimized tx_type in inv txfm.
- Add TODO note for a unit test code cleanup.

Change-Id: I75527b14370174102ab127ebfc12d4a4c20fbe21
This commit is contained in:
Yi Luo 2016-11-17 14:56:43 -08:00
Родитель d3fada809c
Коммит 8245b9a3e2
3 изменённых файлов: 27 добавлений и 0 удалений

Просмотреть файл

@ -85,6 +85,9 @@ class AV1Trans16x16HT : public libaom_test::TransformTestBase,
IhtFunc inv_txfm_;
};
TEST_P(AV1Trans16x16HT, MemCheck) { RunMemCheck(); }
TEST_P(AV1Trans16x16HT, AccuracyCheck) { RunAccuracyCheck(1); }
TEST_P(AV1Trans16x16HT, InvAccuracyCheck) { RunInvAccuracyCheck(1); }
TEST_P(AV1Trans16x16HT, CoeffCheck) { RunCoeffCheck(); }
TEST_P(AV1Trans16x16HT, InvCoeffCheck) { RunInvCoeffCheck(); }

Просмотреть файл

@ -33,6 +33,10 @@ void fht4x4_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
av1_fht4x4_c(in, out, stride, tx_type);
}
void iht4x4_ref(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
av1_iht4x4_16_add_c(in, out, stride, tx_type);
}
#if CONFIG_AOM_HIGHBITDEPTH
typedef void (*IhighbdHtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type, int bd);
@ -61,6 +65,7 @@ class AV1Trans4x4HT : public libaom_test::TransformTestBase,
pitch_ = 4;
height_ = 4;
fwd_txfm_ref = fht4x4_ref;
inv_txfm_ref = iht4x4_ref;
bit_depth_ = GET_PARAM(3);
mask_ = (1 << bit_depth_) - 1;
num_coeffs_ = GET_PARAM(4);
@ -80,7 +85,14 @@ class AV1Trans4x4HT : public libaom_test::TransformTestBase,
IhtFunc inv_txfm_;
};
TEST_P(AV1Trans4x4HT, MemCheck) { RunMemCheck(); }
TEST_P(AV1Trans4x4HT, CoeffCheck) { RunCoeffCheck(); }
// Note:
// TODO(luoyi): Add tx_type, 9-15 for inverse transform.
// Need cleanup since same tests may be done in fdct4x4_test.cc
// TEST_P(AV1Trans4x4HT, AccuracyCheck) { RunAccuracyCheck(0); }
// TEST_P(AV1Trans4x4HT, InvAccuracyCheck) { RunInvAccuracyCheck(0); }
// TEST_P(AV1Trans4x4HT, InvCoeffCheck) { RunInvCoeffCheck(); }
#if CONFIG_AOM_HIGHBITDEPTH
class AV1HighbdTrans4x4HT : public ::testing::TestWithParam<HighbdHt4x4Param> {

Просмотреть файл

@ -34,6 +34,10 @@ void fht8x8_ref(const int16_t *in, tran_low_t *out, int stride, int tx_type) {
av1_fht8x8_c(in, out, stride, tx_type);
}
void iht8x8_ref(const tran_low_t *in, uint8_t *out, int stride, int tx_type) {
av1_iht8x8_64_add_c(in, out, stride, tx_type);
}
#if CONFIG_AOM_HIGHBITDEPTH
typedef void (*IHbdHtFunc)(const tran_low_t *in, uint8_t *out, int stride,
int tx_type, int bd);
@ -60,6 +64,7 @@ class AV1Trans8x8HT : public libaom_test::TransformTestBase,
pitch_ = 8;
height_ = 8;
fwd_txfm_ref = fht8x8_ref;
inv_txfm_ref = iht8x8_ref;
bit_depth_ = GET_PARAM(3);
mask_ = (1 << bit_depth_) - 1;
num_coeffs_ = GET_PARAM(4);
@ -79,7 +84,14 @@ class AV1Trans8x8HT : public libaom_test::TransformTestBase,
IhtFunc inv_txfm_;
};
TEST_P(AV1Trans8x8HT, MemCheck) { RunMemCheck(); }
TEST_P(AV1Trans8x8HT, CoeffCheck) { RunCoeffCheck(); }
// Note:
// TODO(luoyi): Add tx_type, 9-15 for inverse transform.
// Need cleanup since same tests may be done in fdct8x8_test.cc
// TEST_P(AV1Trans8x8HT, AccuracyCheck) { RunAccuracyCheck(0); }
// TEST_P(AV1Trans8x8HT, InvAccuracyCheck) { RunInvAccuracyCheck(0); }
// TEST_P(AV1Trans8x8HT, InvCoeffCheck) { RunInvCoeffCheck(); }
#if CONFIG_AOM_HIGHBITDEPTH
class AV1HighbdTrans8x8HT : public ::testing::TestWithParam<HighbdHt8x8Param> {