OLD | NEW |
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 Loading... |
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 Loading... |
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 |
OLD | NEW |