| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2016 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2016 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 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ |
| 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ | 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/base/scoped_ptr.h" | 16 #include "webrtc/base/scoped_ptr.h" |
| 17 #include "webrtc/modules/include/module_common_types.h" | 17 #include "webrtc/modules/include/module_common_types.h" |
| 18 #include "webrtc/modules/video_processing/include/video_processing_defines.h" | 18 #include "webrtc/modules/video_processing/include/video_processing_defines.h" |
| 19 #include "webrtc/modules/video_processing/util/denoiser_filter.h" | 19 #include "webrtc/modules/video_processing/util/denoiser_filter.h" |
| 20 | 20 |
| 21 namespace webrtc { | 21 namespace webrtc { |
| 22 | 22 |
| 23 #define DISPLAY 0 // Rectangle diagnostics | 23 #define DISPLAY 0 // Rectangle diagnostics |
| 24 #define DISPLAYNEON 0 // Rectangle diagnostics on NEON | 24 #define DISPLAYNEON 0 // Rectangle diagnostics on NEON |
| 25 | 25 |
| 26 const int kNoiseThreshold = 200; | 26 const int kNoiseThreshold = 150; |
| 27 const int kNoiseThresholdNeon = 70; | 27 const int kNoiseThresholdNeon = 70; |
| 28 const int kConsecLowVarFrame = 6; | 28 const int kConsecLowVarFrame = 6; |
| 29 const int kAverageLumaMin = 20; | 29 const int kAverageLumaMin = 20; |
| 30 const int kAverageLumaMax = 220; | 30 const int kAverageLumaMax = 220; |
| 31 const int kBlockSelectionVarMax = kNoiseThreshold << 1; | 31 const int kBlockSelectionVarMax = kNoiseThreshold << 1; |
| 32 | 32 |
| 33 // TODO(jackychen): To test different sampling strategy. | 33 // TODO(jackychen): To test different sampling strategy. |
| 34 // Collect noise data every NOISE_SUBSAMPLE_INTERVAL blocks. | 34 // Collect noise data every NOISE_SUBSAMPLE_INTERVAL blocks. |
| 35 #define NOISE_SUBSAMPLE_INTERVAL 41 | 35 #define NOISE_SUBSAMPLE_INTERVAL 41 |
| 36 | 36 |
| (...skipping 19 matching lines...) Expand all Loading... |
| 56 CpuType cpu_type_; | 56 CpuType cpu_type_; |
| 57 uint32_t noise_var_; | 57 uint32_t noise_var_; |
| 58 double noise_var_accum_; | 58 double noise_var_accum_; |
| 59 double percent_static_block_; | 59 double percent_static_block_; |
| 60 std::unique_ptr<uint32_t[]> consec_low_var_; | 60 std::unique_ptr<uint32_t[]> consec_low_var_; |
| 61 }; | 61 }; |
| 62 | 62 |
| 63 } // namespace webrtc | 63 } // namespace webrtc |
| 64 | 64 |
| 65 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ | 65 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_UTIL_NOISE_ESTIMATION_H_ |
| OLD | NEW |