Replace scoped_ptr with unique_ptr

Change-Id: Ib7a26d1a616ee3886585286b63917bae5ac83c81
diff --git a/test/arf_freq_test.cc b/test/arf_freq_test.cc
index 083f402..50b478b 100644
--- a/test/arf_freq_test.cc
+++ b/test/arf_freq_test.cc
@@ -9,6 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
 #include "test/codec_factory.h"
@@ -185,7 +187,7 @@
   init_flags_ = AOM_CODEC_USE_PSNR;
   if (cfg_.g_bit_depth > 8) init_flags_ |= AOM_CODEC_USE_HIGHBITDEPTH;
 
-  testing::internal::scoped_ptr<libaom_test::VideoSource> video;
+  std::unique_ptr<libaom_test::VideoSource> video;
   if (is_extension_y4m(test_video_param_.filename)) {
     video.reset(new libaom_test::Y4mVideoSource(test_video_param_.filename, 0,
                                                 kFrames));
diff --git a/test/av1_encoder_parms_get_to_decoder.cc b/test/av1_encoder_parms_get_to_decoder.cc
index ef8ccdb..76b82f5 100644
--- a/test/av1_encoder_parms_get_to_decoder.cc
+++ b/test/av1_encoder_parms_get_to_decoder.cc
@@ -9,6 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
 #include "test/codec_factory.h"
@@ -146,7 +148,7 @@
 TEST_P(AVxEncoderParmsGetToDecoder, BitstreamParms) {
   init_flags_ = AOM_CODEC_USE_PSNR;
 
-  testing::internal::scoped_ptr<libaom_test::VideoSource> video(
+  std::unique_ptr<libaom_test::VideoSource> video(
       new libaom_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames));
   ASSERT_TRUE(video.get() != NULL);
 
diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc
index f3d61dc..d06168f 100644
--- a/test/encode_test_driver.cc
+++ b/test/encode_test_driver.cc
@@ -9,6 +9,7 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
 #include <string>
 
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
@@ -192,7 +193,7 @@
       cfg_.g_pass = AOM_RC_LAST_PASS;
 
     BeginPassHook(pass);
-    testing::internal::scoped_ptr<Encoder> encoder(
+    std::unique_ptr<Encoder> encoder(
         codec_->CreateEncoder(cfg_, init_flags_, &stats_));
     ASSERT_TRUE(encoder.get() != NULL);
 
@@ -205,7 +206,7 @@
 
     ASSERT_FALSE(::testing::Test::HasFatalFailure());
 
-    testing::internal::scoped_ptr<Decoder> decoder(
+    std::unique_ptr<Decoder> decoder(
         codec_->CreateDecoder(dec_cfg, 0 /* flags */));
 #if CONFIG_AV1_DECODER
     if (decoder->IsAV1()) {
diff --git a/test/end_to_end_test.cc b/test/end_to_end_test.cc
index be70321..9aa44c6 100644
--- a/test/end_to_end_test.cc
+++ b/test/end_to_end_test.cc
@@ -9,6 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
 #include "test/codec_factory.h"
@@ -155,7 +157,7 @@
     init_flags_ = AOM_CODEC_USE_PSNR;
     if (cfg_.g_bit_depth > 8) init_flags_ |= AOM_CODEC_USE_HIGHBITDEPTH;
 
-    testing::internal::scoped_ptr<libaom_test::VideoSource> video;
+    std::unique_ptr<libaom_test::VideoSource> video;
     if (is_extension_y4m(test_video_param_.filename)) {
       video.reset(new libaom_test::Y4mVideoSource(test_video_param_.filename, 0,
                                                   kFrames));
diff --git a/test/external_frame_buffer_test.cc b/test/external_frame_buffer_test.cc
index 50cf18b..6fcd9e7 100644
--- a/test/external_frame_buffer_test.cc
+++ b/test/external_frame_buffer_test.cc
@@ -8,6 +8,7 @@
  *  be found in the AUTHORS file in the root of the source tree.
  */
 
+#include <memory>
 #include <string>
 #include "common/tools_common.h"
 #include "config/aom_config.h"
@@ -405,7 +406,7 @@
   set_num_buffers(num_buffers);
 
   // Open compressed video file.
-  testing::internal::scoped_ptr<libaom_test::CompressedVideoSource> video;
+  std::unique_ptr<libaom_test::CompressedVideoSource> video;
   if (filename.substr(filename.length() - 3, 3) == "ivf") {
     video.reset(new libaom_test::IVFVideoSource(filename));
   } else {
diff --git a/test/horz_superres_test.cc b/test/horz_superres_test.cc
index 6d7f2f2..1627684 100644
--- a/test/horz_superres_test.cc
+++ b/test/horz_superres_test.cc
@@ -9,6 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
 #include "av1/encoder/encoder.h"
@@ -152,7 +154,7 @@
   double GetPsnrThreshold() { return kPSNRThresholds[test_video_idx_]; }
 
   void DoTest() {
-    testing::internal::scoped_ptr<libaom_test::VideoSource> video;
+    std::unique_ptr<libaom_test::VideoSource> video;
     video.reset(new libaom_test::Y4mVideoSource(test_video_param_.filename, 0,
                                                 test_video_param_.limit));
     ASSERT_TRUE(video.get() != NULL);
@@ -275,7 +277,7 @@
   double GetPsnrThreshold() { return kPSNRThresholds[test_video_idx_]; }
 
   void DoTest() {
-    testing::internal::scoped_ptr<libaom_test::VideoSource> video;
+    std::unique_ptr<libaom_test::VideoSource> video;
     video.reset(new libaom_test::Y4mVideoSource(test_video_param_.filename, 0,
                                                 test_video_param_.limit));
     ASSERT_TRUE(video.get() != NULL);
diff --git a/test/motion_vector_test.cc b/test/motion_vector_test.cc
index a9b48d9..2636c39 100644
--- a/test/motion_vector_test.cc
+++ b/test/motion_vector_test.cc
@@ -9,6 +9,8 @@
  * PATENTS file, you can obtain it at www.aomedia.org/license/patent.
  */
 
+#include <memory>
+
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
 
 #include "test/codec_factory.h"
@@ -90,7 +92,7 @@
   cfg_.g_profile = 0;
   init_flags_ = AOM_CODEC_USE_PSNR;
 
-  testing::internal::scoped_ptr<libaom_test::VideoSource> video;
+  std::unique_ptr<libaom_test::VideoSource> video;
   video.reset(new libaom_test::YUVVideoSource(
       "niklas_640_480_30.yuv", AOM_IMG_FMT_I420, width, height, 30, 1, 0, 3));
 
diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc
index 286988b..9f070b9 100644
--- a/test/test_vector_test.cc
+++ b/test/test_vector_test.cc
@@ -11,6 +11,7 @@
 
 #include <cstdio>
 #include <cstdlib>
+#include <memory>
 #include <set>
 #include <string>
 #include "third_party/googletest/src/googletest/include/gtest/gtest.h"
@@ -116,7 +117,7 @@
   SCOPED_TRACE(str);
 
   // Open compressed video file.
-  testing::internal::scoped_ptr<libaom_test::CompressedVideoSource> video;
+  std::unique_ptr<libaom_test::CompressedVideoSource> video;
   if (filename.substr(filename.length() - 3, 3) == "ivf") {
     video.reset(new libaom_test::IVFVideoSource(filename));
   } else if (filename.substr(filename.length() - 4, 4) == "webm" ||
diff --git a/test/y4m_video_source.h b/test/y4m_video_source.h
index 42dee69..63f74f5 100644
--- a/test/y4m_video_source.h
+++ b/test/y4m_video_source.h
@@ -11,6 +11,7 @@
 #ifndef AOM_TEST_Y4M_VIDEO_SOURCE_H_
 #define AOM_TEST_Y4M_VIDEO_SOURCE_H_
 #include <algorithm>
+#include <memory>
 #include <string>
 
 #include "common/y4minput.h"
@@ -110,7 +111,7 @@
 
   std::string file_name_;
   FILE *input_file_;
-  testing::internal::scoped_ptr<aom_image_t> img_;
+  std::unique_ptr<aom_image_t> img_;
   unsigned int start_;
   unsigned int limit_;
   unsigned int frame_;