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

Unified Diff: webrtc/modules/video_coding/codecs/vp8/vp8_impl.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
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 546fd73f406e4441119543dd9ee024033c2c4e6f..3eb47eedc01f0d967b7ab05d4e17e481d8fee504 100644
--- a/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc
@@ -752,18 +752,15 @@
// Image in vpx_image_t format.
// Input image is const. VP8's raw image is not defined as const.
raw_images_[0].planes[VPX_PLANE_Y] =
- const_cast<uint8_t*>(input_image.video_frame_buffer()->DataY());
+ const_cast<uint8_t*>(input_image.buffer(kYPlane));
raw_images_[0].planes[VPX_PLANE_U] =
- const_cast<uint8_t*>(input_image.video_frame_buffer()->DataU());
+ const_cast<uint8_t*>(input_image.buffer(kUPlane));
raw_images_[0].planes[VPX_PLANE_V] =
- const_cast<uint8_t*>(input_image.video_frame_buffer()->DataV());
-
- raw_images_[0].stride[VPX_PLANE_Y] =
- input_image.video_frame_buffer()->StrideY();
- raw_images_[0].stride[VPX_PLANE_U] =
- input_image.video_frame_buffer()->StrideU();
- raw_images_[0].stride[VPX_PLANE_V] =
- input_image.video_frame_buffer()->StrideV();
+ const_cast<uint8_t*>(input_image.buffer(kVPlane));
+
+ raw_images_[0].stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
+ raw_images_[0].stride[VPX_PLANE_U] = input_image.stride(kUPlane);
+ raw_images_[0].stride[VPX_PLANE_V] = input_image.stride(kVPlane);
for (size_t i = 1; i < encoders_.size(); ++i) {
// Scale the image down a number of times by downsampling factor
@@ -1360,12 +1357,9 @@
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],
- 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(),
+ decoded_image.buffer(kYPlane), decoded_image.stride(kYPlane),
+ decoded_image.buffer(kUPlane), decoded_image.stride(kUPlane),
+ decoded_image.buffer(kVPlane), decoded_image.stride(kVPlane),
img->d_w, img->d_h);
decoded_image.set_ntp_time_ms(ntp_time_ms);
int ret = decode_complete_callback_->Decoded(decoded_image);
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/simulcast_unittest.h ('k') | webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698