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

Side by Side Diff: webrtc/modules/video_coding/rtp_frame_reference_finder.h

Issue 2985283002: Unwrap picture ids in the RtpFrameReferencerFinder. (Closed)
Patch Set: Rebase Feedback Created 3 years, 4 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
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 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 // Unwrapper used to unwrap generic RTP streams. In a generic stream we derive
216 // a picture id from the packet sequence number.
217 SeqNumUnwrapper<uint16_t> generic_unwrapper_ GUARDED_BY(crit_);
218
219 // Unwrapper used to unwrap VP8/VP9 streams which have their picture id
220 // specified.
221 SeqNumUnwrapper<uint16_t, kPicIdLength> unwrapper_ GUARDED_BY(crit_);
terelius 2017/08/30 11:59:32 vpx_unwrapper_?
216 }; 222 };
217 223
218 } // namespace video_coding 224 } // namespace video_coding
219 } // namespace webrtc 225 } // namespace webrtc
220 226
221 #endif // WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_ 227 #endif // WEBRTC_MODULES_VIDEO_CODING_RTP_FRAME_REFERENCE_FINDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698