| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2011 The LibYuv 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 |
| (...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 } | 172 } |
| 173 EXPECT_EQ(0, fourcc); | 173 EXPECT_EQ(0, fourcc); |
| 174 | 174 |
| 175 free_aligned_buffer_64(src_a); | 175 free_aligned_buffer_64(src_a); |
| 176 } | 176 } |
| 177 | 177 |
| 178 TEST_F(LibYUVBaseTest, BenchmarkARGBDetect_Unaligned) { | 178 TEST_F(LibYUVBaseTest, BenchmarkARGBDetect_Unaligned) { |
| 179 uint32 fourcc; | 179 uint32 fourcc; |
| 180 const int kMaxTest = benchmark_width_ * benchmark_height_ * 4 + 1; | 180 const int kMaxTest = benchmark_width_ * benchmark_height_ * 4 + 1; |
| 181 align_buffer_64(src_a, kMaxTest); | 181 align_buffer_64(src_a, kMaxTest); |
| 182 for (int i = 0; i < kMaxTest; ++i) { | 182 for (int i = 1; i < kMaxTest; ++i) { |
| 183 src_a[i + 1] = 255; | 183 src_a[i] = 255; |
| 184 } | 184 } |
| 185 | 185 |
| 186 src_a[0 + 1] = 0; | 186 src_a[0 + 1] = 0; |
| 187 fourcc = ARGBDetect(src_a + 1, benchmark_width_ * 4, | 187 fourcc = ARGBDetect(src_a + 1, benchmark_width_ * 4, |
| 188 benchmark_width_, benchmark_height_); | 188 benchmark_width_, benchmark_height_); |
| 189 EXPECT_EQ(libyuv::FOURCC_BGRA, fourcc); | 189 EXPECT_EQ(libyuv::FOURCC_BGRA, fourcc); |
| 190 src_a[0 + 1] = 255; | 190 src_a[0 + 1] = 255; |
| 191 src_a[3 + 1] = 0; | 191 src_a[3 + 1] = 0; |
| 192 fourcc = ARGBDetect(src_a + 1, benchmark_width_ * 4, | 192 fourcc = ARGBDetect(src_a + 1, benchmark_width_ * 4, |
| 193 benchmark_width_, benchmark_height_); | 193 benchmark_width_, benchmark_height_); |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 505 | 505 |
| 506 if (kSrcWidth > 8 && kSrcHeight > 8) { | 506 if (kSrcWidth > 8 && kSrcHeight > 8) { |
| 507 EXPECT_EQ(opt_err, c_err); | 507 EXPECT_EQ(opt_err, c_err); |
| 508 } | 508 } |
| 509 | 509 |
| 510 free_aligned_buffer_64(src_a); | 510 free_aligned_buffer_64(src_a); |
| 511 free_aligned_buffer_64(src_b); | 511 free_aligned_buffer_64(src_b); |
| 512 } | 512 } |
| 513 | 513 |
| 514 } // namespace libyuv | 514 } // namespace libyuv |
| OLD | NEW |