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 /* | 11 /* |
12 * frame_preprocessor.h | 12 * frame_preprocessor.h |
13 */ | 13 */ |
14 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ | 14 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ |
15 #define WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ | 15 #define WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ |
16 | 16 |
17 #include "webrtc/modules/video_processing/include/video_processing.h" | 17 #include "webrtc/modules/video_processing/include/video_processing.h" |
18 #include "webrtc/modules/video_processing/content_analysis.h" | 18 #include "webrtc/modules/video_processing/content_analysis.h" |
19 #include "webrtc/modules/video_processing/spatial_resampler.h" | 19 #include "webrtc/modules/video_processing/spatial_resampler.h" |
20 #include "webrtc/modules/video_processing/video_decimator.h" | 20 #include "webrtc/modules/video_processing/video_decimator.h" |
21 #include "webrtc/modules/video_processing/video_denoiser.h" | |
21 #include "webrtc/typedefs.h" | 22 #include "webrtc/typedefs.h" |
22 | 23 |
23 namespace webrtc { | 24 namespace webrtc { |
24 | 25 |
25 class VPMFramePreprocessor { | 26 class VPMFramePreprocessor { |
26 public: | 27 public: |
27 VPMFramePreprocessor(); | 28 VPMFramePreprocessor(); |
28 ~VPMFramePreprocessor(); | 29 ~VPMFramePreprocessor(); |
29 | 30 |
30 void Reset(); | 31 void Reset(); |
(...skipping 27 matching lines...) Expand all Loading... | |
58 int32_t PreprocessFrame(const VideoFrame& frame, | 59 int32_t PreprocessFrame(const VideoFrame& frame, |
59 VideoFrame** processed_frame); | 60 VideoFrame** processed_frame); |
60 VideoContentMetrics* ContentMetrics() const; | 61 VideoContentMetrics* ContentMetrics() const; |
61 | 62 |
62 private: | 63 private: |
63 // The content does not change so much every frame, so to reduce complexity | 64 // The content does not change so much every frame, so to reduce complexity |
64 // we can compute new content metrics every |kSkipFrameCA| frames. | 65 // we can compute new content metrics every |kSkipFrameCA| frames. |
65 enum { kSkipFrameCA = 2 }; | 66 enum { kSkipFrameCA = 2 }; |
66 | 67 |
67 VideoContentMetrics* content_metrics_; | 68 VideoContentMetrics* content_metrics_; |
69 VideoFrame denoised_frame_; | |
mflodman
2015/11/25 12:15:19
Already from earlier, but we should have #include
mflodman
2015/11/25 12:15:19
And I'd prefer to call this just 'denoiser_', sinc
stefan-webrtc
2015/11/25 12:16:52
Sounds good to me.
jackychen
2015/11/25 20:29:05
Done.
jackychen
2015/11/25 20:29:05
Done.
| |
68 VideoFrame resampled_frame_; | 70 VideoFrame resampled_frame_; |
69 VPMSpatialResampler* spatial_resampler_; | 71 VPMSpatialResampler* spatial_resampler_; |
70 VPMContentAnalysis* ca_; | 72 VPMContentAnalysis* ca_; |
71 VPMVideoDecimator* vd_; | 73 VPMVideoDecimator* vd_; |
74 VideoDenoiser* video_denoiser_; | |
72 bool enable_ca_; | 75 bool enable_ca_; |
76 bool enable_denoising_; | |
73 int frame_cnt_; | 77 int frame_cnt_; |
74 | 78 |
75 }; | 79 }; |
76 | 80 |
77 } // namespace webrtc | 81 } // namespace webrtc |
78 | 82 |
79 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ | 83 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ |
OLD | NEW |