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

Unified Diff: webrtc/common_video/i420_video_frame_unittest.cc

Issue 2380623002: Delete method webrtc::VideoFrame::allocated_size and enum PlaneType. (Closed)
Patch Set: Fix H264DecoderImpl. 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 | « no previous file | 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..0ce2daadfec1dbaf9bcebb9f94651a1a00ef1436 100644
--- a/webrtc/common_video/i420_video_frame_unittest.cc
+++ b/webrtc/common_video/i420_video_frame_unittest.cc
@@ -21,12 +21,6 @@ namespace webrtc {
namespace {
-int ExpectedSize(int plane_stride, int image_height, PlaneType type) {
- if (type == kYPlane)
- return plane_stride * image_height;
- return plane_stride * ((image_height + 1) / 2);
-}
-
rtc::scoped_refptr<I420Buffer> CreateGradient(int width, int height) {
rtc::scoped_refptr<I420Buffer> buffer(
I420Buffer::Create(width, height));
@@ -110,22 +104,6 @@ TEST(TestVideoFrame, WidthHeightValues) {
EXPECT_EQ(789, frame.render_time_ms());
}
-TEST(TestVideoFrame, SizeAllocation) {
- VideoFrame frame;
- frame. CreateEmptyFrame(10, 10, 12, 14, 220);
- int height = frame.height();
- int stride_y = frame.video_frame_buffer()->StrideY();
- int stride_u = frame.video_frame_buffer()->StrideU();
- int stride_v = frame.video_frame_buffer()->StrideV();
- // Verify that allocated size was computed correctly.
- EXPECT_EQ(ExpectedSize(stride_y, height, kYPlane),
- frame.allocated_size(kYPlane));
- EXPECT_EQ(ExpectedSize(stride_u, height, kUPlane),
- frame.allocated_size(kUPlane));
- EXPECT_EQ(ExpectedSize(stride_v, height, kVPlane),
- frame.allocated_size(kVPlane));
-}
-
TEST(TestVideoFrame, CopyFrame) {
uint32_t timestamp = 1;
int64_t ntp_time_ms = 2;
@@ -254,11 +232,6 @@ TEST(TestVideoFrame, CopyBuffer) {
stride_uv, 8, 8));
EXPECT_TRUE(test::EqualPlane(buffer_v, frame2.video_frame_buffer()->DataV(),
stride_uv, 8, 8));
-
- // Compare size.
- EXPECT_LE(kSizeY, frame2.allocated_size(kYPlane));
- EXPECT_LE(kSizeUv, frame2.allocated_size(kUPlane));
- EXPECT_LE(kSizeUv, frame2.allocated_size(kVPlane));
}
TEST(TestVideoFrame, FailToReuseAllocation) {
« no previous file with comments | « no previous file | webrtc/common_video/include/video_frame_buffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698