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 <vector> | 11 #include <vector> |
12 #include "third_party/googletest/src/include/gtest/gtest.h" | 12 #include "third_party/googletest/src/include/gtest/gtest.h" |
13 #include "test/codec_factory.h" | 13 #include "test/codec_factory.h" |
14 #include "test/encode_test_driver.h" | 14 #include "test/encode_test_driver.h" |
15 #include "test/i420_video_source.h" | 15 #include "test/i420_video_source.h" |
16 #include "test/util.h" | 16 #include "test/util.h" |
17 | 17 |
18 namespace { | 18 namespace { |
19 | 19 |
20 class BordersTest : public ::libvpx_test::EncoderTest, | 20 class BordersTest : public ::libvpx_test::EncoderTest, |
21 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { | 21 public ::libvpx_test::CodecTestWithParam<libvpx_test::TestMode> { |
22 protected: | 22 protected: |
23 BordersTest() : EncoderTest(GET_PARAM(0)) {} | 23 BordersTest() : EncoderTest(GET_PARAM(0)) {} |
| 24 virtual ~BordersTest() {} |
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 } | 29 } |
29 | 30 |
30 virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, | 31 virtual void PreEncodeFrameHook(::libvpx_test::VideoSource *video, |
31 ::libvpx_test::Encoder *encoder) { | 32 ::libvpx_test::Encoder *encoder) { |
32 if (video->frame() == 1) { | 33 if (video->frame() == 1) { |
33 encoder->Control(VP8E_SET_CPUUSED, 1); | 34 encoder->Control(VP8E_SET_CPUUSED, 1); |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 | 74 |
74 ::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0, | 75 ::libvpx_test::I420VideoSource video("hantro_odd.yuv", 208, 144, 30, 1, 0, |
75 40); | 76 40); |
76 | 77 |
77 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); | 78 ASSERT_NO_FATAL_FAILURE(RunLoop(&video)); |
78 } | 79 } |
79 | 80 |
80 VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values( | 81 VP9_INSTANTIATE_TEST_CASE(BordersTest, ::testing::Values( |
81 ::libvpx_test::kTwoPassGood)); | 82 ::libvpx_test::kTwoPassGood)); |
82 } // namespace | 83 } // namespace |
OLD | NEW |