summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2017-10-05 15:02:51 -0700
committerJames Zern <jzern@google.com>2017-10-05 15:02:51 -0700
commit107eb6a9d476fd7580a4e319c4bdbdfea63c9347 (patch)
tree9206eb2989e423ee2688fcfcf913827af44b335c
parente095bcce44deb1326446484a391a48c2f20735c9 (diff)
downloadlibvpx-107eb6a9d476fd7580a4e319c4bdbdfea63c9347.tar
libvpx-107eb6a9d476fd7580a4e319c4bdbdfea63c9347.tar.gz
libvpx-107eb6a9d476fd7580a4e319c4bdbdfea63c9347.tar.bz2
libvpx-107eb6a9d476fd7580a4e319c4bdbdfea63c9347.zip
vp9_ethread_test: abort early/add more detailed output
in the case compare_fp_stats fails report the 2 values and their index Change-Id: I927a832b7a1e24c392961093b7caee1134223def
-rw-r--r--test/vp9_ethread_test.cc10
1 files changed, 6 insertions, 4 deletions
diff --git a/test/vp9_ethread_test.cc b/test/vp9_ethread_test.cc
index f52391256..6b7e51211 100644
--- a/test/vp9_ethread_test.cc
+++ b/test/vp9_ethread_test.cc
@@ -127,8 +127,10 @@ static void compare_fp_stats(vpx_fixed_buf_t *fp_stats, double factor) {
const double *frame_stats2 = reinterpret_cast<double *>(stats2);
for (j = 0; j < kDbl; ++j) {
- EXPECT_LE(fabs(*frame_stats1 - *frame_stats2),
- fabs(*frame_stats1) / factor);
+ ASSERT_LE(fabs(*frame_stats1 - *frame_stats2),
+ fabs(*frame_stats1) / factor)
+ << "First failure @ frame #" << i << " stat #" << j << " ("
+ << *frame_stats1 << " vs. " << *frame_stats2 << ")";
frame_stats1++;
frame_stats2++;
}
@@ -182,7 +184,7 @@ TEST_P(VPxFirstPassEncoderThreadTest, FirstPassStatsTest) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// Compare to check if using or not using row-mt generates close stats.
- compare_fp_stats(&firstpass_stats_, 1000.0);
+ ASSERT_NO_FATAL_FAILURE(compare_fp_stats(&firstpass_stats_, 1000.0));
// Test single thread vs multiple threads
row_mt_mode_ = 1;
@@ -196,7 +198,7 @@ TEST_P(VPxFirstPassEncoderThreadTest, FirstPassStatsTest) {
ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
// Compare to check if single-thread and multi-thread stats are close enough.
- compare_fp_stats(&firstpass_stats_, 1000.0);
+ ASSERT_NO_FATAL_FAILURE(compare_fp_stats(&firstpass_stats_, 1000.0));
// Bit exact test in row_mt mode.
// When row_mt_mode_=1 and using >1 threads, the encoder generates bit exact