| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebM project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 #include <climits> | 10 #include <climits> |
| 11 #include "third_party/googletest/src/include/gtest/gtest.h" | 11 #include "third_party/googletest/src/include/gtest/gtest.h" |
| 12 #include "test/codec_factory.h" | 12 #include "test/codec_factory.h" |
| 13 #include "test/encode_test_driver.h" | 13 #include "test/encode_test_driver.h" |
| 14 #include "test/i420_video_source.h" | 14 #include "test/i420_video_source.h" |
| 15 #include "test/util.h" | 15 #include "test/util.h" |
| 16 | 16 |
| 17 namespace { | 17 namespace { |
| 18 | 18 |
| 19 class SuperframeTest : public ::libvpx_test::EncoderTest, | 19 class SuperframeTest : public ::libvpx_test::EncoderTest, |
| 20 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { | 20 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { |
| 21 protected: | 21 protected: |
| 22 SuperframeTest() : EncoderTest(GET_PARAM(0)), modified_buf_(NULL), | 22 SuperframeTest() : EncoderTest(GET_PARAM(0)), modified_buf_(NULL), |
| 23 last_sf_pts_(0) {} | 23 last_sf_pts_(0) {} |
| 24 virtual ~SuperframeTest() {} |
| 24 | 25 |
| 25 virtual void SetUp() { | 26 virtual void SetUp() { |
| 26 InitializeConfig(); | 27 InitializeConfig(); |
| 27 SetMode(GET_PARAM(1)); | 28 SetMode(GET_PARAM(1)); |
| 28 sf_count_ = 0; | 29 sf_count_ = 0; |
| 29 sf_count_max_ = INT_MAX; | 30 sf_count_max_ = INT_MAX; |
| 30 } | 31 } |
| 31 | 32 |
| 32 virtual void TearDown() { | 33 virtual void TearDown() { |
| 33 delete[] modified_buf_; | 34 delete[] modified_buf_; |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 87 | 88 |
| 88 ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288, | 89 ::libvpx_test::I420VideoSource video("hantro_collage_w352h288.yuv", 352, 288, |
| 89 30, 1, 0, 40); | 90 30, 1, 0, 40); |
| 90 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 91 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
| 91 EXPECT_EQ(sf_count_, 1); | 92 EXPECT_EQ(sf_count_, 1); |
| 92 } | 93 } |
| 93 | 94 |
| 94 VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values( | 95 VP9_INSTANTIATE_TEST_CASE(SuperframeTest, ::testing::Values( |
| 95 ::libvpx_test::kTwoPassGood)); | 96 ::libvpx_test::kTwoPassGood)); |
| 96 } // namespace | 97 } // namespace |
| OLD | NEW |