shithub: libvpx

Download patch

ref: 8abbd37d21b0e15b3a3120685e3819dc2ac70f09
parent: bdfb9e580402a6153a7ce7cc3ab18a6f5f11375f
parent: 99df92d126419dd662a77495334e653f66970297
author: James Zern <[email protected]>
date: Tue Jul 8 15:01:39 EDT 2014

Merge changes I2abd6716,I4a65f7f8

* changes:
  cpu_speed_test: cosmetics
  aq_segment_test: cosmetics

--- a/test/aq_segment_test.cc
+++ b/test/aq_segment_test.cc
@@ -7,8 +7,6 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#include <climits>
-#include <vector>
 #include "third_party/googletest/src/include/gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
@@ -17,11 +15,12 @@
 
 namespace {
 
-class AqSegmentTest : public ::libvpx_test::EncoderTest,
-    public ::libvpx_test::CodecTestWith2Params<
-        libvpx_test::TestMode, int> {
+class AqSegmentTest
+    : public ::libvpx_test::EncoderTest,
+      public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
  protected:
   AqSegmentTest() : EncoderTest(GET_PARAM(0)) {}
+  virtual ~AqSegmentTest() {}
 
   virtual void SetUp() {
     InitializeConfig();
@@ -39,10 +38,6 @@
     }
   }
 
-  virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
-    }
-  }
   int set_cpu_used_;
   int aq_mode_;
 };
@@ -107,13 +102,8 @@
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 }
 
-using std::tr1::make_tuple;
-
-#define VP9_FACTORY \
-  static_cast<const libvpx_test::CodecFactory*> (&libvpx_test::kVP9)
-
 VP9_INSTANTIATE_TEST_CASE(AqSegmentTest,
                           ::testing::Values(::libvpx_test::kRealTime,
                                             ::libvpx_test::kOnePassGood),
-                                            ::testing::Range(3, 9));
+                          ::testing::Range(3, 9));
 }  // namespace
--- a/test/cpu_speed_test.cc
+++ b/test/cpu_speed_test.cc
@@ -7,8 +7,6 @@
  *  in the file PATENTS.  All contributing project authors may
  *  be found in the AUTHORS file in the root of the source tree.
  */
-#include <climits>
-#include <vector>
 #include "third_party/googletest/src/include/gtest/gtest.h"
 #include "test/codec_factory.h"
 #include "test/encode_test_driver.h"
@@ -20,9 +18,9 @@
 
 const int kMaxPSNR = 100;
 
-class CpuSpeedTest : public ::libvpx_test::EncoderTest,
-    public ::libvpx_test::CodecTestWith2Params<
-        libvpx_test::TestMode, int> {
+class CpuSpeedTest
+    : public ::libvpx_test::EncoderTest,
+      public ::libvpx_test::CodecTestWith2Params<libvpx_test::TestMode, int> {
  protected:
   CpuSpeedTest()
       : EncoderTest(GET_PARAM(0)),
@@ -60,11 +58,6 @@
     }
   }
 
-  virtual void FramePktHook(const vpx_codec_cx_pkt_t *pkt) {
-    if (pkt->data.frame.flags & VPX_FRAME_IS_KEY) {
-    }
-  }
-
   virtual void PSNRPktHook(const vpx_codec_cx_pkt_t *pkt) {
     if (pkt->data.psnr.psnr[0] < min_psnr_)
       min_psnr_ = pkt->data.psnr.psnr[0];
@@ -126,11 +119,11 @@
 
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 }
+
 TEST_P(CpuSpeedTest, TestLowBitrate) {
   // Validate that this clip encodes and decodes without a mismatch
   // when passing in a very high min q.  This pushes the encoder to producing
   // lots of small partitions which might will test the other condition.
-
   cfg_.rc_2pass_vbr_minsection_pct = 5;
   cfg_.rc_2pass_vbr_minsection_pct = 2000;
   cfg_.rc_target_bitrate = 200;
@@ -141,11 +134,6 @@
 
   ASSERT_NO_FATAL_FAILURE(RunLoop(&video));
 }
-
-using std::tr1::make_tuple;
-
-#define VP9_FACTORY \
-  static_cast<const libvpx_test::CodecFactory*> (&libvpx_test::kVP9)
 
 VP9_INSTANTIATE_TEST_CASE(
     CpuSpeedTest,