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

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

Issue 2286633002: Delete IsZeroSize method. (Closed)
Patch Set: Created 4 years, 3 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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 void VPMFramePreprocessor::EnableDenoising(bool enable) { 78 void VPMFramePreprocessor::EnableDenoising(bool enable) {
79 if (enable) { 79 if (enable) {
80 denoiser_.reset(new VideoDenoiser(true)); 80 denoiser_.reset(new VideoDenoiser(true));
81 } else { 81 } else {
82 denoiser_.reset(); 82 denoiser_.reset();
83 } 83 }
84 } 84 }
85 85
86 const VideoFrame* VPMFramePreprocessor::PreprocessFrame( 86 const VideoFrame* VPMFramePreprocessor::PreprocessFrame(
87 const VideoFrame& frame) { 87 const VideoFrame& frame) {
88 if (frame.IsZeroSize()) {
89 return nullptr;
90 }
91 88
92 vd_->UpdateIncomingframe_rate(); 89 vd_->UpdateIncomingframe_rate();
93 if (vd_->DropFrame()) { 90 if (vd_->DropFrame()) {
94 return nullptr; 91 return nullptr;
95 } 92 }
96 93
97 const VideoFrame* current_frame = &frame; 94 const VideoFrame* current_frame = &frame;
98 if (denoiser_) { 95 if (denoiser_) {
99 rtc::scoped_refptr<I420Buffer>* denoised_buffer = &denoised_buffer_[0]; 96 rtc::scoped_refptr<I420Buffer>* denoised_buffer = &denoised_buffer_[0];
100 rtc::scoped_refptr<I420Buffer>* denoised_buffer_prev = &denoised_buffer_[1]; 97 rtc::scoped_refptr<I420Buffer>* denoised_buffer_prev = &denoised_buffer_[1];
(...skipping 21 matching lines...) Expand all
122 return nullptr; 119 return nullptr;
123 } 120 }
124 current_frame = &resampled_frame_; 121 current_frame = &resampled_frame_;
125 } 122 }
126 123
127 ++frame_cnt_; 124 ++frame_cnt_;
128 return current_frame; 125 return current_frame;
129 } 126 }
130 127
131 } // namespace webrtc 128 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698