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

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

Issue 2760893002: Don't recalculate Tl0PicIdx when the VP9 frame has no Tl0PicIdx. (Closed)
Patch Set: Feedback fix + minor refactoring. 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 | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc » ('j') | 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.cc
diff --git a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
index 5926c524bea672302d3dff22d661472570abf38d..b0999cc0e97f8f2d0273e29c07a90540c432c02e 100644
--- a/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
+++ b/webrtc/modules/video_coding/rtp_frame_reference_finder.cc
@@ -676,11 +676,14 @@ bool RtpFrameReferenceFinder::Vp9PidTl0Fix(const RtpFrameObject& frame,
vp9_fix_jump_timestamp_ = frame.timestamp;
gof_info_.clear();
- vp9_fix_tl0_pic_idx_offset_ =
- ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_);
- vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved;
- fixed_tl0 = Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_);
- vp9_fix_last_tl0_pic_idx_ = fixed_tl0;
+ if (fixed_tl0 != kNoTl0PicIdx) {
+ vp9_fix_tl0_pic_idx_offset_ =
+ ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_);
+ vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved;
+ fixed_tl0 =
+ Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_);
+ vp9_fix_last_tl0_pic_idx_ = fixed_tl0;
+ }
}
// Update |vp9_fix_last_picture_id_| with the most recent picture id.
« no previous file with comments | « no previous file | webrtc/modules/video_coding/rtp_frame_reference_finder_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698