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

Side by Side Diff: webrtc/modules/video_coding/frame_buffer2.cc

Issue 2985283002: Unwrap picture ids in the RtpFrameReferencerFinder. (Closed)
Patch Set: . 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 238 matching lines...) Expand 10 before | Expand all | Expand 10 after
249 new_continuous_frame_event_.Set(); 249 new_continuous_frame_event_.Set();
250 } 250 }
251 251
252 void FrameBuffer::UpdateRtt(int64_t rtt_ms) { 252 void FrameBuffer::UpdateRtt(int64_t rtt_ms) {
253 rtc::CritScope lock(&crit_); 253 rtc::CritScope lock(&crit_);
254 jitter_estimator_->UpdateRtt(rtt_ms); 254 jitter_estimator_->UpdateRtt(rtt_ms);
255 } 255 }
256 256
257 bool FrameBuffer::ValidReferences(const FrameObject& frame) const { 257 bool FrameBuffer::ValidReferences(const FrameObject& frame) const {
258 for (size_t i = 0; i < frame.num_references; ++i) { 258 for (size_t i = 0; i < frame.num_references; ++i) {
259 if (AheadOrAt(frame.references[i], frame.picture_id)) 259 if (AheadOrAt<uint16_t>(frame.references[i], frame.picture_id))
260 return false; 260 return false;
261 for (size_t j = i + 1; j < frame.num_references; ++j) { 261 for (size_t j = i + 1; j < frame.num_references; ++j) {
262 if (frame.references[i] == frame.references[j]) 262 if (frame.references[i] == frame.references[j])
263 return false; 263 return false;
264 } 264 }
265 } 265 }
266 266
267 if (frame.inter_layer_predicted && frame.spatial_layer == 0) 267 if (frame.inter_layer_predicted && frame.spatial_layer == 0)
268 return false; 268 return false;
269 269
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
566 frames_.clear(); 566 frames_.clear();
567 last_decoded_frame_it_ = frames_.end(); 567 last_decoded_frame_it_ = frames_.end();
568 last_continuous_frame_it_ = frames_.end(); 568 last_continuous_frame_it_ = frames_.end();
569 next_frame_it_ = frames_.end(); 569 next_frame_it_ = frames_.end();
570 num_frames_history_ = 0; 570 num_frames_history_ = 0;
571 num_frames_buffered_ = 0; 571 num_frames_buffered_ = 0;
572 } 572 }
573 573
574 } // namespace video_coding 574 } // namespace video_coding
575 } // namespace webrtc 575 } // namespace webrtc
OLDNEW
« no previous file with comments | « no previous file | webrtc/modules/video_coding/frame_object.h » ('j') | webrtc/modules/video_coding/rtp_frame_reference_finder.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698