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

Side by Side Diff: webrtc/modules/video_processing/video_decimator.cc

Issue 1482913003: Initial VideoProcessing refactoring. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Based on pbos review Created 5 years 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) 2011 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2011 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 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 overshoot_modifier_ = overshoot % target_frame_rate_; 85 overshoot_modifier_ = overshoot % target_frame_rate_;
86 drop = false; 86 drop = false;
87 drop_count_ = 0; 87 drop_count_ = 0;
88 } 88 }
89 } 89 }
90 } 90 }
91 return drop; 91 return drop;
92 } 92 }
93 93
94 94
95 uint32_t VPMVideoDecimator::Decimatedframe_rate() { 95 uint32_t VPMVideoDecimator::GetDecimatedFrameRate() {
96 ProcessIncomingframe_rate(TickTime::MillisecondTimestamp()); 96 ProcessIncomingframe_rate(TickTime::MillisecondTimestamp());
97 if (!enable_temporal_decimation_) { 97 if (!enable_temporal_decimation_) {
98 return static_cast<uint32_t>(incoming_frame_rate_ + 0.5f); 98 return static_cast<uint32_t>(incoming_frame_rate_ + 0.5f);
99 } 99 }
100 return VD_MIN(target_frame_rate_, 100 return VD_MIN(target_frame_rate_,
101 static_cast<uint32_t>(incoming_frame_rate_ + 0.5f)); 101 static_cast<uint32_t>(incoming_frame_rate_ + 0.5f));
102 } 102 }
103 103
104 uint32_t VPMVideoDecimator::Inputframe_rate() { 104 uint32_t VPMVideoDecimator::Inputframe_rate() {
105 ProcessIncomingframe_rate(TickTime::MillisecondTimestamp()); 105 ProcessIncomingframe_rate(TickTime::MillisecondTimestamp());
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
137 incoming_frame_rate_ = 1.0; 137 incoming_frame_rate_ = 1.0;
138 if (diff > 0) { 138 if (diff > 0) {
139 incoming_frame_rate_ = nrOfFrames * 1000.0f / static_cast<float>(diff); 139 incoming_frame_rate_ = nrOfFrames * 1000.0f / static_cast<float>(diff);
140 } 140 }
141 } else { 141 } else {
142 incoming_frame_rate_ = static_cast<float>(nrOfFrames); 142 incoming_frame_rate_ = static_cast<float>(nrOfFrames);
143 } 143 }
144 } 144 }
145 145
146 } // namespace webrtc 146 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698