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

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

Issue 1885893002: Remove QualityScaler framerate reduction. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: rebase Created 4 years, 7 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) 2012 The WebRTC project authors. All Rights Reserved. 2 * Copyright (c) 2012 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 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
64 int32_t ret_val = 0; 64 int32_t ret_val = 0;
65 ret_val = spatial_resampler_->SetTargetFrameSize(width, height); 65 ret_val = spatial_resampler_->SetTargetFrameSize(width, height);
66 66
67 if (ret_val < 0) 67 if (ret_val < 0)
68 return ret_val; 68 return ret_val;
69 69
70 vd_->SetTargetFramerate(frame_rate); 70 vd_->SetTargetFramerate(frame_rate);
71 return VPM_OK; 71 return VPM_OK;
72 } 72 }
73 73
74 void VPMFramePreprocessor::SetTargetFramerate(int frame_rate) {
75 if (frame_rate == -1) {
76 vd_->EnableTemporalDecimation(false);
77 } else {
78 vd_->EnableTemporalDecimation(true);
79 vd_->SetTargetFramerate(frame_rate);
80 }
81 }
82
83 void VPMFramePreprocessor::UpdateIncomingframe_rate() { 74 void VPMFramePreprocessor::UpdateIncomingframe_rate() {
84 vd_->UpdateIncomingframe_rate(); 75 vd_->UpdateIncomingframe_rate();
85 } 76 }
86 77
87 uint32_t VPMFramePreprocessor::GetDecimatedFrameRate() { 78 uint32_t VPMFramePreprocessor::GetDecimatedFrameRate() {
88 return vd_->GetDecimatedFrameRate(); 79 return vd_->GetDecimatedFrameRate();
89 } 80 }
90 81
91 uint32_t VPMFramePreprocessor::GetDecimatedWidth() const { 82 uint32_t VPMFramePreprocessor::GetDecimatedWidth() const {
92 return spatial_resampler_->TargetWidth(); 83 return spatial_resampler_->TargetWidth();
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
148 } 139 }
149 ++frame_cnt_; 140 ++frame_cnt_;
150 return current_frame; 141 return current_frame;
151 } 142 }
152 143
153 VideoContentMetrics* VPMFramePreprocessor::GetContentMetrics() const { 144 VideoContentMetrics* VPMFramePreprocessor::GetContentMetrics() const {
154 return content_metrics_; 145 return content_metrics_;
155 } 146 }
156 147
157 } // namespace webrtc 148 } // namespace webrtc
OLDNEW
« no previous file with comments | « webrtc/modules/video_processing/frame_preprocessor.h ('k') | webrtc/modules/video_processing/include/video_processing.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698