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

Unified Diff: webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc

Issue 1963413004: Reland of Delete webrtc::VideoFrame methods buffer and stride. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebase. Created 4 years, 7 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/vp9/vp9_impl.cc
diff --git a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
index ecd185856f8f054e3296eec76550a54630a0421a..d5f83c4335dee6d999c368ab1c58808b84bc183b 100644
--- a/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
+++ b/webrtc/modules/video_coding/codecs/vp9/vp9_impl.cc
@@ -500,12 +500,15 @@ int VP9EncoderImpl::Encode(const VideoFrame& input_image,
// Image in vpx_image_t format.
// Input image is const. VPX's raw image is not defined as const.
- raw_->planes[VPX_PLANE_Y] = const_cast<uint8_t*>(input_image.buffer(kYPlane));
- raw_->planes[VPX_PLANE_U] = const_cast<uint8_t*>(input_image.buffer(kUPlane));
- raw_->planes[VPX_PLANE_V] = const_cast<uint8_t*>(input_image.buffer(kVPlane));
- raw_->stride[VPX_PLANE_Y] = input_image.stride(kYPlane);
- raw_->stride[VPX_PLANE_U] = input_image.stride(kUPlane);
- raw_->stride[VPX_PLANE_V] = input_image.stride(kVPlane);
+ raw_->planes[VPX_PLANE_Y] =
+ const_cast<uint8_t*>(input_image.video_frame_buffer()->DataY());
+ raw_->planes[VPX_PLANE_U] =
+ const_cast<uint8_t*>(input_image.video_frame_buffer()->DataU());
+ raw_->planes[VPX_PLANE_V] =
+ const_cast<uint8_t*>(input_image.video_frame_buffer()->DataV());
+ raw_->stride[VPX_PLANE_Y] = input_image.video_frame_buffer()->StrideY();
+ raw_->stride[VPX_PLANE_U] = input_image.video_frame_buffer()->StrideU();
+ raw_->stride[VPX_PLANE_V] = input_image.video_frame_buffer()->StrideV();
vpx_enc_frame_flags_t flags = 0;
bool send_keyframe = (frame_type == kVideoFrameKey);
« no previous file with comments | « webrtc/modules/video_coding/codecs/vp8/vp8_impl.cc ('k') | webrtc/modules/video_processing/test/video_processing_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698