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

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

Issue 1935443002: Revert of Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 8 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
« no previous file with comments | « webrtc/modules/video_processing/test/video_processing_unittest.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/modules/video_processing/video_denoiser.cc
diff --git a/webrtc/modules/video_processing/video_denoiser.cc b/webrtc/modules/video_processing/video_denoiser.cc
index 61a11fe83b5df56086173f5b1a811d274a4f0b2a..c1cab8187d28c4b3ad2c3c58b882818979931600 100644
--- a/webrtc/modules/video_processing/video_denoiser.cc
+++ b/webrtc/modules/video_processing/video_denoiser.cc
@@ -81,19 +81,17 @@
height_ = frame.height();
mb_cols_ = width_ >> 4;
mb_rows_ = height_ >> 4;
- stride_y_ = frame.video_frame_buffer()->StrideY();
- stride_u_ = frame.video_frame_buffer()->StrideU();
- stride_v_ = frame.video_frame_buffer()->StrideV();
+ stride_y_ = frame.stride(kYPlane);
+ stride_u_ = frame.stride(kUPlane);
+ stride_v_ = frame.stride(kVPlane);
// Allocate an empty buffer for denoised_frame_prev.
denoised_frame_prev->CreateEmptyFrame(width_, height_, stride_y_, stride_u_,
stride_v_);
// Allocate and initialize denoised_frame with key frame.
- denoised_frame->CreateFrame(
- frame.video_frame_buffer()->DataY(),
- frame.video_frame_buffer()->DataU(),
- frame.video_frame_buffer()->DataV(),
- width_, height_, stride_y_, stride_u_, stride_v_, kVideoRotation_0);
+ denoised_frame->CreateFrame(frame.buffer(kYPlane), frame.buffer(kUPlane),
+ frame.buffer(kVPlane), width_, height_, stride_y_,
+ stride_u_, stride_v_, kVideoRotation_0);
// Set time parameters to the output frame.
denoised_frame->set_timestamp(frame.timestamp());
denoised_frame->set_render_time_ms(frame.render_time_ms());
@@ -238,14 +236,13 @@
}
// Set buffer pointers.
- const uint8_t* y_src = frame.video_frame_buffer()->DataY();
- const uint8_t* u_src = frame.video_frame_buffer()->DataU();
- const uint8_t* v_src = frame.video_frame_buffer()->DataV();
- uint8_t* y_dst = denoised_frame->video_frame_buffer()->MutableDataY();
- uint8_t* u_dst = denoised_frame->video_frame_buffer()->MutableDataU();
- uint8_t* v_dst = denoised_frame->video_frame_buffer()->MutableDataV();
- uint8_t* y_dst_prev =
- denoised_frame_prev->video_frame_buffer()->MutableDataY();
+ const uint8_t* y_src = frame.buffer(kYPlane);
+ const uint8_t* u_src = frame.buffer(kUPlane);
+ const uint8_t* v_src = frame.buffer(kVPlane);
+ uint8_t* y_dst = denoised_frame->buffer(kYPlane);
+ uint8_t* u_dst = denoised_frame->buffer(kUPlane);
+ uint8_t* v_dst = denoised_frame->buffer(kVPlane);
+ uint8_t* y_dst_prev = denoised_frame_prev->buffer(kYPlane);
memset(x_density_.get(), 0, mb_cols_);
memset(y_density_.get(), 0, mb_rows_);
memset(moving_object_.get(), 1, mb_cols_ * mb_rows_);
« no previous file with comments | « webrtc/modules/video_processing/test/video_processing_unittest.cc ('k') | webrtc/test/frame_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698