Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2015 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2015 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_VIDEO_DENOISER_H_ | 11 #ifndef WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |
| 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ | 12 #define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "webrtc/modules/video_processing/util/denoiser_filter.h" | 16 #include "webrtc/modules/video_processing/util/denoiser_filter.h" |
| 17 #include "webrtc/modules/video_processing/util/noise_estimation.h" | 17 #include "webrtc/modules/video_processing/util/noise_estimation.h" |
| 18 #include "webrtc/modules/video_processing/util/skin_detection.h" | 18 #include "webrtc/modules/video_processing/util/skin_detection.h" |
| 19 | 19 |
| 20 namespace webrtc { | 20 namespace webrtc { |
| 21 | 21 |
| 22 class VideoDenoiser { | 22 class VideoDenoiser { |
| 23 public: | 23 public: |
| 24 explicit VideoDenoiser(bool runtime_cpu_detection); | 24 explicit VideoDenoiser(bool runtime_cpu_detection); |
| 25 void DenoiseFrame(const VideoFrame& frame, | 25 void DenoiseFrame(const VideoFrame& frame, |
| 26 VideoFrame* denoised_frame, | 26 VideoFrame* denoised_frame, |
| 27 VideoFrame* denoised_frame_track, | 27 VideoFrame* denoised_frame_prev, |
| 28 int noise_level_prev); | 28 bool noise_estimation_enabled); |
| 29 | 29 |
| 30 private: | 30 private: |
| 31 int width_; | 31 int width_; |
| 32 int height_; | 32 int height_; |
| 33 CpuType cpu_type_; | 33 CpuType cpu_type_; |
| 34 std::unique_ptr<DenoiseMetrics[]> metrics_; | |
| 35 std::unique_ptr<DenoiserFilter> filter_; | 34 std::unique_ptr<DenoiserFilter> filter_; |
| 36 std::unique_ptr<NoiseEstimation> ne_; | 35 std::unique_ptr<NoiseEstimation> ne_; |
| 37 std::unique_ptr<uint8_t[]> d_status_; | 36 std::unique_ptr<uint8_t[]> d_status_; |
| 38 #if EXPERIMENTAL | 37 std::unique_ptr<uint8_t[]> d_status_red_; |
|
marpan
2016/04/11 19:16:44
why not use a better name here?
does red mean mov
jackychen_
2016/04/12 17:02:53
Done.
| |
| 39 std::unique_ptr<uint8_t[]> d_status_tmp1_; | |
| 40 std::unique_ptr<uint8_t[]> d_status_tmp2_; | |
| 41 #endif | |
| 42 std::unique_ptr<uint8_t[]> x_density_; | 38 std::unique_ptr<uint8_t[]> x_density_; |
| 43 std::unique_ptr<uint8_t[]> y_density_; | 39 std::unique_ptr<uint8_t[]> y_density_; |
| 40 std::unique_ptr<DenoiserDecision[]> mb_filter_decision_; | |
| 44 }; | 41 }; |
| 45 | 42 |
| 46 } // namespace webrtc | 43 } // namespace webrtc |
| 47 | 44 |
| 48 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ | 45 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |
| OLD | NEW |