blob: 60645fbdbf889ec46009f111f2ce1c06abbaa406 [file] [log] [blame]
niklase@google.com470e71d2011-07-07 08:21:25 +00001/*
2 * Copyright (c) 2011 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
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000011#ifndef WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
12#define WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
niklase@google.com470e71d2011-07-07 08:21:25 +000013
pbos@webrtc.org6f3d8fc2013-05-27 14:12:16 +000014#include "webrtc/modules/video_processing/main/interface/video_processing.h"
15#include "webrtc/typedefs.h"
niklase@google.com470e71d2011-07-07 08:21:25 +000016
17namespace webrtc {
18
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000019class VPMDenoising {
20 public:
21 VPMDenoising();
22 ~VPMDenoising();
niklase@google.com470e71d2011-07-07 08:21:25 +000023
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000024 int32_t ChangeUniqueId(int32_t id);
niklase@google.com470e71d2011-07-07 08:21:25 +000025
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000026 void Reset();
niklase@google.com470e71d2011-07-07 08:21:25 +000027
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000028 int32_t ProcessFrame(I420VideoFrame* frame);
niklase@google.com470e71d2011-07-07 08:21:25 +000029
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000030 private:
31 int32_t id_;
niklase@google.com470e71d2011-07-07 08:21:25 +000032
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000033 uint32_t* moment1_; // (Q8) First order moment (mean).
34 uint32_t* moment2_; // (Q8) Second order moment.
35 uint32_t frame_size_; // Size (# of pixels) of frame.
36 int denoise_frame_cnt_; // Counter for subsampling in time.
niklase@google.com470e71d2011-07-07 08:21:25 +000037};
38
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000039} // namespace webrtc
niklase@google.com470e71d2011-07-07 08:21:25 +000040
mikhal@webrtc.orgb43d8072013-10-03 16:42:41 +000041#endif // WEBRTC_MODULES_VIDEO_PROCESSING_MAIN_SOURCE_DENOISING_H_
42