| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 |
| (...skipping 410 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 3); | 421 InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 3); |
| 422 InsertVp8(sn + 3, sn + 3, false, pid + 3, 0, 4); | 422 InsertVp8(sn + 3, sn + 3, false, pid + 3, 0, 4); |
| 423 | 423 |
| 424 ASSERT_EQ(4UL, frames_from_callback_.size()); | 424 ASSERT_EQ(4UL, frames_from_callback_.size()); |
| 425 CheckReferencesVp8(pid); | 425 CheckReferencesVp8(pid); |
| 426 CheckReferencesVp8(pid + 1, pid); | 426 CheckReferencesVp8(pid + 1, pid); |
| 427 CheckReferencesVp8(pid + 2, pid + 1); | 427 CheckReferencesVp8(pid + 2, pid + 1); |
| 428 CheckReferencesVp8(pid + 3, pid + 2); | 428 CheckReferencesVp8(pid + 3, pid + 2); |
| 429 } | 429 } |
| 430 | 430 |
| 431 TEST_F(TestRtpFrameReferenceFinder, Vp8DuplicateTl1Frames) { |
| 432 uint16_t pid = Rand(); |
| 433 uint16_t sn = Rand(); |
| 434 |
| 435 InsertVp8(sn, sn, true, pid, 0, 0); |
| 436 InsertVp8(sn + 1, sn + 1, false, pid + 1, 1, 0, true); |
| 437 InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 1); |
| 438 InsertVp8(sn + 3, sn + 3, false, pid + 3, 1, 1); |
| 439 InsertVp8(sn + 3, sn + 3, false, pid + 3, 1, 1); |
| 440 InsertVp8(sn + 4, sn + 4, false, pid + 4, 0, 2); |
| 441 InsertVp8(sn + 5, sn + 5, false, pid + 5, 1, 2); |
| 442 |
| 443 ASSERT_EQ(6UL, frames_from_callback_.size()); |
| 444 CheckReferencesVp8(pid); |
| 445 CheckReferencesVp8(pid + 1, pid); |
| 446 CheckReferencesVp8(pid + 2, pid); |
| 447 CheckReferencesVp8(pid + 3, pid + 1, pid + 2); |
| 448 CheckReferencesVp8(pid + 4, pid + 2); |
| 449 CheckReferencesVp8(pid + 5, pid + 3, pid + 4); |
| 450 } |
| 451 |
| 431 // Test with 1 temporal layer. | 452 // Test with 1 temporal layer. |
| 432 TEST_F(TestRtpFrameReferenceFinder, Vp8TemporalLayersReordering_0) { | 453 TEST_F(TestRtpFrameReferenceFinder, Vp8TemporalLayersReordering_0) { |
| 433 uint16_t pid = Rand(); | 454 uint16_t pid = Rand(); |
| 434 uint16_t sn = Rand(); | 455 uint16_t sn = Rand(); |
| 435 | 456 |
| 436 InsertVp8(sn, sn, true, pid, 0, 1); | 457 InsertVp8(sn, sn, true, pid, 0, 1); |
| 437 InsertVp8(sn + 1, sn + 1, false, pid + 1, 0, 2); | 458 InsertVp8(sn + 1, sn + 1, false, pid + 1, 0, 2); |
| 438 InsertVp8(sn + 3, sn + 3, false, pid + 3, 0, 4); | 459 InsertVp8(sn + 3, sn + 3, false, pid + 3, 0, 4); |
| 439 InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 3); | 460 InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 3); |
| 440 InsertVp8(sn + 5, sn + 5, false, pid + 5, 0, 6); | 461 InsertVp8(sn + 5, sn + 5, false, pid + 5, 0, 6); |
| (...skipping 1050 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1491 reference_finder_->ManageFrame(std::move(frame)); | 1512 reference_finder_->ManageFrame(std::move(frame)); |
| 1492 } | 1513 } |
| 1493 | 1514 |
| 1494 ASSERT_EQ(2UL, frames_from_callback_.size()); | 1515 ASSERT_EQ(2UL, frames_from_callback_.size()); |
| 1495 CheckReferencesVp9(1, 0); | 1516 CheckReferencesVp9(1, 0); |
| 1496 CheckReferencesVp9(129, 0); | 1517 CheckReferencesVp9(129, 0); |
| 1497 } | 1518 } |
| 1498 | 1519 |
| 1499 } // namespace video_coding | 1520 } // namespace video_coding |
| 1500 } // namespace webrtc | 1521 } // namespace webrtc |
| OLD | NEW |