| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
| 6 #include "media/base/video_frame.h" | 6 #include "media/base/video_frame.h" |
| 7 #include "media/base/video_util.h" | 7 #include "media/base/video_util.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace media { | 10 namespace media { |
| 11 | 11 |
| 12 class VideoUtilTest : public testing::Test { | 12 class VideoUtilTest : public testing::Test { |
| 13 public: | 13 public: |
| 14 VideoUtilTest() | 14 VideoUtilTest() |
| 15 : height_(0), | 15 : height_(0), |
| 16 y_stride_(0), | 16 y_stride_(0), |
| 17 u_stride_(0), | 17 u_stride_(0), |
| 18 v_stride_(0) { | 18 v_stride_(0) { |
| 19 } | 19 } |
| 20 | 20 |
| 21 virtual ~VideoUtilTest() {} | 21 ~VideoUtilTest() override {} |
| 22 | 22 |
| 23 void CreateSourceFrame(int width, int height, | 23 void CreateSourceFrame(int width, int height, |
| 24 int y_stride, int u_stride, int v_stride) { | 24 int y_stride, int u_stride, int v_stride) { |
| 25 EXPECT_GE(y_stride, width); | 25 EXPECT_GE(y_stride, width); |
| 26 EXPECT_GE(u_stride, width / 2); | 26 EXPECT_GE(u_stride, width / 2); |
| 27 EXPECT_GE(v_stride, width / 2); | 27 EXPECT_GE(v_stride, width / 2); |
| 28 | 28 |
| 29 height_ = height; | 29 height_ = height; |
| 30 y_stride_ = y_stride; | 30 y_stride_ = y_stride; |
| 31 u_stride_ = u_stride; | 31 u_stride_ = u_stride; |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 382 inside ? 0x03 : 0x80); | 382 inside ? 0x03 : 0x80); |
| 383 } | 383 } |
| 384 } | 384 } |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 } | 387 } |
| 388 } | 388 } |
| 389 } | 389 } |
| 390 | 390 |
| 391 } // namespace media | 391 } // namespace media |
| OLD | NEW |