| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. | 2 * Copyright (c) 2012 The WebRTC project authors. All Rights Reserved. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license | 4 * Use of this source code is governed by a BSD-style license |
| 5 * that can be found in the LICENSE file in the root of the source | 5 * that can be found in the LICENSE file in the root of the source |
| 6 * tree. An additional intellectual property rights grant can be found | 6 * tree. An additional intellectual property rights grant can be found |
| 7 * in the file PATENTS. All contributing project authors may | 7 * in the file PATENTS. All contributing project authors may |
| 8 * be found in the AUTHORS file in the root of the source tree. | 8 * be found in the AUTHORS file in the root of the source tree. |
| 9 */ | 9 */ |
| 10 | 10 |
| 11 #include <math.h> | 11 #include <math.h> |
| 12 #include <string.h> | 12 #include <string.h> |
| 13 | 13 |
| 14 #include <memory> | 14 #include <memory> |
| 15 | 15 |
| 16 #include "testing/gtest/include/gtest/gtest.h" | 16 #include "testing/gtest/include/gtest/gtest.h" |
| 17 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" | 17 #include "webrtc/common_video/libyuv/include/webrtc_libyuv.h" |
| 18 #include "webrtc/system_wrappers/include/tick_util.h" | |
| 19 #include "webrtc/test/testsupport/fileutils.h" | 18 #include "webrtc/test/testsupport/fileutils.h" |
| 20 #include "webrtc/video_frame.h" | 19 #include "webrtc/video_frame.h" |
| 21 | 20 |
| 22 namespace webrtc { | 21 namespace webrtc { |
| 23 | 22 |
| 24 int PrintBuffer(const uint8_t* buffer, int width, int height, int stride) { | 23 int PrintBuffer(const uint8_t* buffer, int width, int height, int stride) { |
| 25 if (buffer == NULL) | 24 if (buffer == NULL) |
| 26 return -1; | 25 return -1; |
| 27 int k; | 26 int k; |
| 28 const uint8_t* tmp_buffer = buffer; | 27 const uint8_t* tmp_buffer = buffer; |
| (...skipping 314 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 343 Calc16ByteAlignedStride(width, &stride_y, &stride_uv); | 342 Calc16ByteAlignedStride(width, &stride_y, &stride_uv); |
| 344 EXPECT_EQ(128, stride_y); | 343 EXPECT_EQ(128, stride_y); |
| 345 EXPECT_EQ(64, stride_uv); | 344 EXPECT_EQ(64, stride_uv); |
| 346 width = 127; | 345 width = 127; |
| 347 Calc16ByteAlignedStride(width, &stride_y, &stride_uv); | 346 Calc16ByteAlignedStride(width, &stride_y, &stride_uv); |
| 348 EXPECT_EQ(128, stride_y); | 347 EXPECT_EQ(128, stride_y); |
| 349 EXPECT_EQ(64, stride_uv); | 348 EXPECT_EQ(64, stride_uv); |
| 350 } | 349 } |
| 351 | 350 |
| 352 } // namespace webrtc | 351 } // namespace webrtc |
| OLD | NEW |