OLD | NEW |
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 |
11 #include "webrtc/modules/video_processing/frame_preprocessor.h" | 11 #include "webrtc/modules/video_processing/frame_preprocessor.h" |
12 | 12 |
13 namespace webrtc { | 13 namespace webrtc { |
14 | 14 |
15 VPMFramePreprocessor::VPMFramePreprocessor() | 15 VPMFramePreprocessor::VPMFramePreprocessor() |
16 : content_metrics_(nullptr), | 16 : content_metrics_(nullptr), |
17 resampled_frame_(), | 17 resampled_frame_(), |
18 enable_ca_(false), | 18 enable_ca_(false), |
19 enable_denoising_(false), | 19 enable_denoising_(false), |
20 frame_cnt_(0) { | 20 frame_cnt_(0) { |
21 spatial_resampler_ = new VPMSimpleSpatialResampler(); | 21 spatial_resampler_ = new VPMSimpleSpatialResampler(); |
22 ca_ = new VPMContentAnalysis(true); | 22 ca_ = new VPMContentAnalysis(true); |
23 vd_ = new VPMVideoDecimator(); | 23 vd_ = new VPMVideoDecimator(); |
24 if (enable_denoising_) { | 24 if (enable_denoising_) { |
25 denoiser_ = new VideoDenoiser(); | 25 denoiser_ = new VideoDenoiser(true); |
26 } else { | 26 } else { |
27 denoiser_ = nullptr; | 27 denoiser_ = nullptr; |
28 } | 28 } |
29 } | 29 } |
30 | 30 |
31 VPMFramePreprocessor::~VPMFramePreprocessor() { | 31 VPMFramePreprocessor::~VPMFramePreprocessor() { |
32 Reset(); | 32 Reset(); |
33 delete ca_; | 33 delete ca_; |
34 delete vd_; | 34 delete vd_; |
35 if (enable_denoising_) | 35 if (enable_denoising_) |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 } | 146 } |
147 ++frame_cnt_; | 147 ++frame_cnt_; |
148 return VPM_OK; | 148 return VPM_OK; |
149 } | 149 } |
150 | 150 |
151 VideoContentMetrics* VPMFramePreprocessor::ContentMetrics() const { | 151 VideoContentMetrics* VPMFramePreprocessor::ContentMetrics() const { |
152 return content_metrics_; | 152 return content_metrics_; |
153 } | 153 } |
154 | 154 |
155 } // namespace | 155 } // namespace |
OLD | NEW |