fix compile error LLVM-9.1
Error encountered:
- use of c++17 ctor
- use of template with anonymous enum
- GTEST template don't support pointer-to-function + tuples well.
=========================
aom/test/time_stamp_test.cc:32:19: error: expected expression
: timebase_({{ num, den }}), framerate_numerator_(30),
^
aom/test/time_stamp_test.cc:31:32: warning: unused parameter 'num' [-Wunused-parameter]
DummyTimebaseVideoSource(int num, int den)
^
aom/test/time_stamp_test.cc:31:41: warning: unused parameter 'den' [-Wunused-parameter]
DummyTimebaseVideoSource(int num, int den)
=========================
warning: template argument uses unnamed type
[-Wunnamed-type-template-args]
inline GTEST_5_TUPLE_(T) make_tuple(const T0& f0, const T1& f1, const T2& f2,
^~~~~~~~~~~~~~~~~
aom/third_party/googletest/src/googletest/include/gtest/internal/gtest-tuple.h:74:45: note: expanded from macro 'GTEST_5_TUPLE_'
^~~~
<scratch space>:775:1: note: expanded from here
T2
^~
aom/av1/common/enums.h:155:1: note: unnamed type used in template argument was declared here
enum {
^
=========================
error: data member instantiated with function type 'double
(unsigned char *, int, int, int, unsigned char *, int, int, int)'
T1 f1_;
^
aom/test/corner_match_test.cc:130:23: note: in instantiation of template class 'std::tr1::tuple<int, double (unsigned char *, int, int, int, unsigned
char *, int, int, int), void, void, void, void, void, void, void, void>' requested here
::testing::Values(make_tuple(0, compute_cross_correlation_sse4_1),
=========================
Change-Id: Id3354c68d5080b2ce7d7d1889310a408c58b2c9e
diff --git a/test/av1_inv_txfm1d_test.cc b/test/av1_inv_txfm1d_test.cc
index 2926ae6..0fc2b03 100644
--- a/test/av1_inv_txfm1d_test.cc
+++ b/test/av1_inv_txfm1d_test.cc
@@ -16,6 +16,8 @@
#include "av1/common/av1_inv_txfm1d.h"
#include "av1/encoder/av1_fwd_txfm1d.h"
+typedef TX_SIZE TxSize;
+
using libaom_test::ACMRandom;
using libaom_test::input_base;
@@ -77,7 +79,7 @@
ASSERT_EQ(NELEMENTS(inv_txfm_func_ls), TX_SIZES);
for (int k = 0; k < count_test_block; ++k) {
// choose a random transform to test
- const TX_SIZE tx_size = static_cast<TX_SIZE>(rnd.Rand8() % TX_SIZES);
+ const TxSize tx_size = static_cast<TxSize>(rnd.Rand8() % TX_SIZES);
const int tx_size_pix = txfm_size_ls[tx_size];
const TxfmFunc inv_txfm_func = inv_txfm_func_ls[tx_size][0];
diff --git a/test/av1_inv_txfm2d_test.cc b/test/av1_inv_txfm2d_test.cc
index 75040c26..df3bafb 100644
--- a/test/av1_inv_txfm2d_test.cc
+++ b/test/av1_inv_txfm2d_test.cc
@@ -36,6 +36,9 @@
using std::vector;
+typedef TX_TYPE TxType;
+typedef TX_SIZE TxSize;
+
namespace {
static const char *tx_type_name[] = {
@@ -59,7 +62,7 @@
// AV1InvTxfm2dParam argument list:
// tx_type_, tx_size_, max_error_, max_avg_error_
-typedef ::testing::tuple<TX_TYPE, TX_SIZE, int, double> AV1InvTxfm2dParam;
+typedef ::testing::tuple<TxType, TxSize, int, double> AV1InvTxfm2dParam;
class AV1InvTxfm2d : public ::testing::TestWithParam<AV1InvTxfm2dParam> {
public:
@@ -105,7 +108,7 @@
}
double ref_coeffs[64 * 64] = { 0 };
ASSERT_LE(txfm2d_size, NELEMENTS(ref_coeffs));
- ASSERT_EQ(tx_type_, DCT_DCT);
+ ASSERT_EQ(tx_type_, static_cast<TxType>(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 };
@@ -158,8 +161,8 @@
int max_error_;
double max_avg_error_;
- TX_TYPE tx_type_;
- TX_SIZE tx_size_;
+ TxType tx_type_;
+ TxSize tx_size_;
};
static int max_error_ls[TX_SIZES_ALL] = {
@@ -212,8 +215,8 @@
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);
+ const TxType tx_type = static_cast<TxType>(t);
+ const TxSize tx_size = static_cast<TxSize>(s);
if (libaom_test::IsTxSizeTypeValid(tx_size, tx_type)) {
param_list.push_back(
AV1InvTxfm2dParam(tx_type, tx_size, max_error, avg_error));
@@ -235,18 +238,18 @@
int8_t high_range = libaom_test::high_range_arr[bd_idx];
for (int tx_size = 0; tx_size < TX_SIZES_ALL; ++tx_size) {
for (int tx_type = 0; tx_type < TX_TYPES; ++tx_type) {
- if (libaom_test::IsTxSizeTypeValid(static_cast<TX_SIZE>(tx_size),
- static_cast<TX_TYPE>(tx_type)) ==
+ if (libaom_test::IsTxSizeTypeValid(static_cast<TxSize>(tx_size),
+ static_cast<TxType>(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);
+ av1_get_inv_txfm_cfg(static_cast<TxType>(tx_type),
+ static_cast<TxSize>(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,
- (TX_SIZE)tx_size, bd);
+ static_cast<TxSize>(tx_size), bd);
libaom_test::txfm_stage_range_check(stage_range_col, cfg.stage_num_col,
cfg.cos_bit_col, low_range,
high_range);
@@ -262,14 +265,14 @@
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,
+ void RunAV1InvTxfm2dTest(TxType tx_type, TxSize tx_size, int run_times,
int gt_int16 = 0);
private:
LbdInvTxfm2dFunc target_func_;
};
-void AV1LbdInvTxfm2d::RunAV1InvTxfm2dTest(TX_TYPE tx_type, TX_SIZE tx_size,
+void AV1LbdInvTxfm2d::RunAV1InvTxfm2dTest(TxType tx_type, TxSize tx_size,
int run_times, int gt_int16) {
FwdTxfm2dFunc fwd_func_ = libaom_test::fwd_txfm_func_ls[tx_size];
InvTxfm2dFunc ref_func_ = libaom_test::inv_txfm_func_ls[tx_size];
@@ -351,23 +354,21 @@
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);
+ if (libaom_test::IsTxSizeTypeValid(static_cast<TxSize>(j),
+ static_cast<TxType>(i))) {
+ RunAV1InvTxfm2dTest(static_cast<TxType>(i), static_cast<TxSize>(j), 1);
}
}
}
}
TEST_P(AV1LbdInvTxfm2d, gt_int16) {
- static const TX_TYPE types[] = {
- DCT_DCT, ADST_DCT, FLIPADST_DCT, IDTX, V_DCT, H_DCT, H_ADST, H_FLIPADST
- };
+ static const TxType types[] = { DCT_DCT, ADST_DCT, FLIPADST_DCT, IDTX,
+ V_DCT, H_DCT, H_ADST, H_FLIPADST };
for (int j = 0; j < (int)(TX_SIZES_ALL); ++j) {
- const TX_SIZE sz = static_cast<TX_SIZE>(j);
- for (uint8_t i = 0; i < sizeof(types) / sizeof(TX_TYPE); ++i) {
- const TX_TYPE tp = types[i];
+ const TxSize sz = static_cast<TxSize>(j);
+ for (uint8_t i = 0; i < sizeof(types) / sizeof(types[0]); ++i) {
+ const TxType tp = types[i];
if (libaom_test::IsTxSizeTypeValid(sz, tp)) {
RunAV1InvTxfm2dTest(tp, sz, 1, 1);
}
@@ -378,9 +379,9 @@
TEST_P(AV1LbdInvTxfm2d, DISABLED_Speed) {
for (int j = 1; 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),
+ if (libaom_test::IsTxSizeTypeValid(static_cast<TxSize>(j),
+ static_cast<TxType>(i))) {
+ RunAV1InvTxfm2dTest(static_cast<TxType>(i), static_cast<TxSize>(j),
10000000);
}
}
@@ -398,7 +399,7 @@
#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,
+ TxType tx_type, TxSize tx_size,
int eob);
INSTANTIATE_TEST_CASE_P(AVX2, AV1LbdInvTxfm2d,
diff --git a/test/cfl_test.cc b/test/cfl_test.cc
index f087dd9..9515b67 100644
--- a/test/cfl_test.cc
+++ b/test/cfl_test.cc
@@ -24,30 +24,37 @@
#define NUM_ITERATIONS (100)
#define NUM_ITERATIONS_SPEED (INT16_MAX)
-#define ALL_CFL_TX_SIZES(function) \
- make_tuple(TX_4X4, &function), make_tuple(TX_4X8, &function), \
- make_tuple(TX_4X16, &function), make_tuple(TX_8X4, &function), \
- make_tuple(TX_8X8, &function), make_tuple(TX_8X16, &function), \
- make_tuple(TX_8X32, &function), make_tuple(TX_16X4, &function), \
- make_tuple(TX_16X8, &function), make_tuple(TX_16X16, &function), \
- make_tuple(TX_16X32, &function), make_tuple(TX_32X8, &function), \
- make_tuple(TX_32X16, &function), make_tuple(TX_32X32, &function)
+#define ALL_CFL_TX_SIZES(function) \
+ make_tuple(static_cast<TX_SIZE>(TX_4X4), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_4X8), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_4X16), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X4), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X8), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X16), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X32), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X4), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X8), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X16), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X32), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X8), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X16), &function), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X32), &function)
-#define ALL_CFL_TX_SIZES_SUBSAMPLE(fun420, fun422, fun444) \
- make_tuple(TX_4X4, &fun420, &fun422, &fun444), \
- make_tuple(TX_4X8, &fun420, &fun422, &fun444), \
- make_tuple(TX_4X16, &fun420, &fun422, &fun444), \
- make_tuple(TX_8X4, &fun420, &fun422, &fun444), \
- make_tuple(TX_8X8, &fun420, &fun422, &fun444), \
- make_tuple(TX_8X16, &fun420, &fun422, &fun444), \
- make_tuple(TX_8X32, &fun420, &fun422, &fun444), \
- make_tuple(TX_16X4, &fun420, &fun422, &fun444), \
- make_tuple(TX_16X8, &fun420, &fun422, &fun444), \
- make_tuple(TX_16X16, &fun420, &fun422, &fun444), \
- make_tuple(TX_16X32, &fun420, &fun422, &fun444), \
- make_tuple(TX_32X8, &fun420, &fun422, &fun444), \
- make_tuple(TX_32X16, &fun420, &fun422, &fun444), \
- make_tuple(TX_32X32, &fun420, &fun422, &fun444)
+#define ALL_CFL_TX_SIZES_SUBSAMPLE(fun420, fun422, fun444) \
+ make_tuple(static_cast<TX_SIZE>(TX_4X4), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_4X8), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_4X16), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X4), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X8), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X16), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_8X32), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X4), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X8), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X16), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_16X32), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X8), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X16), &fun420, &fun422, &fun444), \
+ make_tuple(static_cast<TX_SIZE>(TX_32X32), &fun420, &fun422, &fun444)
namespace {
diff --git a/test/corner_match_test.cc b/test/corner_match_test.cc
index af2baa7..0f79b52 100644
--- a/test/corner_match_test.cc
+++ b/test/corner_match_test.cc
@@ -127,15 +127,15 @@
#if HAVE_SSE4_1
INSTANTIATE_TEST_CASE_P(
SSE4_1, AV1CornerMatchTest,
- ::testing::Values(make_tuple(0, compute_cross_correlation_sse4_1),
- make_tuple(1, compute_cross_correlation_sse4_1)));
+ ::testing::Values(make_tuple(0, &compute_cross_correlation_sse4_1),
+ make_tuple(1, &compute_cross_correlation_sse4_1)));
#endif
#if HAVE_AVX2
INSTANTIATE_TEST_CASE_P(
AVX2, AV1CornerMatchTest,
- ::testing::Values(make_tuple(0, compute_cross_correlation_avx2),
- make_tuple(1, compute_cross_correlation_avx2)));
+ ::testing::Values(make_tuple(0, &compute_cross_correlation_avx2),
+ make_tuple(1, &compute_cross_correlation_avx2)));
#endif
} // namespace AV1CornerMatch
diff --git a/test/quantize_func_test.cc b/test/quantize_func_test.cc
index b705c79..1ab1c60 100644
--- a/test/quantize_func_test.cc
+++ b/test/quantize_func_test.cc
@@ -63,7 +63,7 @@
HBD_QUAN_FUNC;
}
-enum { TYPE_B, TYPE_DC, TYPE_FP } UENUM1BYTE(QuantType);
+enum QuantType { TYPE_B, TYPE_DC, TYPE_FP };
using ::testing::tuple;
typedef tuple<QuantizeFunc, QuantizeFunc, TX_SIZE, QuantType, aom_bit_depth_t>
@@ -327,63 +327,63 @@
#if HAVE_AVX2
const QuantizeParam kQParamArrayAvx2[] = {
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2, TX_16X16, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2, TX_4X16, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2, TX_16X4, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2, TX_32X8, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2, TX_8X32, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2, TX_32X32,
- TYPE_FP, AOM_BITS_8),
- make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2, TX_16X64,
- TYPE_FP, AOM_BITS_8),
- make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2, TX_64X16,
- TYPE_FP, AOM_BITS_8),
- make_tuple(&av1_quantize_fp_64x64_c, &av1_quantize_fp_64x64_avx2, TX_64X64,
- TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
+ static_cast<TX_SIZE>(TX_4X16), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
+ static_cast<TX_SIZE>(TX_16X4), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
+ static_cast<TX_SIZE>(TX_32X8), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_avx2,
+ static_cast<TX_SIZE>(TX_8X32), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
+ static_cast<TX_SIZE>(TX_16X64), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_32x32_c, &av1_quantize_fp_32x32_avx2,
+ static_cast<TX_SIZE>(TX_64X16), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_64x64_c, &av1_quantize_fp_64x64_avx2,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8),
make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>, TX_16X16,
- TYPE_FP, AOM_BITS_8),
+ &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>, TX_16X16,
- TYPE_FP, AOM_BITS_10),
+ &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_10),
make_tuple(&highbd_quan16x16_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>, TX_16X16,
- TYPE_FP, AOM_BITS_12),
+ &highbd_quan16x16_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_12),
make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>, TX_32X32,
- TYPE_FP, AOM_BITS_8),
+ &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_8),
make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>, TX_32X32,
- TYPE_FP, AOM_BITS_10),
+ &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_10),
make_tuple(&highbd_quan32x32_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>, TX_32X32,
- TYPE_FP, AOM_BITS_12),
+ &highbd_quan32x32_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_FP, AOM_BITS_12),
make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>, TX_64X64,
- TYPE_FP, AOM_BITS_8),
+ &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_8),
make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>, TX_64X64,
- TYPE_FP, AOM_BITS_10),
+ &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_10),
make_tuple(&highbd_quan64x64_wrapper<av1_highbd_quantize_fp_c>,
- &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>, TX_64X64,
- TYPE_FP, AOM_BITS_12),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2, TX_16X16,
- TYPE_B, AOM_BITS_8),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2, TX_16X16,
- TYPE_B, AOM_BITS_10),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2, TX_16X16,
- TYPE_B, AOM_BITS_12),
+ &highbd_quan64x64_wrapper<av1_highbd_quantize_fp_avx2>,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_FP, AOM_BITS_12),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_avx2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
- TX_16X16, TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2, TX_8X8,
- TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2, TX_4X4,
- TYPE_B, AOM_BITS_8)
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
+ static_cast<TX_SIZE>(TX_8X8), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_avx2,
+ static_cast<TX_SIZE>(TX_4X4), TYPE_B, AOM_BITS_8)
};
INSTANTIATE_TEST_CASE_P(AVX2, QuantizeTest,
@@ -392,54 +392,60 @@
#if HAVE_SSE2
const QuantizeParam kQParamArraySSE2[] = {
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2, TX_16X16, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2, TX_4X16, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2, TX_16X4, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2, TX_8X32, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2, TX_32X8, TYPE_FP,
- AOM_BITS_8),
- make_tuple(&aom_quantize_b_c, &aom_quantize_b_sse2, TX_16X16, TYPE_B,
- AOM_BITS_8),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2, TX_16X16,
- TYPE_B, AOM_BITS_8),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2, TX_16X16,
- TYPE_B, AOM_BITS_10),
- make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2, TX_16X16,
- TYPE_B, AOM_BITS_12),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
+ static_cast<TX_SIZE>(TX_4X16), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
+ static_cast<TX_SIZE>(TX_16X4), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
+ static_cast<TX_SIZE>(TX_8X32), TYPE_FP, AOM_BITS_8),
+ make_tuple(&av1_quantize_fp_c, &av1_quantize_fp_sse2,
+ static_cast<TX_SIZE>(TX_32X8), TYPE_FP, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_c, &aom_quantize_b_sse2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_10),
+ make_tuple(&aom_highbd_quantize_b_c, &aom_highbd_quantize_b_sse2,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_12),
make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
- TX_32X32, TYPE_B, AOM_BITS_8),
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
- TX_32X32, TYPE_B, AOM_BITS_10),
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_10),
make_tuple(&aom_highbd_quantize_b_32x32_c, &aom_highbd_quantize_b_32x32_sse2,
- TX_32X32, TYPE_B, AOM_BITS_12),
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_12),
make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
- TX_64X64, TYPE_B, AOM_BITS_8),
+ static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8),
make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
- TX_64X64, TYPE_B, AOM_BITS_10),
+ static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_10),
make_tuple(&aom_highbd_quantize_b_64x64_c, &aom_highbd_quantize_b_64x64_sse2,
- TX_64X64, TYPE_B, AOM_BITS_12),
+ static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_12),
make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
- TX_16X16, TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2, TX_8X8,
- TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2, TX_4X4,
- TYPE_B, AOM_BITS_8),
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_8X8), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_adaptive_c, &aom_quantize_b_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_4X4), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_32x32_adaptive_c,
- &aom_quantize_b_32x32_adaptive_sse2, TX_32X16, TYPE_B, AOM_BITS_8),
+ &aom_quantize_b_32x32_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_32X16), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_32x32_adaptive_c,
- &aom_quantize_b_32x32_adaptive_sse2, TX_16X32, TYPE_B, AOM_BITS_8),
+ &aom_quantize_b_32x32_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_16X32), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_32x32_adaptive_c,
- &aom_quantize_b_32x32_adaptive_sse2, TX_32X32, TYPE_B, AOM_BITS_8),
+ &aom_quantize_b_32x32_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_64x64_adaptive_c,
- &aom_quantize_b_64x64_adaptive_sse2, TX_32X64, TYPE_B, AOM_BITS_8),
+ &aom_quantize_b_64x64_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_32X64), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_64x64_adaptive_c,
- &aom_quantize_b_64x64_adaptive_sse2, TX_64X32, TYPE_B, AOM_BITS_8),
+ &aom_quantize_b_64x64_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_64X32), TYPE_B, AOM_BITS_8),
make_tuple(&aom_quantize_b_64x64_adaptive_c,
- &aom_quantize_b_64x64_adaptive_sse2, TX_64X64, TYPE_B, AOM_BITS_8)
+ &aom_quantize_b_64x64_adaptive_sse2,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8)
};
INSTANTIATE_TEST_CASE_P(SSE2, QuantizeTest,
@@ -449,25 +455,24 @@
#if HAVE_SSSE3 && ARCH_X86_64
INSTANTIATE_TEST_CASE_P(
SSSE3, QuantizeTest,
- ::testing::Values(make_tuple(&aom_quantize_b_c, &aom_quantize_b_ssse3,
- TX_16X16, TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_32x32_c,
- &aom_quantize_b_32x32_ssse3, TX_32X32, TYPE_B,
- AOM_BITS_8),
- make_tuple(&aom_quantize_b_64x64_c,
- &aom_quantize_b_64x64_ssse3, TX_64X64, TYPE_B,
- AOM_BITS_8)));
+ ::testing::Values(
+ make_tuple(&aom_quantize_b_c, &aom_quantize_b_ssse3,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_ssse3,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_64x64_c, &aom_quantize_b_64x64_ssse3,
+ static_cast<TX_SIZE>(TX_64X64), TYPE_B, AOM_BITS_8)));
#endif // HAVE_SSSE3 && ARCH_X86_64
#if HAVE_AVX && ARCH_X86_64
INSTANTIATE_TEST_CASE_P(
AVX, QuantizeTest,
- ::testing::Values(make_tuple(&aom_quantize_b_c, &aom_quantize_b_avx,
- TX_16X16, TYPE_B, AOM_BITS_8),
- make_tuple(&aom_quantize_b_32x32_c,
- &aom_quantize_b_32x32_avx, TX_32X32, TYPE_B,
- AOM_BITS_8)));
+ ::testing::Values(
+ make_tuple(&aom_quantize_b_c, &aom_quantize_b_avx,
+ static_cast<TX_SIZE>(TX_16X16), TYPE_B, AOM_BITS_8),
+ make_tuple(&aom_quantize_b_32x32_c, &aom_quantize_b_32x32_avx,
+ static_cast<TX_SIZE>(TX_32X32), TYPE_B, AOM_BITS_8)));
#endif // HAVE_AVX && ARCH_X86_64
} // namespace
diff --git a/test/time_stamp_test.cc b/test/time_stamp_test.cc
index 2c23785..679e4da 100644
--- a/test/time_stamp_test.cc
+++ b/test/time_stamp_test.cc
@@ -29,10 +29,11 @@
public:
// Parameters num and den set the timebase for the video source.
DummyTimebaseVideoSource(int num, int den)
- : timebase_({ num, den }), framerate_numerator_(30),
- framerate_denominator_(1), starting_pts_(0) {
+ : framerate_numerator_(30), framerate_denominator_(1), starting_pts_(0) {
SetSize(kVideoSourceWidth, kVideoSourceHeight);
set_limit(kFramesToEncode);
+ timebase_.num = num;
+ timebase_.den = den;
}
void SetFramerate(int numerator, int denominator) {