OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2011 The WebRTC 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 | 10 |
| 11 #include "vpx/vp8cx.h" |
| 12 #include "vpx/vpx_encoder.h" |
| 13 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" |
11 #include "webrtc/test/gtest.h" | 14 #include "webrtc/test/gtest.h" |
12 #include "vpx/vpx_encoder.h" | |
13 #include "vpx/vp8cx.h" | |
14 #include "webrtc/modules/video_coding/codecs/vp8/reference_picture_selection.h" | |
15 | 15 |
16 using webrtc::ReferencePictureSelection; | 16 using webrtc::ReferencePictureSelection; |
17 | 17 |
18 // The minimum time between reference frame updates. Should match the values | 18 // The minimum time between reference frame updates. Should match the values |
19 // set in reference_picture_selection.h | 19 // set in reference_picture_selection.h |
20 static const uint32_t kMinUpdateInterval = 10; | 20 static const uint32_t kMinUpdateInterval = 10; |
21 // The minimum time between decoder refreshes through restricted prediction. | 21 // The minimum time between decoder refreshes through restricted prediction. |
22 // Should match the values set in reference_picture_selection.h | 22 // Should match the values set in reference_picture_selection.h |
23 static const int kRtt = 10; | 23 static const int kRtt = 10; |
24 | 24 |
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 | 91 |
92 TEST_F(TestRPS, TestWrap) { | 92 TEST_F(TestRPS, TestWrap) { |
93 EXPECT_EQ(rps_.ReceivedSLI(0xffffffff), true); | 93 EXPECT_EQ(rps_.ReceivedSLI(0xffffffff), true); |
94 EXPECT_EQ(rps_.ReceivedSLI(1), false); | 94 EXPECT_EQ(rps_.ReceivedSLI(1), false); |
95 EXPECT_EQ(rps_.ReceivedSLI(90 * 100), true); | 95 EXPECT_EQ(rps_.ReceivedSLI(90 * 100), true); |
96 | 96 |
97 EXPECT_EQ(rps_.EncodeFlags(7, false, 0xffffffff), kPropagateAltRef); | 97 EXPECT_EQ(rps_.EncodeFlags(7, false, 0xffffffff), kPropagateAltRef); |
98 EXPECT_EQ(rps_.EncodeFlags(8, false, 1), kNoPropagationGolden); | 98 EXPECT_EQ(rps_.EncodeFlags(8, false, 1), kNoPropagationGolden); |
99 EXPECT_EQ(rps_.EncodeFlags(10, false, 90 * 100), kPropagateAltRef); | 99 EXPECT_EQ(rps_.EncodeFlags(10, false, 90 * 100), kPropagateAltRef); |
100 } | 100 } |
OLD | NEW |