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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc

Issue 2354223002: Revert of Move MutableDataY{,U,V} methods to I420Buffer only. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Created 4 years, 3 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_coding/codecs/vp8/vp8_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
index 73a7eb659bdff968fc05f9f33b37cf30fea70c98..ef5e8e3d7356e374b519739e98a07d34bd6d450a 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -1306,18 +1306,18 @@
last_frame_width_ = img->d_w;
last_frame_height_ = img->d_h;
// Allocate memory for decoded image.
- rtc::scoped_refptr<I420Buffer> buffer =
- buffer_pool_.CreateBuffer(img->d_w, img->d_h);
-
+ VideoFrame decoded_image(buffer_pool_.CreateBuffer(img->d_w, img->d_h),
+ timestamp, 0, kVideoRotation_0);
libyuv::I420Copy(img->planes[VPX_PLANE_Y], img->stride[VPX_PLANE_Y],
img->planes[VPX_PLANE_U], img->stride[VPX_PLANE_U],
img->planes[VPX_PLANE_V], img->stride[VPX_PLANE_V],
- buffer->MutableDataY(), buffer->StrideY(),
- buffer->MutableDataU(), buffer->StrideU(),
- buffer->MutableDataV(), buffer->StrideV(),
+ decoded_image.video_frame_buffer()->MutableDataY(),
+ decoded_image.video_frame_buffer()->StrideY(),
+ decoded_image.video_frame_buffer()->MutableDataU(),
+ decoded_image.video_frame_buffer()->StrideU(),
+ decoded_image.video_frame_buffer()->MutableDataV(),
+ decoded_image.video_frame_buffer()->StrideV(),
img->d_w, img->d_h);
-
- VideoFrame decoded_image(buffer, timestamp, 0, kVideoRotation_0);
decoded_image.set_ntp_time_ms(ntp_time_ms);
int ret = decode_complete_callback_->Decoded(decoded_image);
if (ret != 0)

Powered by Google App Engine
This is Rietveld 408576698