| 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 1691 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1702 src_v[i + OFF] = (fastrand() & 0xff); \ | 1702 src_v[i + OFF] = (fastrand() & 0xff); \ |
| 1703 } \ | 1703 } \ |
| 1704 memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ | 1704 memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ |
| 1705 for (int i = 0; i < benchmark_iterations_; ++i) { \ | 1705 for (int i = 0; i < benchmark_iterations_; ++i) { \ |
| 1706 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ | 1706 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ |
| 1707 src_u + OFF, kStrideUV, \ | 1707 src_u + OFF, kStrideUV, \ |
| 1708 src_v + OFF, kStrideUV, \ | 1708 src_v + OFF, kStrideUV, \ |
| 1709 dst_argb_b + OFF, kStrideB, \ | 1709 dst_argb_b + OFF, kStrideB, \ |
| 1710 kWidth, NEG kHeight); \ | 1710 kWidth, NEG kHeight); \ |
| 1711 } \ | 1711 } \ |
| 1712 int max_diff = 0; \ | |
| 1713 /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ | 1712 /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ |
| 1714 const int kStrideC = kWidth * BPP_C; \ | 1713 const int kStrideC = kWidth * BPP_C; \ |
| 1715 align_buffer_64(dst_argb_c, kStrideC * kHeight + OFF); \ | 1714 align_buffer_64(dst_argb_c, kStrideC * kHeight + OFF); \ |
| 1716 align_buffer_64(dst_argb_bc, kStrideC * kHeight + OFF); \ | 1715 align_buffer_64(dst_argb_bc, kStrideC * kHeight + OFF); \ |
| 1717 memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ | 1716 memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ |
| 1718 memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ | 1717 memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ |
| 1719 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \ | 1718 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \ |
| 1720 src_u + OFF, kStrideUV, \ | 1719 src_u + OFF, kStrideUV, \ |
| 1721 src_v + OFF, kStrideUV, \ | 1720 src_v + OFF, kStrideUV, \ |
| 1722 dst_argb_c + OFF, kStrideC, \ | 1721 dst_argb_c + OFF, kStrideC, \ |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1851 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ | 1850 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ |
| 1852 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ | 1851 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ |
| 1853 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ | 1852 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ |
| 1854 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ | 1853 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, BPP_B, \ |
| 1855 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) | 1854 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) |
| 1856 | 1855 |
| 1857 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 4, ABGR, 4) | 1856 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 4, ABGR, 4) |
| 1858 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 4, ARGB, 4) | 1857 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 4, ARGB, 4) |
| 1859 | 1858 |
| 1860 } // namespace libyuv | 1859 } // namespace libyuv |
| OLD | NEW |