diff options
-rw-r--r-- | test/decode_svc_test.cc | 9 | ||||
-rw-r--r-- | test/encode_test_driver.cc | 5 | ||||
-rw-r--r-- | test/external_frame_buffer_test.cc | 3 | ||||
-rw-r--r-- | test/invalid_file_test.cc | 3 | ||||
-rw-r--r-- | test/test_vector_test.cc | 3 | ||||
-rw-r--r-- | test/vp9_arf_freq_test.cc | 4 | ||||
-rw-r--r-- | test/vp9_encoder_parms_get_to_decoder.cc | 4 | ||||
-rw-r--r-- | test/vp9_end_to_end_test.cc | 6 | ||||
-rw-r--r-- | test/vp9_motion_vector_test.cc | 4 | ||||
-rw-r--r-- | test/y4m_video_source.h | 3 |
10 files changed, 29 insertions, 15 deletions
diff --git a/test/decode_svc_test.cc b/test/decode_svc_test.cc index 69f62f13b..c6f0873f8 100644 --- a/test/decode_svc_test.cc +++ b/test/decode_svc_test.cc @@ -8,6 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include <memory> #include <string> #include "test/codec_factory.h" @@ -53,7 +54,7 @@ class DecodeSvcTest : public ::libvpx_test::DecoderTest, // number of frames decoded. This results in 1/4x1/4 resolution (320x180). TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer0) { const std::string filename = GET_PARAM(1); - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; video.reset(new libvpx_test::IVFVideoSource(filename)); ASSERT_TRUE(video.get() != NULL); video->Init(); @@ -70,7 +71,7 @@ TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer0) { // number of frames decoded. This results in 1/2x1/2 resolution (640x360). TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer1) { const std::string filename = GET_PARAM(1); - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; video.reset(new libvpx_test::IVFVideoSource(filename)); ASSERT_TRUE(video.get() != NULL); video->Init(); @@ -87,7 +88,7 @@ TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer1) { // number of frames decoded. This results in the full resolution (1280x720). TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer2) { const std::string filename = GET_PARAM(1); - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; video.reset(new libvpx_test::IVFVideoSource(filename)); ASSERT_TRUE(video.get() != NULL); video->Init(); @@ -105,7 +106,7 @@ TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer2) { // the decoding should result in the full resolution (1280x720). TEST_P(DecodeSvcTest, DecodeSvcTestUpToSpatialLayer10) { const std::string filename = GET_PARAM(1); - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; video.reset(new libvpx_test::IVFVideoSource(filename)); ASSERT_TRUE(video.get() != NULL); video->Init(); diff --git a/test/encode_test_driver.cc b/test/encode_test_driver.cc index 22e3f0590..8fdbdb62a 100644 --- a/test/encode_test_driver.cc +++ b/test/encode_test_driver.cc @@ -8,6 +8,7 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include <memory> #include <string> #include "third_party/googletest/src/include/gtest/gtest.h" @@ -179,7 +180,7 @@ void EncoderTest::RunLoop(VideoSource *video) { } BeginPassHook(pass); - testing::internal::scoped_ptr<Encoder> encoder( + std::unique_ptr<Encoder> encoder( codec_->CreateEncoder(cfg_, deadline_, init_flags_, &stats_)); ASSERT_TRUE(encoder.get() != NULL); @@ -193,7 +194,7 @@ void EncoderTest::RunLoop(VideoSource *video) { if (init_flags_ & VPX_CODEC_USE_OUTPUT_PARTITION) { dec_init_flags |= VPX_CODEC_USE_INPUT_FRAGMENTS; } - testing::internal::scoped_ptr<Decoder> decoder( + std::unique_ptr<Decoder> decoder( codec_->CreateDecoder(dec_cfg, dec_init_flags)); bool again; for (again = true; again; video->Next()) { diff --git a/test/external_frame_buffer_test.cc b/test/external_frame_buffer_test.cc index 99366fd7d..b0ea61f9d 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 "./vpx_config.h" @@ -392,7 +393,7 @@ TEST_P(ExternalFrameBufferMD5Test, ExtFBMD5Match) { #endif // Open compressed video file. - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; if (filename.substr(filename.length() - 3, 3) == "ivf") { video.reset(new libvpx_test::IVFVideoSource(filename)); } else { diff --git a/test/invalid_file_test.cc b/test/invalid_file_test.cc index 6f61d3bc2..8eed05eb4 100644 --- a/test/invalid_file_test.cc +++ b/test/invalid_file_test.cc @@ -10,6 +10,7 @@ #include <cstdio> #include <cstdlib> +#include <memory> #include <string> #include <vector> #include "third_party/googletest/src/include/gtest/gtest.h" @@ -89,7 +90,7 @@ class InvalidFileTest : public ::libvpx_test::DecoderTest, const std::string filename = input.filename; // Open compressed video file. - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; if (filename.substr(filename.length() - 3, 3) == "ivf") { video.reset(new libvpx_test::IVFVideoSource(filename)); } else if (filename.substr(filename.length() - 4, 4) == "webm") { diff --git a/test/test_vector_test.cc b/test/test_vector_test.cc index b0f2b818d..c4a6359eb 100644 --- a/test/test_vector_test.cc +++ b/test/test_vector_test.cc @@ -10,6 +10,7 @@ #include <cstdio> #include <cstdlib> +#include <memory> #include <set> #include <string> #include "third_party/googletest/src/include/gtest/gtest.h" @@ -100,7 +101,7 @@ TEST_P(TestVectorTest, MD5Match) { SCOPED_TRACE(str); // Open compressed video file. - testing::internal::scoped_ptr<libvpx_test::CompressedVideoSource> video; + std::unique_ptr<libvpx_test::CompressedVideoSource> video; if (filename.substr(filename.length() - 3, 3) == "ivf") { video.reset(new libvpx_test::IVFVideoSource(filename)); } else if (filename.substr(filename.length() - 4, 4) == "webm") { diff --git a/test/vp9_arf_freq_test.cc b/test/vp9_arf_freq_test.cc index 48a4ca739..9a3455b4a 100644 --- a/test/vp9_arf_freq_test.cc +++ b/test/vp9_arf_freq_test.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include <memory> + #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" @@ -190,7 +192,7 @@ TEST_P(ArfFreqTest, MinArfFreqTest) { init_flags_ = VPX_CODEC_USE_PSNR; if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH; - testing::internal::scoped_ptr<libvpx_test::VideoSource> video; + std::unique_ptr<libvpx_test::VideoSource> video; if (is_extension_y4m(test_video_param_.filename)) { video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename, 0, kFrames)); diff --git a/test/vp9_encoder_parms_get_to_decoder.cc b/test/vp9_encoder_parms_get_to_decoder.cc index df0d53eab..fade08bbd 100644 --- a/test/vp9_encoder_parms_get_to_decoder.cc +++ b/test/vp9_encoder_parms_get_to_decoder.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include <memory> + #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" @@ -138,7 +140,7 @@ class VpxEncoderParmsGetToDecoder TEST_P(VpxEncoderParmsGetToDecoder, BitstreamParms) { init_flags_ = VPX_CODEC_USE_PSNR; - testing::internal::scoped_ptr<libvpx_test::VideoSource> video( + std::unique_ptr<libvpx_test::VideoSource> video( new libvpx_test::Y4mVideoSource(test_video_.name, 0, test_video_.frames)); ASSERT_TRUE(video.get() != NULL); diff --git a/test/vp9_end_to_end_test.cc b/test/vp9_end_to_end_test.cc index 564e514b3..20ea83ab6 100644 --- a/test/vp9_end_to_end_test.cc +++ b/test/vp9_end_to_end_test.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include "memory" + #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" @@ -200,7 +202,7 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRTest) { init_flags_ = VPX_CODEC_USE_PSNR; if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH; - testing::internal::scoped_ptr<libvpx_test::VideoSource> video; + std::unique_ptr<libvpx_test::VideoSource> video; if (is_extension_y4m(test_video_param_.filename)) { video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename, 0, kFrames)); @@ -227,7 +229,7 @@ TEST_P(EndToEndTestLarge, EndtoEndPSNRDenoiserAQTest) { denoiser_on_ = 1; if (cfg_.g_bit_depth > 8) init_flags_ |= VPX_CODEC_USE_HIGHBITDEPTH; - testing::internal::scoped_ptr<libvpx_test::VideoSource> video; + std::unique_ptr<libvpx_test::VideoSource> video; if (is_extension_y4m(test_video_param_.filename)) { video.reset(new libvpx_test::Y4mVideoSource(test_video_param_.filename, 0, kFrames)); diff --git a/test/vp9_motion_vector_test.cc b/test/vp9_motion_vector_test.cc index bb860c3d1..b556a1c37 100644 --- a/test/vp9_motion_vector_test.cc +++ b/test/vp9_motion_vector_test.cc @@ -8,6 +8,8 @@ * be found in the AUTHORS file in the root of the source tree. */ +#include <memory> + #include "third_party/googletest/src/include/gtest/gtest.h" #include "test/codec_factory.h" @@ -81,7 +83,7 @@ TEST_P(MotionVectorTestLarge, OverallTest) { cfg_.g_profile = 0; init_flags_ = VPX_CODEC_USE_PSNR; - testing::internal::scoped_ptr<libvpx_test::VideoSource> video; + std::unique_ptr<libvpx_test::VideoSource> video; video.reset(new libvpx_test::YUVVideoSource( "niklas_640_480_30.yuv", VPX_IMG_FMT_I420, 3840, 2160, // 2048, 1080, 30, 1, 0, 5)); diff --git a/test/y4m_video_source.h b/test/y4m_video_source.h index 5f03c8b22..89aa2a44f 100644 --- a/test/y4m_video_source.h +++ b/test/y4m_video_source.h @@ -10,6 +10,7 @@ #ifndef VPX_TEST_Y4M_VIDEO_SOURCE_H_ #define VPX_TEST_Y4M_VIDEO_SOURCE_H_ #include <algorithm> +#include <memory> #include <string> #include "test/video_source.h" @@ -108,7 +109,7 @@ class Y4mVideoSource : public VideoSource { std::string file_name_; FILE *input_file_; - testing::internal::scoped_ptr<vpx_image_t> img_; + std::unique_ptr<vpx_image_t> img_; unsigned int start_; unsigned int limit_; unsigned int frame_; |