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

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

Issue 2760893002: Don't recalculate Tl0PicIdx when the VP9 frame has no Tl0PicIdx. (Closed)
Patch Set: Created 3 years, 9 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
« no previous file with comments | « webrtc/modules/video_coding/rtp_frame_reference_finder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 cc361ec25863fdacb8c33c5fccecf8880031f697..7938ff46ef2b1a8760fc5d8eba99bd8a9eae7f9d 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc
@@ -1285,6 +1285,48 @@ TEST_F(TestRtpFrameReferenceFinder, Vp9FlexibleModeTwoSpatialLayersReordered) {
// TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be
// around M59).
+TEST_F(TestRtpFrameReferenceFinder, Vp9PidFix_PidJumpsForwardNoTl0PicIdx) {
+ GofInfoVP9 ss;
+ ss.SetGofInfoVP9(kTemporalStructureMode1);
+
+ VCMPacket packet;
+ packet.timestamp = 0;
+ packet.codec = kVideoCodecVP9;
+ packet.frameType = kVideoFrameKey;
+ packet.markerBit = true;
+ packet.video_header.codecHeader.VP9.flexible_mode = false;
+ packet.video_header.codecHeader.VP9.picture_id = 0;
+ packet.video_header.codecHeader.VP9.temporal_idx = kNoTemporalIdx;
+ packet.video_header.codecHeader.VP9.spatial_idx = kNoSpatialIdx;
+ packet.video_header.codecHeader.VP9.tl0_pic_idx = kNoTl0PicIdx;
+ packet.video_header.codecHeader.VP9.temporal_up_switch = true;
+ packet.video_header.codecHeader.VP9.ss_data_available = true;
+ packet.video_header.codecHeader.VP9.gof = ss;
+
+ {
tommi (sloooow) - chröme 2017/03/20 14:15:27 is there a reason for these scopes? (InsertPacket(
philipel 2017/03/20 14:38:49 Not really necessary but it made it easier to copy
tommi 2017/03/20 16:33:21 I see. Another alternative could of course be: re
+ ref_packet_buffer_->InsertPacket(&packet);
+ std::unique_ptr<RtpFrameObject> frame(
+ new RtpFrameObject(ref_packet_buffer_, 0, 0, 0, 0, 0));
+ reference_finder_->ManageFrame(std::move(frame));
+ }
+
+ packet.timestamp = 1;
+ packet.video_header.codecHeader.VP9.picture_id = 5000;
+
+ {
+ ref_packet_buffer_->InsertPacket(&packet);
+ std::unique_ptr<RtpFrameObject> frame(
+ new RtpFrameObject(ref_packet_buffer_, 0, 0, 0, 0, 0));
+ reference_finder_->ManageFrame(std::move(frame));
+ }
+
+ ASSERT_EQ(2UL, frames_from_callback_.size());
+ CheckReferencesVp9(0, 0);
+ CheckReferencesVp9(128, 0);
+}
+
+// TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be
+// around M59).
TEST_F(TestRtpFrameReferenceFinder, Vp9PidFix_PidJumpsBackwardThenForward) {
GofInfoVP9 ss;
ss.SetGofInfoVP9(kTemporalStructureMode1);
« no previous file with comments | « webrtc/modules/video_coding/rtp_frame_reference_finder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698