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

Unified Diff: webrtc/common_video/i420_video_frame_unittest.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
« no previous file with comments | « webrtc/common_video/i420_buffer_pool_unittest.cc ('k') | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webrtc/common_video/i420_video_frame_unittest.cc
diff --git a/webrtc/common_video/i420_video_frame_unittest.cc b/webrtc/common_video/i420_video_frame_unittest.cc
index f9d46ef96d6a67e49a6056e98383801e60093ee0..406dbd3b9e87d79d5fbf18fe6160b10b8e1cdc7e 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -162,14 +162,16 @@
EXPECT_EQ(kRotation, small_frame.rotation());
// Frame of larger dimensions.
- rtc::scoped_refptr<I420Buffer> buffer =
- I420Buffer::Create(width, height, stride_y, stride_u, stride_v);
- memset(buffer->MutableDataY(), 1, width * height);
- memset(buffer->MutableDataU(), 2, ((height + 1) / 2) * stride_u);
- memset(buffer->MutableDataV(), 3, ((height + 1) / 2) * stride_u);
- VideoFrame other_frame(buffer, 0, 0, webrtc::kVideoRotation_0);
- big_frame.CopyFrame(other_frame);
- EXPECT_TRUE(test::FramesEqual(other_frame, big_frame));
+ small_frame.CreateEmptyFrame(width, height,
+ stride_y, stride_u, stride_v);
+ memset(small_frame.video_frame_buffer()->MutableDataY(), 1,
+ small_frame.allocated_size(kYPlane));
+ memset(small_frame.video_frame_buffer()->MutableDataU(), 2,
+ small_frame.allocated_size(kUPlane));
+ memset(small_frame.video_frame_buffer()->MutableDataV(), 3,
+ small_frame.allocated_size(kVPlane));
+ big_frame.CopyFrame(small_frame);
+ EXPECT_TRUE(test::FramesEqual(small_frame, big_frame));
}
TEST(TestVideoFrame, ShallowCopy) {
« no previous file with comments | « webrtc/common_video/i420_buffer_pool_unittest.cc ('k') | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698