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

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

Issue 1822333003: External denoiser based on noise estimation and moving object detection. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 9 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
(Empty)
1 /*
2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved.
3 *
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
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_NOISE_ESTIMATION_H_
12 #define WEBRTC_MODULES_VIDEO_PROCESSING_NOISE_ESTIMATION_H_
13
14 #include <climits>
15
16 #include "webrtc/base/scoped_ptr.h"
17 #include "webrtc/modules/include/module_common_types.h"
18 #include "webrtc/modules/video_processing/include/video_processing_defines.h"
19
20 namespace webrtc {
21
22 #define DISPLAY 0
23
24 const int kNoiseThreshold = 120;
25 // Disable the threshold for now.
26 const int kNoiseThresholdHigh = INT_MAX;
27
28 class NoiseEstimation {
29 public:
30 void SetResolution(int width, int height);
31 void GetNoise(int mb_index, uint32_t var, uint32_t luma);
32 void ResetConsecLowVar(int mb_index);
33 // 0: low, 1: medium, 2: high
34 // However, since kNoiseThresholdHigh is disabled for now,
35 // there are only 2 levels: low and high.
36 uint8_t GetNoiseLevel();
37
38 private:
39 int width_;
40 int height_;
41 uint32_t noise_var_;
42 double noise_var_accum_;
43 int num_noisy_block_;
44 int num_stationary_block_;
45 double percent_non_montion_block_;
46 rtc::scoped_ptr<uint32_t[]> consec_low_var_;
47 };
48
49 } // namespace webrtc
50
51 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_NOISE_ESTIMATION_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698