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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 // frames that was inserted into the FrameBuffer. 669 // frames that was inserted into the FrameBuffer.
670 vp9_fix_pid_offset_ = ForwardDiff<uint16_t, kPicIdLength>( 670 vp9_fix_pid_offset_ = ForwardDiff<uint16_t, kPicIdLength>(
671 *picture_id, vp9_fix_last_picture_id_); 671 *picture_id, vp9_fix_last_picture_id_);
672 vp9_fix_pid_offset_ += kMaxPidDiff; 672 vp9_fix_pid_offset_ += kMaxPidDiff;
673 673
674 fixed_pid = Add<kPicIdLength>(*picture_id, vp9_fix_pid_offset_); 674 fixed_pid = Add<kPicIdLength>(*picture_id, vp9_fix_pid_offset_);
675 vp9_fix_last_picture_id_ = fixed_pid; 675 vp9_fix_last_picture_id_ = fixed_pid;
676 vp9_fix_jump_timestamp_ = frame.timestamp; 676 vp9_fix_jump_timestamp_ = frame.timestamp;
677 gof_info_.clear(); 677 gof_info_.clear();
678 678
679 vp9_fix_tl0_pic_idx_offset_ = 679 if (fixed_tl0 != kNoTl0PicIdx) {
680 ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_); 680 vp9_fix_tl0_pic_idx_offset_ =
681 vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved; 681 ForwardDiff<uint8_t>(*tl0_pic_idx, vp9_fix_last_tl0_pic_idx_);
682 fixed_tl0 = Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_); 682 vp9_fix_tl0_pic_idx_offset_ += kMaxGofSaved;
683 vp9_fix_last_tl0_pic_idx_ = fixed_tl0; 683 fixed_tl0 =
684 Add<kTl0PicIdLength>(*tl0_pic_idx, vp9_fix_tl0_pic_idx_offset_);
685 vp9_fix_last_tl0_pic_idx_ = fixed_tl0;
686 }
684 } 687 }
685 688
686 // Update |vp9_fix_last_picture_id_| with the most recent picture id. 689 // Update |vp9_fix_last_picture_id_| with the most recent picture id.
687 if (AheadOf<uint16_t, kPicIdLength>(fixed_pid, vp9_fix_last_picture_id_)) 690 if (AheadOf<uint16_t, kPicIdLength>(fixed_pid, vp9_fix_last_picture_id_))
688 vp9_fix_last_picture_id_ = fixed_pid; 691 vp9_fix_last_picture_id_ = fixed_pid;
689 692
690 *picture_id = fixed_pid; 693 *picture_id = fixed_pid;
691 *tl0_pic_idx = fixed_tl0; 694 *tl0_pic_idx = fixed_tl0;
692 695
693 return false; 696 return false;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
748 if (!gof_info_.empty() && 751 if (!gof_info_.empty() &&
749 AheadOf<uint8_t>(gof_info_.begin()->first, fixed_tl0)) { 752 AheadOf<uint8_t>(gof_info_.begin()->first, fixed_tl0)) {
750 return true; 753 return true;
751 } 754 }
752 } 755 }
753 return false; 756 return false;
754 } 757 }
755 758
756 } // namespace video_coding 759 } // namespace video_coding
757 } // namespace webrtc 760 } // namespace webrtc
OLDNEW
« 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