Index: webrtc/modules/video_processing/video_denoiser.h |
diff --git a/webrtc/modules/video_processing/video_denoiser.h b/webrtc/modules/video_processing/video_denoiser.h |
index 114f663c03d985ce4ba8d12e976a51d7a072a69a..5293a9902b11169e11dc0fbe925de21c2552df3a 100644 |
--- a/webrtc/modules/video_processing/video_denoiser.h |
+++ b/webrtc/modules/video_processing/video_denoiser.h |
@@ -23,15 +23,21 @@ class VideoDenoiser { |
public: |
explicit VideoDenoiser(bool runtime_cpu_detection); |
- void DenoiseFrame(const VideoFrame& frame, |
- VideoFrame* denoised_frame, |
- VideoFrame* denoised_frame_prev, |
+ // TODO(nisse): Let the denoised_frame and denoised_frame_prev be |
+ // member variables referencing two I420Buffer, and return a refptr |
+ // to the current one. When we also move the double-buffering logic |
+ // from the caller. |
nisse-webrtc
2016/06/17 07:34:47
BTW, what do you think about this idea? It would s
jackychen
2016/06/17 23:56:50
SG for me. You can surely make this change.
|
+ void DenoiseFrame(const rtc::scoped_refptr<VideoFrameBuffer>& frame, |
+ // Buffers are allocated/replaced when dimensions |
+ // change. |
+ rtc::scoped_refptr<I420Buffer>* denoised_frame, |
+ rtc::scoped_refptr<I420Buffer>* denoised_frame_prev, |
bool noise_estimation_enabled); |
private: |
- void DenoiserReset(const VideoFrame& frame, |
- VideoFrame* denoised_frame, |
- VideoFrame* denoised_frame_prev); |
+ void DenoiserReset(const rtc::scoped_refptr<VideoFrameBuffer>& frame, |
+ rtc::scoped_refptr<I420Buffer>* denoised_frame, |
+ rtc::scoped_refptr<I420Buffer>* denoised_frame_prev); |
// Check the mb position, return 1: close to the frame center (between 1/8 |
// and 7/8 of width/height), 3: close to the border (out of 1/16 and 15/16 |