blob: 0fe205363942e7fbf73ba07d5b4de95f95833377 [file] [log] [blame]
jackychen8f9902a2015-11-26 02:59:48 -08001/*
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
kwiberge065fcf2016-03-02 01:01:11 -080014#include <memory>
15
jackychen8f9902a2015-11-26 02:59:48 -080016#include "webrtc/modules/video_processing/util/denoiser_filter.h"
17#include "webrtc/modules/video_processing/util/skin_detection.h"
18
19namespace webrtc {
20
21class VideoDenoiser {
22 public:
jackychen67e94fb2016-01-11 21:34:07 -080023 explicit VideoDenoiser(bool runtime_cpu_detection);
jackychen8f9902a2015-11-26 02:59:48 -080024 void DenoiseFrame(const VideoFrame& frame, VideoFrame* denoised_frame);
25
26 private:
mflodman99ab9442015-12-07 22:54:50 -080027 void TrailingReduction(int mb_rows,
28 int mb_cols,
29 const uint8_t* y_src,
30 int stride_y,
31 uint8_t* y_dst);
jackychen8f9902a2015-11-26 02:59:48 -080032 int width_;
33 int height_;
kwiberge065fcf2016-03-02 01:01:11 -080034 std::unique_ptr<DenoiseMetrics[]> metrics_;
35 std::unique_ptr<DenoiserFilter> filter_;
jackychen8f9902a2015-11-26 02:59:48 -080036};
37
38} // namespace webrtc
39
40#endif // WEBRTC_MODULES_VIDEO_PROCESSING_VIDEO_DENOISER_H_