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

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

Issue 1466763002: Standalone denoiser (off by default). (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 5 years 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
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"
23 #include "webrtc/video_frame.h"
22 24
23 namespace webrtc { 25 namespace webrtc {
24 26
25 class VPMFramePreprocessor { 27 class VPMFramePreprocessor {
26 public: 28 public:
27 VPMFramePreprocessor(); 29 VPMFramePreprocessor();
28 ~VPMFramePreprocessor(); 30 ~VPMFramePreprocessor();
29 31
30 void Reset(); 32 void Reset();
31 33
(...skipping 26 matching lines...) Expand all
58 int32_t PreprocessFrame(const VideoFrame& frame, 60 int32_t PreprocessFrame(const VideoFrame& frame,
59 VideoFrame** processed_frame); 61 VideoFrame** processed_frame);
60 VideoContentMetrics* ContentMetrics() const; 62 VideoContentMetrics* ContentMetrics() const;
61 63
62 private: 64 private:
63 // The content does not change so much every frame, so to reduce complexity 65 // The content does not change so much every frame, so to reduce complexity
64 // we can compute new content metrics every |kSkipFrameCA| frames. 66 // we can compute new content metrics every |kSkipFrameCA| frames.
65 enum { kSkipFrameCA = 2 }; 67 enum { kSkipFrameCA = 2 };
66 68
67 VideoContentMetrics* content_metrics_; 69 VideoContentMetrics* content_metrics_;
70 VideoFrame denoised_frame_;
68 VideoFrame resampled_frame_; 71 VideoFrame resampled_frame_;
69 VPMSpatialResampler* spatial_resampler_; 72 VPMSpatialResampler* spatial_resampler_;
70 VPMContentAnalysis* ca_; 73 VPMContentAnalysis* ca_;
71 VPMVideoDecimator* vd_; 74 VPMVideoDecimator* vd_;
75 VideoDenoiser* denoiser_;
72 bool enable_ca_; 76 bool enable_ca_;
77 bool enable_denoising_;
73 int frame_cnt_; 78 int frame_cnt_;
74 79
75 }; 80 };
76 81
77 } // namespace webrtc 82 } // namespace webrtc
78 83
79 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ 84 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698