2 * Copyright (c) 2011 The WebRTC project authors. All Rights Reserved.
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.
11 #ifndef WEBRTC_MODULE_VIDEO_PROCESSING_IMPL_H
12 #define WEBRTC_MODULE_VIDEO_PROCESSING_IMPL_H
14 #include "webrtc/modules/video_processing/main/interface/video_processing.h"
15 #include "webrtc/modules/video_processing/main/source/brighten.h"
16 #include "webrtc/modules/video_processing/main/source/brightness_detection.h"
17 #include "webrtc/modules/video_processing/main/source/color_enhancement.h"
18 #include "webrtc/modules/video_processing/main/source/deflickering.h"
19 #include "webrtc/modules/video_processing/main/source/frame_preprocessor.h"
22 class CriticalSectionWrapper;
24 class VideoProcessingModuleImpl : public VideoProcessingModule {
26 VideoProcessingModuleImpl(int32_t id);
28 virtual ~VideoProcessingModuleImpl();
32 virtual int32_t ChangeUniqueId(const int32_t id);
36 virtual int32_t Deflickering(I420VideoFrame* frame, FrameStats* stats);
38 virtual int32_t BrightnessDetection(const I420VideoFrame& frame,
39 const FrameStats& stats);
41 // Frame pre-processor functions
43 // Enable temporal decimation
44 virtual void EnableTemporalDecimation(bool enable);
46 virtual void SetInputFrameResampleMode(VideoFrameResampling resampling_mode);
48 // Enable content analysis
49 virtual void EnableContentAnalysis(bool enable);
51 // Set Target Resolution: frame rate and dimension
52 virtual int32_t SetTargetResolution(uint32_t width,
57 // Get decimated values: frame rate/dimension
58 virtual uint32_t Decimatedframe_rate();
59 virtual uint32_t DecimatedWidth() const;
60 virtual uint32_t DecimatedHeight() const;
63 // Pre-process incoming frame: Sample when needed and compute content
64 // metrics when enabled.
65 // If no resampling takes place - processed_frame is set to NULL.
66 virtual int32_t PreprocessFrame(const I420VideoFrame& frame,
67 I420VideoFrame** processed_frame);
68 virtual VideoContentMetrics* ContentMetrics() const;
72 CriticalSectionWrapper& mutex_;
73 VPMDeflickering deflickering_;
74 VPMBrightnessDetection brightness_detection_;
75 VPMFramePreprocessor frame_pre_processor_;