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

Unified Diff: webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc

Issue 2734453002: Drop VP8 frames in case of duplicates in RtpFrameReferenceFinder. (Closed)
Patch Set: Created 3 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc b/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
index 5fa88802a6bb03e33d964d3c097a01b559d9d343..59cf4384cab25419e959031a81d46a62c0700d32 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
@@ -428,6 +428,23 @@ TEST_F(TestRtpFrameReferenceFinder, Vp8TemporalLayers_0) {
CheckReferencesVp8(pid + 3, pid + 2);
}
+TEST_F(TestRtpFrameReferenceFinder, Vp8DuplicateTl1Frames) {
+ uint16_t pid = Rand();
+ uint16_t sn = Rand();
+
+ InsertVp8(sn, sn, true, pid, 0, 0);
+ InsertVp8(sn + 1, sn + 1, false, pid + 1, 1, 0, true);
+ InsertVp8(sn + 2, sn + 2, false, pid + 2, 0, 1);
+ InsertVp8(sn + 3, sn + 3, false, pid + 3, 1, 1);
+ InsertVp8(sn + 3, sn + 3, false, pid + 3, 1, 1);
sprang_webrtc 2017/03/06 09:52:52 Should you add something new after this one to mak
philipel 2017/03/07 10:47:11 Done.
+
+ ASSERT_EQ(4UL, frames_from_callback_.size());
+ CheckReferencesVp8(pid);
+ CheckReferencesVp8(pid + 1, pid);
+ CheckReferencesVp8(pid + 2, pid);
+ CheckReferencesVp8(pid + 3, pid + 1, pid + 2);
+}
+
// Test with 1 temporal layer.
TEST_F(TestRtpFrameReferenceFinder, Vp8TemporalLayersReordering_0) {
uint16_t pid = Rand();

Powered by Google App Engine
This is Rietveld 408576698