Chromium Code Reviews| 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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 118 EXCLUSIVE_LOCKS_REQUIRED(crit_); | 118 EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 119 | 119 |
| 120 // Check if there is a frame with the up-switch flag set in the interval | 120 // Check if there is a frame with the up-switch flag set in the interval |
| 121 // (|pid_ref|, |picture_id|) with temporal layer smaller than |temporal_idx|. | 121 // (|pid_ref|, |picture_id|) with temporal layer smaller than |temporal_idx|. |
| 122 bool UpSwitchInIntervalVp9(uint16_t picture_id, | 122 bool UpSwitchInIntervalVp9(uint16_t picture_id, |
| 123 uint8_t temporal_idx, | 123 uint8_t temporal_idx, |
| 124 uint16_t pid_ref) EXCLUSIVE_LOCKS_REQUIRED(crit_); | 124 uint16_t pid_ref) EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 125 | 125 |
| 126 // Unwrap |frame|s picture id and its references to 16 bits. | 126 // Unwrap |frame|s picture id and its references to 16 bits. |
| 127 void UnwrapPictureIds(RtpFrameObject* frame) EXCLUSIVE_LOCKS_REQUIRED(crit_); | 127 void UnwrapPictureIds(RtpFrameObject* frame) EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 128 // All picture ids are unwrapped to 16 bits. | |
| 129 uint16_t UnwrapPictureId(uint16_t picture_id) EXCLUSIVE_LOCKS_REQUIRED(crit_); | |
| 130 | 128 |
| 131 // Returns true if the frame is old and should be dropped. | 129 // Returns true if the frame is old and should be dropped. |
| 132 // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be | 130 // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be |
| 133 // around M59). | 131 // around M59). |
| 134 bool Vp9PidTl0Fix(const RtpFrameObject& frame, | 132 bool Vp9PidTl0Fix(const RtpFrameObject& frame, |
| 135 int16_t* picture_id, | 133 int16_t* picture_id, |
| 136 int16_t* tl0_pic_idx) EXCLUSIVE_LOCKS_REQUIRED(crit_); | 134 int16_t* tl0_pic_idx) EXCLUSIVE_LOCKS_REQUIRED(crit_); |
| 137 | 135 |
| 138 // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be | 136 // TODO(philipel): Remove when VP9 PID/TL0 does not jump mid-stream (should be |
| 139 // around M59). | 137 // around M59). |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 206 std::array<std::set<uint16_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>, | 204 std::array<std::set<uint16_t, DescendingSeqNumComp<uint16_t, kPicIdLength>>, |
| 207 kMaxTemporalLayers> | 205 kMaxTemporalLayers> |
| 208 missing_frames_for_layer_ GUARDED_BY(crit_); | 206 missing_frames_for_layer_ GUARDED_BY(crit_); |
| 209 | 207 |
| 210 // How far frames have been cleared by sequence number. A frame will be | 208 // How far frames have been cleared by sequence number. A frame will be |
| 211 // cleared if it contains a packet with a sequence number older than | 209 // cleared if it contains a packet with a sequence number older than |
| 212 // |cleared_to_seq_num_|. | 210 // |cleared_to_seq_num_|. |
| 213 int cleared_to_seq_num_ GUARDED_BY(crit_); | 211 int cleared_to_seq_num_ GUARDED_BY(crit_); |
| 214 | 212 |
| 215 OnCompleteFrameCallback* frame_callback_; | 213 OnCompleteFrameCallback* frame_callback_; |
| 214 | |
| 215 SeqNumUnwrapper<uint16_t> generic_unwrapper_ GUARDED_BY(crit_); | |
|
terelius
2017/08/18 11:53:16
It is not clear to me what should be unwrapped wit
philipel
2017/08/24 10:46:10
Added comments.
| |
| 216 SeqNumUnwrapper<uint16_t, kPicIdLength> unwrapper_ GUARDED_BY(crit_); | |
| 216 }; | 217 }; |
| 217 | 218 |
| 218 } // namespace video_coding | 219 } // namespace video_coding |
| 219 } // namespace webrtc | 220 } // namespace webrtc |
| 220 | 221 |
| 221 #endif // WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ | 222 #endif // WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ |
| OLD | NEW |