Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(298)

Unified Diff: webrtc/modules/video_processing/video_denoiser.h

Issue 2005733003: Refactor VideoDenoiser to work with I420Buffer, not VideoFrame. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Trivial rebase. Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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
« no previous file with comments | « webrtc/modules/video_processing/test/denoiser_test.cc ('k') | webrtc/modules/video_processing/video_denoiser.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698