summaryrefslogtreecommitdiffstats
path: root/third_party/aom/test/decode_perf_test.cc
diff options
context:
space:
mode:
Diffstat (limited to 'third_party/aom/test/decode_perf_test.cc')
-rw-r--r--third_party/aom/test/decode_perf_test.cc20
1 files changed, 11 insertions, 9 deletions
diff --git a/third_party/aom/test/decode_perf_test.cc b/third_party/aom/test/decode_perf_test.cc
index a24d02a6c..bb7b00032 100644
--- a/third_party/aom/test/decode_perf_test.cc
+++ b/third_party/aom/test/decode_perf_test.cc
@@ -7,9 +7,14 @@
* obtain it at www.aomedia.org/license/software. If the Alliance for Open
* Media Patent License 1.0 was not distributed with this source code in the
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
-*/
+ */
#include <string>
+
+#include "config/aom_version.h"
+
+#include "aom_ports/aom_timer.h"
+#include "common/ivfenc.h"
#include "test/codec_factory.h"
#include "test/decode_test_driver.h"
#include "test/encode_test_driver.h"
@@ -18,25 +23,21 @@
#include "test/md5_helper.h"
#include "test/util.h"
#include "test/webm_video_source.h"
-#include "aom_ports/aom_timer.h"
-#include "./ivfenc.h"
-#include "./aom_version.h"
-using std::tr1::make_tuple;
+using ::testing::make_tuple;
namespace {
#define VIDEO_NAME 0
#define THREADS 1
-const int kMaxPsnr = 100;
const double kUsecsInSec = 1000000.0;
const char kNewEncodeOutputFile[] = "new_encode.ivf";
/*
DecodePerfTest takes a tuple of filename + number of threads to decode with
*/
-typedef std::tr1::tuple<const char *, unsigned> DecodePerfParam;
+typedef ::testing::tuple<const char *, unsigned> DecodePerfParam;
// TODO(jimbankoski): Add actual test vectors here when available.
// const DecodePerfParam kAV1DecodePerfVectors[] = {};
@@ -129,7 +130,8 @@ class AV1NewEncodeDecodePerfTest
}
virtual void BeginPassHook(unsigned int /*pass*/) {
- const std::string data_path = getenv("LIBAOM_TEST_DATA_PATH");
+ const char *const env = getenv("LIBAOM_TEST_DATA_PATH");
+ const std::string data_path(env ? env : ".");
const std::string path_to_source = data_path + "/" + kNewEncodeOutputFile;
outfile_ = fopen(path_to_source.c_str(), "wb");
ASSERT_TRUE(outfile_ != NULL);
@@ -157,7 +159,7 @@ class AV1NewEncodeDecodePerfTest
pkt->data.frame.sz);
}
- virtual bool DoDecode() { return false; }
+ virtual bool DoDecode() const { return false; }
void set_speed(unsigned int speed) { speed_ = speed; }