| 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 653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 InsertVp8(1001, 1001, false, 3, 0, 248, false); | 664 InsertVp8(1001, 1001, false, 3, 0, 248, false); |
| 665 InsertVp8(1002, 1002, false, 4, 1, 248, false); // Will be dropped | 665 InsertVp8(1002, 1002, false, 4, 1, 248, false); // Will be dropped |
| 666 InsertVp8(1003, 1003, false, 5, 1, 248, true); // due to this frame. | 666 InsertVp8(1003, 1003, false, 5, 1, 248, true); // due to this frame. |
| 667 | 667 |
| 668 ASSERT_EQ(3UL, frames_from_callback_.size()); | 668 ASSERT_EQ(3UL, frames_from_callback_.size()); |
| 669 CheckReferencesVp8(1); | 669 CheckReferencesVp8(1); |
| 670 CheckReferencesVp8(3, 1); | 670 CheckReferencesVp8(3, 1); |
| 671 CheckReferencesVp8(5, 3); | 671 CheckReferencesVp8(5, 3); |
| 672 } | 672 } |
| 673 | 673 |
| 674 TEST_F(TestRtpFrameReferenceFinder, Vp8DetectMissingFrame_0212) { |
| 675 InsertVp8(1, 1, true, 1, 0, 1, false); |
| 676 InsertVp8(2, 2, false, 2, 2, 1, true); |
| 677 InsertVp8(3, 3, false, 3, 1, 1, true); |
| 678 InsertVp8(4, 4, false, 4, 2, 1, false); |
| 679 |
| 680 InsertVp8(6, 6, false, 6, 2, 2, false); |
| 681 InsertVp8(7, 7, false, 7, 1, 2, false); |
| 682 InsertVp8(8, 8, false, 8, 2, 2, false); |
| 683 ASSERT_EQ(4UL, frames_from_callback_.size()); |
| 684 |
| 685 InsertVp8(5, 5, false, 5, 0, 2, false); |
| 686 ASSERT_EQ(8UL, frames_from_callback_.size()); |
| 687 |
| 688 CheckReferencesVp8(1); |
| 689 CheckReferencesVp8(2, 1); |
| 690 CheckReferencesVp8(3, 1); |
| 691 CheckReferencesVp8(4, 3, 2, 1); |
| 692 |
| 693 CheckReferencesVp8(5, 1); |
| 694 CheckReferencesVp8(6, 5, 4, 3); |
| 695 CheckReferencesVp8(7, 5, 3); |
| 696 CheckReferencesVp8(8, 7, 6, 5); |
| 697 } |
| 698 |
| 674 TEST_F(TestRtpFrameReferenceFinder, Vp9GofInsertOneFrame) { | 699 TEST_F(TestRtpFrameReferenceFinder, Vp9GofInsertOneFrame) { |
| 675 uint16_t pid = Rand(); | 700 uint16_t pid = Rand(); |
| 676 uint16_t sn = Rand(); | 701 uint16_t sn = Rand(); |
| 677 GofInfoVP9 ss; | 702 GofInfoVP9 ss; |
| 678 ss.SetGofInfoVP9(kTemporalStructureMode1); | 703 ss.SetGofInfoVP9(kTemporalStructureMode1); |
| 679 | 704 |
| 680 InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss); | 705 InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss); |
| 681 | 706 |
| 682 CheckReferencesVp9(pid, 0); | 707 CheckReferencesVp9(pid, 0); |
| 683 } | 708 } |
| (...skipping 822 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1506 reference_finder_->ManageFrame(std::unique_ptr<RtpFrameObject>( | 1531 reference_finder_->ManageFrame(std::unique_ptr<RtpFrameObject>( |
| 1507 new RtpFrameObject(ref_packet_buffer_, 0, 0, 0, 0, 0))); | 1532 new RtpFrameObject(ref_packet_buffer_, 0, 0, 0, 0, 0))); |
| 1508 | 1533 |
| 1509 ASSERT_EQ(2UL, frames_from_callback_.size()); | 1534 ASSERT_EQ(2UL, frames_from_callback_.size()); |
| 1510 CheckReferencesVp9(1, 0); | 1535 CheckReferencesVp9(1, 0); |
| 1511 CheckReferencesVp9(129, 0); | 1536 CheckReferencesVp9(129, 0); |
| 1512 } | 1537 } |
| 1513 | 1538 |
| 1514 } // namespace video_coding | 1539 } // namespace video_coding |
| 1515 } // namespace webrtc | 1540 } // namespace webrtc |
| OLD | NEW |