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

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

Issue 1492053003: Add unit test for stand-alone denoiser and fixed some bugs. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: remove gtest_disabled.h Created 4 years, 11 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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
88 88
89 uint32_t VPMFramePreprocessor::GetDecimatedWidth() const { 89 uint32_t VPMFramePreprocessor::GetDecimatedWidth() const {
90 return spatial_resampler_->TargetWidth(); 90 return spatial_resampler_->TargetWidth();
91 } 91 }
92 92
93 uint32_t VPMFramePreprocessor::GetDecimatedHeight() const { 93 uint32_t VPMFramePreprocessor::GetDecimatedHeight() const {
94 return spatial_resampler_->TargetHeight(); 94 return spatial_resampler_->TargetHeight();
95 } 95 }
96 96
97 void VPMFramePreprocessor::EnableDenosing(bool enable) { 97 void VPMFramePreprocessor::EnableDenosing(bool enable) {
98 denoiser_.reset(new VideoDenoiser()); 98 denoiser_.reset(new VideoDenoiser(true));
99 } 99 }
100 100
101 const VideoFrame* VPMFramePreprocessor::PreprocessFrame( 101 const VideoFrame* VPMFramePreprocessor::PreprocessFrame(
102 const VideoFrame& frame) { 102 const VideoFrame& frame) {
103 if (frame.IsZeroSize()) { 103 if (frame.IsZeroSize()) {
104 return nullptr; 104 return nullptr;
105 } 105 }
106 106
107 vd_->UpdateIncomingframe_rate(); 107 vd_->UpdateIncomingframe_rate();
108 if (vd_->DropFrame()) { 108 if (vd_->DropFrame()) {
(...skipping 23 matching lines...) Expand all
132 } 132 }
133 ++frame_cnt_; 133 ++frame_cnt_;
134 return current_frame; 134 return current_frame;
135 } 135 }
136 136
137 VideoContentMetrics* VPMFramePreprocessor::GetContentMetrics() const { 137 VideoContentMetrics* VPMFramePreprocessor::GetContentMetrics() const {
138 return content_metrics_; 138 return content_metrics_;
139 } 139 }
140 140
141 } // namespace webrtc 141 } // namespace webrtc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698