| 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 1404 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1415 src_a + off, width, | 1415 src_a + off, width, |
| 1416 dst_y_opt + off, width, | 1416 dst_y_opt + off, width, |
| 1417 dst_u_opt + off, kStrideUV, | 1417 dst_u_opt + off, kStrideUV, |
| 1418 dst_v_opt + off, kStrideUV, | 1418 dst_v_opt + off, kStrideUV, |
| 1419 width, height); | 1419 width, height); |
| 1420 } | 1420 } |
| 1421 for (int i = 0; i < width * height; ++i) { | 1421 for (int i = 0; i < width * height; ++i) { |
| 1422 EXPECT_EQ(dst_y_c[i + off], dst_y_opt[i + off]); | 1422 EXPECT_EQ(dst_y_c[i + off], dst_y_opt[i + off]); |
| 1423 } | 1423 } |
| 1424 for (int i = 0; i < kSizeUV; ++i) { | 1424 for (int i = 0; i < kSizeUV; ++i) { |
| 1425 EXPECT_NEAR(dst_u_c[i + off], dst_u_opt[i + off], 1); // Subsample off by 1 | 1425 EXPECT_EQ(dst_u_c[i + off], dst_u_opt[i + off]); |
| 1426 EXPECT_NEAR(dst_v_c[i + off], dst_v_opt[i + off], 1); | 1426 EXPECT_EQ(dst_v_c[i + off], dst_v_opt[i + off]); |
| 1427 } | 1427 } |
| 1428 free_aligned_buffer_64(src_y0); | 1428 free_aligned_buffer_64(src_y0); |
| 1429 free_aligned_buffer_64(src_u0); | 1429 free_aligned_buffer_64(src_u0); |
| 1430 free_aligned_buffer_64(src_v0); | 1430 free_aligned_buffer_64(src_v0); |
| 1431 free_aligned_buffer_64(src_y1); | 1431 free_aligned_buffer_64(src_y1); |
| 1432 free_aligned_buffer_64(src_u1); | 1432 free_aligned_buffer_64(src_u1); |
| 1433 free_aligned_buffer_64(src_v1); | 1433 free_aligned_buffer_64(src_v1); |
| 1434 free_aligned_buffer_64(src_a); | 1434 free_aligned_buffer_64(src_a); |
| 1435 free_aligned_buffer_64(dst_y_c); | 1435 free_aligned_buffer_64(dst_y_c); |
| 1436 free_aligned_buffer_64(dst_u_c); | 1436 free_aligned_buffer_64(dst_u_c); |
| (...skipping 1203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2640 | 2640 |
| 2641 TEST_F(LibYUVPlanarTest, SetPlane_Opt) { | 2641 TEST_F(LibYUVPlanarTest, SetPlane_Opt) { |
| 2642 int max_diff = TestARGBRect(benchmark_width_, benchmark_height_, | 2642 int max_diff = TestARGBRect(benchmark_width_, benchmark_height_, |
| 2643 benchmark_iterations_, | 2643 benchmark_iterations_, |
| 2644 disable_cpu_flags_, benchmark_cpu_info_, | 2644 disable_cpu_flags_, benchmark_cpu_info_, |
| 2645 +1, 0, 1); | 2645 +1, 0, 1); |
| 2646 EXPECT_EQ(0, max_diff); | 2646 EXPECT_EQ(0, max_diff); |
| 2647 } | 2647 } |
| 2648 | 2648 |
| 2649 } // namespace libyuv | 2649 } // namespace libyuv |
| OLD | NEW |