Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(487)

Side by Side Diff: webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc

Issue 2392313002: Drop VP8 frames older than the last sync frame in the RtpFrameReferenceFinder. (Closed)
Patch Set: Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 ASSERT_EQ(7UL, frames_from_callback_.size()); 590 ASSERT_EQ(7UL, frames_from_callback_.size());
591 CheckReferencesVp8(pid); 591 CheckReferencesVp8(pid);
592 CheckReferencesVp8(pid + 1, pid); 592 CheckReferencesVp8(pid + 1, pid);
593 CheckReferencesVp8(pid + 2, pid); 593 CheckReferencesVp8(pid + 2, pid);
594 CheckReferencesVp8(pid + 4, pid + 2); 594 CheckReferencesVp8(pid + 4, pid + 2);
595 CheckReferencesVp8(pid + 5, pid + 4); 595 CheckReferencesVp8(pid + 5, pid + 4);
596 CheckReferencesVp8(pid + 6, pid + 4); 596 CheckReferencesVp8(pid + 6, pid + 4);
597 CheckReferencesVp8(pid + 7, pid + 6, pid + 5); 597 CheckReferencesVp8(pid + 7, pid + 6, pid + 5);
598 } 598 }
599 599
600 TEST_F(TestRtpFrameReferenceFinder, Vp8Tl1SyncFrameAfterTl1Frame) {
601 InsertVp8(1000, 1000, true, 1, 0, 247, true);
602 InsertVp8(1001, 1001, false, 3, 0, 248, false);
603 InsertVp8(1002, 1002, false, 4, 1, 248, false); // Will be dropped
604 InsertVp8(1003, 1003, false, 5, 1, 248, true); // due to this frame.
605
606 ASSERT_EQ(3UL, frames_from_callback_.size());
607 CheckReferencesVp8(1);
608 CheckReferencesVp8(3, 1);
609 CheckReferencesVp8(5, 3);
610 }
611
600 TEST_F(TestRtpFrameReferenceFinder, Vp9GofInsertOneFrame) { 612 TEST_F(TestRtpFrameReferenceFinder, Vp9GofInsertOneFrame) {
601 uint16_t pid = Rand(); 613 uint16_t pid = Rand();
602 uint16_t sn = Rand(); 614 uint16_t sn = Rand();
603 GofInfoVP9 ss; 615 GofInfoVP9 ss;
604 ss.SetGofInfoVP9(kTemporalStructureMode1); 616 ss.SetGofInfoVP9(kTemporalStructureMode1);
605 617
606 InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss); 618 InsertVp9Gof(sn, sn, true, pid, 0, 0, 0, false, &ss);
607 619
608 CheckReferencesVp9(pid, 0); 620 CheckReferencesVp9(pid, 0);
609 } 621 }
(...skipping 594 matching lines...) Expand 10 before | Expand all | Expand 10 after
1204 CheckReferencesVp9(pid + 5, 1, pid + 4); 1216 CheckReferencesVp9(pid + 5, 1, pid + 4);
1205 CheckReferencesVp9(pid + 6, 0, pid + 4); 1217 CheckReferencesVp9(pid + 6, 0, pid + 4);
1206 CheckReferencesVp9(pid + 6, 1, pid + 5); 1218 CheckReferencesVp9(pid + 6, 1, pid + 5);
1207 CheckReferencesVp9(pid + 7, 1, pid + 6); 1219 CheckReferencesVp9(pid + 7, 1, pid + 6);
1208 CheckReferencesVp9(pid + 8, 0, pid + 6); 1220 CheckReferencesVp9(pid + 8, 0, pid + 6);
1209 CheckReferencesVp9(pid + 8, 1, pid + 7); 1221 CheckReferencesVp9(pid + 8, 1, pid + 7);
1210 } 1222 }
1211 1223
1212 } // namespace video_coding 1224 } // namespace video_coding
1213 } // namespace webrtc 1225 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698