Skip to content

Commit

Permalink
Silience warnings about uninitiated test cases
Browse files Browse the repository at this point in the history
BUG=b/159031848

Change-Id: I6bb88c24bd08e0590ec6b8ebfb696fd9b07ed011
  • Loading branch information
jeromejj committed Jul 23, 2020
1 parent fbfd3fd commit 7a92a78
Show file tree
Hide file tree
Showing 7 changed files with 30 additions and 5 deletions.
4 changes: 4 additions & 0 deletions test/avg_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,7 @@ class AverageTestHBD : public AverageTestBase<uint16_t>,
};
#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);

Expand Down Expand Up @@ -226,6 +227,7 @@ class IntProColTest : public AverageTestBase<uint8_t>,
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;
Expand Down Expand Up @@ -378,6 +380,7 @@ TEST_P(AverageTestHBD, Random) {
}
#endif // CONFIG_VP9_HIGHBITDEPTH

#if HAVE_NEON || HAVE_SSE2 || HAVE_MSA
TEST_P(IntProRowTest, MinValue) {
FillConstant(0);
RunComparison();
Expand Down Expand Up @@ -407,6 +410,7 @@ TEST_P(IntProColTest, Random) {
FillRandom();
RunComparison();
}
#endif

TEST_P(SatdLowbdTest, MinValue) {
const int kMin = -32640;
Expand Down
2 changes: 2 additions & 0 deletions test/dct16x16_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -714,6 +714,7 @@ TEST_P(Trans16x16HT, QuantCheck) {
RunQuantCheck(429, 729);
}

#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
class InvTrans16x16DCT : public Trans16x16TestBase,
public ::testing::TestWithParam<Idct16x16Param> {
public:
Expand Down Expand Up @@ -743,6 +744,7 @@ class InvTrans16x16DCT : public Trans16x16TestBase,
TEST_P(InvTrans16x16DCT, CompareReference) {
CompareInvReference(ref_txfm_, thresh_);
}
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE

using std::make_tuple;

Expand Down
2 changes: 2 additions & 0 deletions test/fdct8x8_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -598,6 +598,7 @@ TEST_P(FwdTrans8x8HT, RoundTripErrorCheck) { RunRoundTripErrorCheck(); }

TEST_P(FwdTrans8x8HT, ExtremalCheck) { RunExtremalCheck(); }

#if HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE
class InvTrans8x8DCT : public FwdTrans8x8TestBase,
public ::testing::TestWithParam<Idct8x8Param> {
public:
Expand Down Expand Up @@ -628,6 +629,7 @@ class InvTrans8x8DCT : public FwdTrans8x8TestBase,
TEST_P(InvTrans8x8DCT, CompareReference) {
CompareInvReference(ref_txfm_, thresh_);
}
#endif // HAVE_SSE2 && CONFIG_VP9_HIGHBITDEPTH && !CONFIG_EMULATE_HARDWARE

using std::make_tuple;

Expand Down
8 changes: 8 additions & 0 deletions test/lpf_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ class Loop8Test6Param : public ::testing::TestWithParam<loop8_param_t> {
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() {}
Expand All @@ -164,6 +166,8 @@ class Loop8Test9Param : public ::testing::TestWithParam<dualloop8_param_t> {
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());
Expand Down Expand Up @@ -275,6 +279,8 @@ TEST_P(Loop8Test6Param, ValueCheck) {
<< "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;
Expand Down Expand Up @@ -402,6 +408,8 @@ TEST_P(Loop8Test9Param, ValueCheck) {
"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;

Expand Down
10 changes: 9 additions & 1 deletion test/test.mk
Original file line number Diff line number Diff line change
Expand Up @@ -121,11 +121,13 @@ ifeq ($(CONFIG_VP8_ENCODER)$(CONFIG_VP8_DECODER),yesyes)
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
Expand Down Expand Up @@ -174,7 +176,9 @@ ifneq ($(CONFIG_REALTIME_ONLY),yes)
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

Expand All @@ -188,8 +192,10 @@ LIBVPX_TEST_SRCS-$(CONFIG_NON_GREEDY_MV) += non_greedy_mv_test.cc
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)
Expand All @@ -201,7 +207,9 @@ endif # VP9
## 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
Expand Down
6 changes: 3 additions & 3 deletions test/variance_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -807,14 +807,11 @@ INSTANTIATE_TEST_SUITE_P(
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(); }
Expand All @@ -825,6 +822,9 @@ TEST_P(VpxHBDSubpelVarianceTest, ExtremeRef) { ExtremeRefTest(); }
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),
Expand Down
3 changes: 2 additions & 1 deletion test/vp9_intrapred_test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -457,6 +457,7 @@ struct HighbdIntraPredParam {
int bit_depth;
};

#if HAVE_SSSE3 || HAVE_NEON || HAVE_SSE2
template <>
void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
const int bit_depth = params_.bit_depth;
Expand All @@ -466,7 +467,6 @@ void IntraPredTest<uint16_t, HighbdIntraPredParam>::Predict() {
}

typedef IntraPredTest<uint16_t, HighbdIntraPredParam> VP9HighbdIntraPredTest;

TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
// max block size is 32
DECLARE_ALIGNED(16, uint16_t, left_col[2 * 32]);
Expand All @@ -475,6 +475,7 @@ TEST_P(VP9HighbdIntraPredTest, HighbdIntraPredTests) {
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(
Expand Down

0 comments on commit 7a92a78

Please sign in to comment.