ref: 7a92a785f233138dcb88c789ada16adec38fb0d2
parent: fbfd3fdfb7fa136debada4d4fd65825c80d19db9
author: Jerome Jiang <jianj@google.com>
date: Tue Jul 21 12:13:39 EDT 2020
Silience warnings about uninitiated test cases BUG=b/159031848 Change-Id: I6bb88c24bd08e0590ec6b8ebfb696fd9b07ed011
--- a/test/avg_test.cc
+++ b/test/avg_test.cc
@@ -152,6 +152,7 @@
};
#endif // CONFIG_VP9_HIGHBITDEPTH
+#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
typedef void (*IntProRowFunc)(int16_t hbuf[16], uint8_t const *ref,
const int ref_stride, const int height);
@@ -226,6 +227,7 @@
int16_t sum_asm_;
int16_t sum_c_;
};
+#endif // HAVE_NEON || HAVE_SSE2 || HAVE_MSA
typedef int (*SatdFunc)(const tran_low_t *coeffs, int length);
typedef std::tuple<int, SatdFunc> SatdTestParam;
@@ -378,6 +380,7 @@
}
#endif // CONFIG_VP9_HIGHBITDEPTH
+#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
TEST_P(IntProRowTest, MinValue) {
FillConstant(0);
RunComparison();
@@ -407,6 +410,7 @@
FillRandom();
RunComparison();
}
+#endif
TEST_P(SatdLowbdTest, MinValue) {
const int kMin = -32640;
--- a/test/dct16x16_test.cc
+++ b/test/dct16x16_test.cc
@@ -714,6 +714,7 @@
RunQuantCheck(429, 729);
}
+#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
class InvTrans16x16DCT : public Trans16x16TestBase,
public ::testing::TestWithParam<Idct16x16Param> {
public:
@@ -743,6 +744,7 @@
TEST_P(InvTrans16x16DCT, CompareReference) {
CompareInvReference(ref_txfm_, thresh_);
}
+#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
using std::make_tuple;
--- a/test/fdct8x8_test.cc
+++ b/test/fdct8x8_test.cc
@@ -598,6 +598,7 @@
TEST_P(FwdTrans8x8HT, ExtremalCheck) { RunExtremalCheck(); }
+#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
class InvTrans8x8DCT : public FwdTrans8x8TestBase,
public ::testing::TestWithParam<Idct8x8Param> {
public:
@@ -628,6 +629,7 @@
TEST_P(InvTrans8x8DCT, CompareReference) {
CompareInvReference(ref_txfm_, thresh_);
}
+#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
using std::make_tuple;
--- a/test/lpf_test.cc
+++ b/test/lpf_test.cc
@@ -146,6 +146,8 @@
loop_op_t ref_loopfilter_op_;
};
+#if HAVE_NEON || HAVE_SSE2 || \
+ (HAVE_DSPR2 || HAVE_MSA && !CONFIG_VP9_HIGHBITDEPTH)
class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
public:
virtual ~Loop8Test9Param() {}
@@ -164,6 +166,8 @@
dual_loop_op_t loopfilter_op_;
dual_loop_op_t ref_loopfilter_op_;
};
+#endif // HAVE_NEON || HAVE_SSE2 || (HAVE_DSPR2 || HAVE_MSA &&
+ // (!CONFIG_VP9_HIGHBITDEPTH))
TEST_P(Loop8Test6Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
@@ -275,6 +279,8 @@
<< "First failed at test case " << first_failure;
}
+#if HAVE_NEON || HAVE_SSE2 || \
+ (HAVE_DSPR2 || HAVE_MSA && (!CONFIG_VP9_HIGHBITDEPTH))
TEST_P(Loop8Test9Param, OperationCheck) {
ACMRandom rnd(ACMRandom::DeterministicSeed());
const int count_test_block = number_of_iterations;
@@ -402,6 +408,8 @@
"loopfilter output. "
<< "First failed at test case " << first_failure;
}
+#endif // HAVE_NEON || HAVE_SSE2 || (HAVE_DSPR2 || HAVE_MSA &&
+ // (!CONFIG_VP9_HIGHBITDEPTH))
using std::make_tuple;
--- a/test/test.mk
+++ b/test/test.mk
@@ -121,11 +121,13 @@
LIBVPX_TEST_SRCS-yes += vp8_boolcoder_test.cc
LIBVPX_TEST_SRCS-yes += vp8_fragments_test.cc
endif
-
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += add_noise_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_POSTPROC) += pp_filter_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_DECODER) += vp8_decrypt_test.cc
+ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_SSSE3) $(HAVE_SSE4_1) $(HAVE_NEON) \
+ $(HAVE_MSA) $(HAVE_MMI)))
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += quantize_test.cc
+endif
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += set_roi.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += variance_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP8_ENCODER) += vp8_fdct4x4_test.cc
@@ -174,7 +176,9 @@
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += yuv_temporal_filter_test.cc
endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += variance_test.cc
+ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_AVX2)))
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_block_error_test.cc
+endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_quantize_test.cc
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_subtract_test.cc
@@ -188,8 +192,10 @@
endif
ifeq ($(CONFIG_VP9_ENCODER)$(CONFIG_VP9_TEMPORAL_DENOISING),yesyes)
+ifneq (, $(filter yes, $(HAVE_SSE2) $(HAVE_AVX2)))
LIBVPX_TEST_SRCS-yes += vp9_denoiser_test.cc
endif
+endif
LIBVPX_TEST_SRCS-$(CONFIG_VP9_ENCODER) += vp9_arf_freq_test.cc
ifeq ($(CONFIG_VP9_ENCODER),yes)
@@ -201,7 +207,9 @@
## Multi-codec / unconditional whitebox tests.
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sad_test.cc
+ifneq (, $(filter yes, $(HAVE_NEON) $(HAVE_SSE2) $(HAVE_MSA)))
LIBVPX_TEST_SRCS-$(CONFIG_ENCODERS) += sum_squares_test.cc
+endif
TEST_INTRA_PRED_SPEED_SRCS-yes := test_intra_pred_speed.cc
TEST_INTRA_PRED_SPEED_SRCS-yes += ../md5_utils.h ../md5_utils.c
--- a/test/variance_test.cc
+++ b/test/variance_test.cc
@@ -807,14 +807,11 @@
SubpelAvgVarianceParams(2, 2, &vpx_sub_pixel_avg_variance4x4_c, 0)));
#if CONFIG_VP9_HIGHBITDEPTH
-typedef MainTestClass<vpx_variance_fn_t> VpxHBDMseTest;
typedef MainTestClass<vpx_variance_fn_t> VpxHBDVarianceTest;
typedef SubpelVarianceTest<vpx_subpixvariance_fn_t> VpxHBDSubpelVarianceTest;
typedef SubpelVarianceTest<vpx_subp_avg_variance_fn_t>
VpxHBDSubpelAvgVarianceTest;
-TEST_P(VpxHBDMseTest, RefMse) { RefTestMse(); }
-TEST_P(VpxHBDMseTest, MaxMse) { MaxTestMse(); }
TEST_P(VpxHBDVarianceTest, Zero) { ZeroTest(); }
TEST_P(VpxHBDVarianceTest, Ref) { RefTest(); }
TEST_P(VpxHBDVarianceTest, RefStride) { RefStrideTest(); }
@@ -825,6 +822,9 @@
TEST_P(VpxHBDSubpelAvgVarianceTest, Ref) { RefTest(); }
/* TODO(debargha): This test does not support the highbd version
+typedef MainTestClass<vpx_variance_fn_t> VpxHBDMseTest;
+TEST_P(VpxHBDMseTest, RefMse) { RefTestMse(); }
+TEST_P(VpxHBDMseTest, MaxMse) { MaxTestMse(); }
INSTANTIATE_TEST_SUITE_P(
C, VpxHBDMseTest,
::testing::Values(MseParams(4, 4, &vpx_highbd_12_mse16x16_c),
--- a/test/vp9_intrapred_test.cc
+++ b/test/vp9_intrapred_test.cc
@@ -457,6 +457,7 @@
int bit_depth;
};
+#if HAVE_SSSE3 || HAVE_NEON || HAVE_SSE2
template <>
void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
const int bit_depth = params_.bit_depth;
@@ -466,7 +467,6 @@
}
typedef IntraPredTest<uint16_t, HighbdIntraPredParam> VP9HighbdIntraPredTest;
-
TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
// max block size is 32
DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
@@ -475,6 +475,7 @@
DECLARE_ALIGNED(16, uint16_t, ref_dst[3 * 32 * 32]);
RunTest(left_col, above_data, dst, ref_dst);
}
+#endif
#if HAVE_SSSE3
INSTANTIATE_TEST_SUITE_P(