jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 1 | /* |
| 2 | * Copyright (c) 2015 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_VIDEO_DENOISER_H_ |
| 12 | #define WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |
| 13 | |
kwiberg | e065fcf | 2016-03-02 01:01:11 -0800 | [diff] [blame^] | 14 | #include <memory> |
| 15 | |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 16 | #include "webrtc/modules/video_processing/util/denoiser_filter.h" |
| 17 | #include "webrtc/modules/video_processing/util/skin_detection.h" |
| 18 | |
| 19 | namespace webrtc { |
| 20 | |
| 21 | class VideoDenoiser { |
| 22 | public: |
jackychen | 67e94fb | 2016-01-11 21:34:07 -0800 | [diff] [blame] | 23 | explicit VideoDenoiser(bool runtime_cpu_detection); |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 24 | void DenoiseFrame(const VideoFrame& frame, VideoFrame* denoised_frame); |
| 25 | |
| 26 | private: |
mflodman | 99ab944 | 2015-12-07 22:54:50 -0800 | [diff] [blame] | 27 | void TrailingReduction(int mb_rows, |
| 28 | int mb_cols, |
| 29 | const uint8_t* y_src, |
| 30 | int stride_y, |
| 31 | uint8_t* y_dst); |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 32 | int width_; |
| 33 | int height_; |
kwiberg | e065fcf | 2016-03-02 01:01:11 -0800 | [diff] [blame^] | 34 | std::unique_ptr<DenoiseMetrics[]> metrics_; |
| 35 | std::unique_ptr<DenoiserFilter> filter_; |
jackychen | 8f9902a | 2015-11-26 02:59:48 -0800 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | } // namespace webrtc |
| 39 | |
| 40 | #endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_ |