shithub: libvpx

Download patch

ref: ad9ee2c91b24fc594fb3d8b752574ab84d417968
parent: 3cc8c8c3a0be13c4102895713b13d55c3fe971d0
parent: 1c05e9de2ca852d9e929696f53ab18063f4ef9c0
author: John Koleszar <jkoleszar@google.com>
date: Tue Jun 25 18:27:39 EDT 2013

Merge "encode_test_driver: check for fatal failures"

--- a/test/altref_test.cc
+++ b/test/altref_test.cc
@@ -33,10 +33,6 @@
     altref_count_ = 0;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
                                   libvpx_test::Encoder *encoder) {
     if (video->frame() == 1) {
--- a/test/borders_test.cc
+++ b/test/borders_test.cc
@@ -27,10 +27,6 @@
     SetMode(GET_PARAM(1));
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
                                   ::libvpx_test::Encoder *encoder) {
     if ( video->frame() == 1) {
--- a/test/config_test.cc
+++ b/test/config_test.cc
@@ -40,10 +40,6 @@
     ++frame_count_out_;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   unsigned int frame_count_in_;
   unsigned int frame_count_out_;
   unsigned int frame_count_max_;
--- a/test/cq_test.cc
+++ b/test/cq_test.cc
@@ -42,10 +42,6 @@
     n_frames_ = 0;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
                                   libvpx_test::Encoder *encoder) {
     if (video->frame() == 1) {
--- a/test/datarate_test.cc
+++ b/test/datarate_test.cc
@@ -36,10 +36,6 @@
     duration_ = 0.0;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
                                   ::libvpx_test::Encoder *encoder) {
     const vpx_rational_t tb = video->timebase();
--- a/test/encode_test_driver.h
+++ b/test/encode_test_driver.h
@@ -190,7 +190,9 @@
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {}
 
   // Hook to determine whether the encode loop should continue.
-  virtual bool Continue() const { return !abort_; }
+  virtual bool Continue() const {
+    return !(::testing::Test::HasFatalFailure() || abort_);
+  }
 
   const CodecFactory   *codec_;
   // Hook to determine whether to decode frame after encoding
--- a/test/error_resilience_test.cc
+++ b/test/error_resilience_test.cc
@@ -50,10 +50,6 @@
     mismatch_nframes_ = 0;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
     psnr_ += pkt->data.psnr.psnr[0];
     nframes_++;
--- a/test/keyframe_test.cc
+++ b/test/keyframe_test.cc
@@ -31,10 +31,6 @@
     set_cpu_used_ = 0;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video,
                                   ::libvpx_test::Encoder *encoder) {
     if (kf_do_force_kf_)
--- a/test/resize_test.cc
+++ b/test/resize_test.cc
@@ -70,10 +70,6 @@
     SetMode(GET_PARAM(1));
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void DecompressedFrameHook(const vpx_image_t &img,
                                      vpx_codec_pts_t pts) {
     frame_info_list_.push_back(FrameInfo(pts, img.d_w, img.d_h));
--- a/test/superframe_test.cc
+++ b/test/superframe_test.cc
@@ -33,10 +33,6 @@
     delete[] modified_buf_;
   }
 
-  virtual bool Continue() const {
-    return !HasFatalFailure() && !abort_;
-  }
-
   virtual void PreEncodeFrameHook(libvpx_test::VideoSource *video,
                                   libvpx_test::Encoder *encoder) {
     if (video->frame() == 1) {