OLD | NEW |
1 /* | 1 /* |
2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 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 |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
54 | 54 |
55 // Preprocess output: | 55 // Preprocess output: |
56 void EnableDenoising(bool enable); | 56 void EnableDenoising(bool enable); |
57 const VideoFrame* PreprocessFrame(const VideoFrame& frame); | 57 const VideoFrame* PreprocessFrame(const VideoFrame& frame); |
58 | 58 |
59 private: | 59 private: |
60 // The content does not change so much every frame, so to reduce complexity | 60 // The content does not change so much every frame, so to reduce complexity |
61 // we can compute new content metrics every |kSkipFrameCA| frames. | 61 // we can compute new content metrics every |kSkipFrameCA| frames. |
62 enum { kSkipFrameCA = 2 }; | 62 enum { kSkipFrameCA = 2 }; |
63 | 63 |
64 VideoFrame denoised_frame_[2]; | 64 rtc::scoped_refptr<I420Buffer> denoised_buffer_[2]; |
| 65 VideoFrame denoised_frame_; |
65 VideoFrame resampled_frame_; | 66 VideoFrame resampled_frame_; |
66 VPMSpatialResampler* spatial_resampler_; | 67 VPMSpatialResampler* spatial_resampler_; |
67 VPMVideoDecimator* vd_; | 68 VPMVideoDecimator* vd_; |
68 std::unique_ptr<VideoDenoiser> denoiser_; | 69 std::unique_ptr<VideoDenoiser> denoiser_; |
69 uint8_t denoised_frame_toggle_; | 70 uint8_t denoised_frame_toggle_; |
70 uint32_t frame_cnt_; | 71 uint32_t frame_cnt_; |
71 }; | 72 }; |
72 | 73 |
73 } // namespace webrtc | 74 } // namespace webrtc |
74 | 75 |
75 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ | 76 #endif // WEBRTC_MODULES_VIDEO_PROCESSING_FRAME_PREPROCESSOR_H_ |
OLD | NEW |