diff options
author | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:15 -0500 |
---|---|---|
committer | trav90 <travawine@palemoon.org> | 2018-10-19 21:52:20 -0500 |
commit | bbcc64772580c8a979288791afa02d30bc476d2e (patch) | |
tree | 437ce94c3fdd7497508e5b55de06c6d011678597 /third_party/aom/test/av1_inv_txfm2d_test.cc | |
parent | 14805f6ddbfb173c327768fff9f81f40ce5e81b0 (diff) | |
download | UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.gz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.lz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.tar.xz UXP-bbcc64772580c8a979288791afa02d30bc476d2e.zip |
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
Diffstat (limited to 'third_party/aom/test/av1_inv_txfm2d_test.cc')
-rw-r--r-- | third_party/aom/test/av1_inv_txfm2d_test.cc | 391 |
1 files changed, 271 insertions, 120 deletions
diff --git a/third_party/aom/test/av1_inv_txfm2d_test.cc b/third_party/aom/test/av1_inv_txfm2d_test.cc index bccbdeebf..461e7ebcd 100644 --- a/third_party/aom/test/av1_inv_txfm2d_test.cc +++ b/third_party/aom/test/av1_inv_txfm2d_test.cc @@ -12,26 +12,35 @@ #include <math.h> #include <stdio.h> #include <stdlib.h> +#include <vector> -#include "./av1_rtcd.h" +#include "config/av1_rtcd.h" + +#include "aom_ports/aom_timer.h" +#include "av1/common/av1_inv_txfm1d_cfg.h" +#include "av1/common/scan.h" #include "test/acm_random.h" -#include "test/util.h" #include "test/av1_txfm_test.h" -#include "av1/common/av1_inv_txfm1d_cfg.h" +#include "test/util.h" using libaom_test::ACMRandom; -using libaom_test::input_base; +using libaom_test::InvTxfm2dFunc; +using libaom_test::LbdInvTxfm2dFunc; using libaom_test::bd; using libaom_test::compute_avg_abs_error; -using libaom_test::Fwd_Txfm2d_Func; -using libaom_test::Inv_Txfm2d_Func; +using libaom_test::input_base; + +using ::testing::Combine; +using ::testing::Range; +using ::testing::Values; + +using std::vector; namespace { -#if CONFIG_HIGHBITDEPTH // AV1InvTxfm2dParam argument list: // tx_type_, tx_size_, max_error_, max_avg_error_ -typedef std::tr1::tuple<TX_TYPE, TX_SIZE, int, double> AV1InvTxfm2dParam; +typedef ::testing::tuple<TX_TYPE, TX_SIZE, int, double> AV1InvTxfm2dParam; class AV1InvTxfm2d : public ::testing::TestWithParam<AV1InvTxfm2dParam> { public: @@ -46,171 +55,313 @@ class AV1InvTxfm2d : public ::testing::TestWithParam<AV1InvTxfm2dParam> { int tx_w = tx_size_wide[tx_size_]; int tx_h = tx_size_high[tx_size_]; int txfm2d_size = tx_w * tx_h; - const Fwd_Txfm2d_Func fwd_txfm_func = - libaom_test::fwd_txfm_func_ls[tx_size_]; - const Inv_Txfm2d_Func inv_txfm_func = - libaom_test::inv_txfm_func_ls[tx_size_]; + const FwdTxfm2dFunc fwd_txfm_func = libaom_test::fwd_txfm_func_ls[tx_size_]; + const InvTxfm2dFunc inv_txfm_func = libaom_test::inv_txfm_func_ls[tx_size_]; double avg_abs_error = 0; ACMRandom rnd(ACMRandom::DeterministicSeed()); const int count = 500; for (int ci = 0; ci < count; ci++) { - int16_t expected[64 * 64] = { 0 }; - ASSERT_LT(txfm2d_size, NELEMENTS(expected)); + DECLARE_ALIGNED(16, int16_t, input[64 * 64]) = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(input)); for (int ni = 0; ni < txfm2d_size; ++ni) { if (ci == 0) { int extreme_input = input_base - 1; - expected[ni] = extreme_input; // extreme case + input[ni] = extreme_input; // extreme case } else { - expected[ni] = rnd.Rand16() % input_base; + input[ni] = rnd.Rand16() % input_base; } } - int32_t coeffs[64 * 64] = { 0 }; - ASSERT_LT(txfm2d_size, NELEMENTS(coeffs)); - fwd_txfm_func(expected, coeffs, tx_w, tx_type_, bd); + DECLARE_ALIGNED(16, uint16_t, expected[64 * 64]) = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(expected)); + if (TxfmUsesApproximation()) { + // Compare reference forward HT + inverse HT vs forward HT + inverse HT. + double ref_input[64 * 64]; + ASSERT_LE(txfm2d_size, NELEMENTS(ref_input)); + for (int ni = 0; ni < txfm2d_size; ++ni) { + ref_input[ni] = input[ni]; + } + double ref_coeffs[64 * 64] = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(ref_coeffs)); + ASSERT_EQ(tx_type_, DCT_DCT); + libaom_test::reference_hybrid_2d(ref_input, ref_coeffs, tx_type_, + tx_size_); + DECLARE_ALIGNED(16, int32_t, ref_coeffs_int[64 * 64]) = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(ref_coeffs_int)); + for (int ni = 0; ni < txfm2d_size; ++ni) { + ref_coeffs_int[ni] = (int32_t)round(ref_coeffs[ni]); + } + inv_txfm_func(ref_coeffs_int, expected, tx_w, tx_type_, bd); + } else { + // Compare original input vs forward HT + inverse HT. + for (int ni = 0; ni < txfm2d_size; ++ni) { + expected[ni] = input[ni]; + } + } + + DECLARE_ALIGNED(16, int32_t, coeffs[64 * 64]) = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(coeffs)); + fwd_txfm_func(input, coeffs, tx_w, tx_type_, bd); - uint16_t actual[64 * 64] = { 0 }; - ASSERT_LT(txfm2d_size, NELEMENTS(actual)); + DECLARE_ALIGNED(16, uint16_t, actual[64 * 64]) = { 0 }; + ASSERT_LE(txfm2d_size, NELEMENTS(actual)); inv_txfm_func(coeffs, actual, tx_w, tx_type_, bd); + double actual_max_error = 0; for (int ni = 0; ni < txfm2d_size; ++ni) { - EXPECT_GE(max_error_, abs(expected[ni] - actual[ni])); + const double this_error = abs(expected[ni] - actual[ni]); + actual_max_error = AOMMAX(actual_max_error, this_error); + } + EXPECT_GE(max_error_, actual_max_error) + << " tx_w: " << tx_w << " tx_h " << tx_h << " tx_type: " << tx_type_; + if (actual_max_error > max_error_) { // exit early. + break; } - avg_abs_error += compute_avg_abs_error<int16_t, uint16_t>( + avg_abs_error += compute_avg_abs_error<uint16_t, uint16_t>( expected, actual, txfm2d_size); } avg_abs_error /= count; - // max_abs_avg_error comes from upper bound of - // printf("txfm1d_size: %d accuracy_avg_abs_error: %f\n", - // txfm1d_size_, avg_abs_error); EXPECT_GE(max_avg_error_, avg_abs_error) << " tx_w: " << tx_w << " tx_h " << tx_h << " tx_type: " << tx_type_; } private: + bool TxfmUsesApproximation() { + if (tx_size_wide[tx_size_] == 64 || tx_size_high[tx_size_] == 64) { + return true; + } + return false; + } + int max_error_; double max_avg_error_; TX_TYPE tx_type_; TX_SIZE tx_size_; }; -TEST_P(AV1InvTxfm2d, RunRoundtripCheck) { RunRoundtripCheck(); } +static int max_error_ls[TX_SIZES_ALL] = { + 2, // 4x4 transform + 2, // 8x8 transform + 2, // 16x16 transform + 4, // 32x32 transform + 3, // 64x64 transform + 2, // 4x8 transform + 2, // 8x4 transform + 2, // 8x16 transform + 2, // 16x8 transform + 3, // 16x32 transform + 3, // 32x16 transform + 5, // 32x64 transform + 5, // 64x32 transform + 2, // 4x16 transform + 2, // 16x4 transform + 2, // 8x32 transform + 2, // 32x8 transform + 3, // 16x64 transform + 3, // 64x16 transform +}; -const AV1InvTxfm2dParam av1_inv_txfm2d_param[] = { -#if CONFIG_EXT_TX -#if CONFIG_RECT_TX - AV1InvTxfm2dParam(DCT_DCT, TX_4X8, 2, 0.007), - AV1InvTxfm2dParam(ADST_DCT, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(DCT_ADST, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(ADST_ADST, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_4X8, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_4X8, 2, 0.012), - - AV1InvTxfm2dParam(DCT_DCT, TX_8X4, 2, 0.007), - AV1InvTxfm2dParam(ADST_DCT, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(DCT_ADST, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(ADST_ADST, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_8X4, 2, 0.007), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_8X4, 2, 0.012), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_8X4, 2, 0.012), - - AV1InvTxfm2dParam(DCT_DCT, TX_8X16, 2, 0.025), - AV1InvTxfm2dParam(ADST_DCT, TX_8X16, 2, 0.020), - AV1InvTxfm2dParam(DCT_ADST, TX_8X16, 2, 0.027), - AV1InvTxfm2dParam(ADST_ADST, TX_8X16, 2, 0.023), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_8X16, 2, 0.020), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_8X16, 2, 0.027), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_8X16, 2, 0.032), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_8X16, 2, 0.023), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_8X16, 2, 0.023), - - AV1InvTxfm2dParam(DCT_DCT, TX_16X8, 2, 0.007), - AV1InvTxfm2dParam(ADST_DCT, TX_16X8, 2, 0.012), - AV1InvTxfm2dParam(DCT_ADST, TX_16X8, 2, 0.024), - AV1InvTxfm2dParam(ADST_ADST, TX_16X8, 2, 0.033), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_16X8, 2, 0.015), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_16X8, 2, 0.032), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_16X8, 2, 0.032), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_16X8, 2, 0.033), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_16X8, 2, 0.032), -#endif - AV1InvTxfm2dParam(FLIPADST_DCT, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_16X16, 11, 0.04), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(FLIPADST_DCT, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(DCT_FLIPADST, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(FLIPADST_FLIPADST, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(ADST_FLIPADST, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(FLIPADST_ADST, TX_32X32, 4, 0.4), -#endif - AV1InvTxfm2dParam(DCT_DCT, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(ADST_DCT, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(DCT_ADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(ADST_ADST, TX_4X4, 2, 0.002), - AV1InvTxfm2dParam(DCT_DCT, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(ADST_DCT, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(DCT_ADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(ADST_ADST, TX_8X8, 2, 0.02), - AV1InvTxfm2dParam(DCT_DCT, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(ADST_DCT, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(DCT_ADST, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(ADST_ADST, TX_16X16, 2, 0.04), - AV1InvTxfm2dParam(DCT_DCT, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(ADST_DCT, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(DCT_ADST, TX_32X32, 4, 0.4), - AV1InvTxfm2dParam(ADST_ADST, TX_32X32, 4, 0.4) +static double avg_error_ls[TX_SIZES_ALL] = { + 0.002, // 4x4 transform + 0.05, // 8x8 transform + 0.07, // 16x16 transform + 0.4, // 32x32 transform + 0.3, // 64x64 transform + 0.02, // 4x8 transform + 0.02, // 8x4 transform + 0.04, // 8x16 transform + 0.07, // 16x8 transform + 0.4, // 16x32 transform + 0.5, // 32x16 transform + 0.38, // 32x64 transform + 0.39, // 64x32 transform + 0.2, // 4x16 transform + 0.2, // 16x4 transform + 0.2, // 8x32 transform + 0.2, // 32x8 transform + 0.38, // 16x64 transform + 0.38, // 64x16 transform }; +vector<AV1InvTxfm2dParam> GetInvTxfm2dParamList() { + vector<AV1InvTxfm2dParam> param_list; + for (int s = 0; s < TX_SIZES; ++s) { + const int max_error = max_error_ls[s]; + const double avg_error = avg_error_ls[s]; + for (int t = 0; t < TX_TYPES; ++t) { + const TX_TYPE tx_type = static_cast<TX_TYPE>(t); + const TX_SIZE tx_size = static_cast<TX_SIZE>(s); + if (libaom_test::IsTxSizeTypeValid(tx_size, tx_type)) { + param_list.push_back( + AV1InvTxfm2dParam(tx_type, tx_size, max_error, avg_error)); + } + } + } + return param_list; +} + INSTANTIATE_TEST_CASE_P(C, AV1InvTxfm2d, - ::testing::ValuesIn(av1_inv_txfm2d_param)); + ::testing::ValuesIn(GetInvTxfm2dParamList())); + +TEST_P(AV1InvTxfm2d, RunRoundtripCheck) { RunRoundtripCheck(); } TEST(AV1InvTxfm2d, CfgTest) { for (int bd_idx = 0; bd_idx < BD_NUM; ++bd_idx) { int bd = libaom_test::bd_arr[bd_idx]; int8_t low_range = libaom_test::low_range_arr[bd_idx]; int8_t high_range = libaom_test::high_range_arr[bd_idx]; - // TODO(angiebird): include rect txfm in this test - for (int tx_size = 0; tx_size < TX_SIZES; ++tx_size) { + for (int tx_size = 0; tx_size < TX_SIZES_ALL; ++tx_size) { for (int tx_type = 0; tx_type < TX_TYPES; ++tx_type) { - TXFM_2D_FLIP_CFG cfg = av1_get_inv_txfm_cfg( - static_cast<TX_TYPE>(tx_type), static_cast<TX_SIZE>(tx_size)); + if (libaom_test::IsTxSizeTypeValid(static_cast<TX_SIZE>(tx_size), + static_cast<TX_TYPE>(tx_type)) == + false) { + continue; + } + TXFM_2D_FLIP_CFG cfg; + av1_get_inv_txfm_cfg(static_cast<TX_TYPE>(tx_type), + static_cast<TX_SIZE>(tx_size), &cfg); int8_t stage_range_col[MAX_TXFM_STAGE_NUM]; int8_t stage_range_row[MAX_TXFM_STAGE_NUM]; av1_gen_inv_stage_range(stage_range_col, stage_range_row, &cfg, - fwd_shift_sum[tx_size], bd); - const TXFM_1D_CFG *col_cfg = cfg.col_cfg; - const TXFM_1D_CFG *row_cfg = cfg.row_cfg; - libaom_test::txfm_stage_range_check(stage_range_col, col_cfg->stage_num, - col_cfg->cos_bit, low_range, + (TX_SIZE)tx_size, bd); + libaom_test::txfm_stage_range_check(stage_range_col, cfg.stage_num_col, + cfg.cos_bit_col, low_range, high_range); - libaom_test::txfm_stage_range_check(stage_range_row, row_cfg->stage_num, - row_cfg->cos_bit, low_range, + libaom_test::txfm_stage_range_check(stage_range_row, cfg.stage_num_row, + cfg.cos_bit_row, low_range, high_range); } } } } -#endif // CONFIG_HIGHBITDEPTH + +typedef ::testing::tuple<const LbdInvTxfm2dFunc> AV1LbdInvTxfm2dParam; +class AV1LbdInvTxfm2d : public ::testing::TestWithParam<AV1LbdInvTxfm2dParam> { + public: + virtual void SetUp() { target_func_ = GET_PARAM(0); } + void RunAV1InvTxfm2dTest(TX_TYPE tx_type, TX_SIZE tx_size, int run_times); + + private: + LbdInvTxfm2dFunc target_func_; +}; + +void AV1LbdInvTxfm2d::RunAV1InvTxfm2dTest(TX_TYPE tx_type, TX_SIZE tx_size, + int run_times) { + FwdTxfm2dFunc fwd_func_ = libaom_test::fwd_txfm_func_ls[tx_size]; + InvTxfm2dFunc ref_func_ = libaom_test::inv_txfm_func_ls[tx_size]; + if (fwd_func_ == NULL || ref_func_ == NULL || target_func_ == NULL) { + return; + } + const int bd = 8; + const int BLK_WIDTH = 64; + const int BLK_SIZE = BLK_WIDTH * BLK_WIDTH; + DECLARE_ALIGNED(16, int16_t, input[BLK_SIZE]) = { 0 }; + DECLARE_ALIGNED(32, int32_t, inv_input[BLK_SIZE]) = { 0 }; + DECLARE_ALIGNED(16, uint8_t, output[BLK_SIZE]) = { 0 }; + DECLARE_ALIGNED(16, uint16_t, ref_output[BLK_SIZE]) = { 0 }; + int stride = BLK_WIDTH; + int rows = tx_size_high[tx_size]; + int cols = tx_size_wide[tx_size]; + const int rows_nonezero = AOMMIN(32, rows); + const int cols_nonezero = AOMMIN(32, cols); + run_times /= (rows * cols); + run_times = AOMMAX(1, run_times); + const SCAN_ORDER *scan_order = get_default_scan(tx_size, tx_type); + const int16_t *scan = scan_order->scan; + const int16_t eobmax = rows_nonezero * cols_nonezero; + ACMRandom rnd(ACMRandom::DeterministicSeed()); + int randTimes = run_times == 1 ? (eobmax + 500) : 1; + for (int cnt = 0; cnt < randTimes; ++cnt) { + const int16_t max_in = (1 << (bd)) - 1; + for (int r = 0; r < BLK_WIDTH; ++r) { + for (int c = 0; c < BLK_WIDTH; ++c) { + input[r * cols + c] = (cnt == 0) ? max_in : rnd.Rand8Extremes(); + output[r * stride + c] = (cnt == 0) ? 128 : rnd.Rand8(); + ref_output[r * stride + c] = output[r * stride + c]; + } + } + fwd_func_(input, inv_input, stride, tx_type, bd); + + // produce eob input by setting high freq coeffs to zero + const int eob = AOMMIN(cnt + 1, eobmax); + for (int i = eob; i < eobmax; i++) { + inv_input[scan[i]] = 0; + } + + aom_usec_timer timer; + aom_usec_timer_start(&timer); + for (int i = 0; i < run_times; ++i) { + ref_func_(inv_input, ref_output, stride, tx_type, bd); + } + aom_usec_timer_mark(&timer); + const double time1 = static_cast<double>(aom_usec_timer_elapsed(&timer)); + aom_usec_timer_start(&timer); + for (int i = 0; i < run_times; ++i) { + target_func_(inv_input, output, stride, tx_type, tx_size, eob); + } + aom_usec_timer_mark(&timer); + const double time2 = static_cast<double>(aom_usec_timer_elapsed(&timer)); + if (run_times > 10) { + printf("txfm[%d] %3dx%-3d:%7.2f/%7.2fns", tx_type, cols, rows, time1, + time2); + printf("(%3.2f)\n", time1 / time2); + } + for (int r = 0; r < rows; ++r) { + for (int c = 0; c < cols; ++c) { + uint8_t ref_value = static_cast<uint8_t>(ref_output[r * stride + c]); + ASSERT_EQ(ref_value, output[r * stride + c]) + << "[" << r << "," << c << "] " << cnt + << " tx_size: " << static_cast<int>(tx_size) + << " tx_type: " << tx_type << " eob " << eob; + } + } + } +} + +TEST_P(AV1LbdInvTxfm2d, match) { + for (int j = 0; j < (int)(TX_SIZES_ALL); ++j) { + for (int i = 0; i < (int)TX_TYPES; ++i) { + if (libaom_test::IsTxSizeTypeValid(static_cast<TX_SIZE>(j), + static_cast<TX_TYPE>(i))) { + RunAV1InvTxfm2dTest(static_cast<TX_TYPE>(i), static_cast<TX_SIZE>(j), + 1); + } + } + } +} + +TEST_P(AV1LbdInvTxfm2d, DISABLED_Speed) { + for (int j = 0; j < (int)(TX_SIZES_ALL); ++j) { + for (int i = 0; i < (int)TX_TYPES; ++i) { + if (libaom_test::IsTxSizeTypeValid(static_cast<TX_SIZE>(j), + static_cast<TX_TYPE>(i))) { + RunAV1InvTxfm2dTest(static_cast<TX_TYPE>(i), static_cast<TX_SIZE>(j), + 10000000); + } + } + } +} + +#if HAVE_SSSE3 +#if defined(_MSC_VER) || defined(__SSSE3__) +#include "av1/common/x86/av1_inv_txfm_ssse3.h" +INSTANTIATE_TEST_CASE_P(SSSE3, AV1LbdInvTxfm2d, + ::testing::Values(av1_lowbd_inv_txfm2d_add_ssse3)); +#endif // _MSC_VER || __SSSE3__ +#endif // HAVE_SSSE3 + +#if HAVE_AVX2 +extern "C" void av1_lowbd_inv_txfm2d_add_avx2(const int32_t *input, + uint8_t *output, int stride, + TX_TYPE tx_type, TX_SIZE tx_size, + int eob); + +INSTANTIATE_TEST_CASE_P(AVX2, AV1LbdInvTxfm2d, + ::testing::Values(av1_lowbd_inv_txfm2d_add_avx2)); +#endif // HAVE_AVX2 } // namespace |