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 1999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2010 } \ | 2010 } \ |
2011 memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ | 2011 memset(dst_argb_b + OFF, 1, kStrideB * kHeight); \ |
2012 for (int i = 0; i < benchmark_iterations_; ++i) { \ | 2012 for (int i = 0; i < benchmark_iterations_; ++i) { \ |
2013 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ | 2013 FMT_PLANAR##To##FMT_B(src_y + OFF, kWidth, \ |
2014 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ | 2014 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ |
2015 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ | 2015 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ |
2016 src_a + OFF, kWidth, \ | 2016 src_a + OFF, kWidth, \ |
2017 dst_argb_b + OFF, kStrideB, \ | 2017 dst_argb_b + OFF, kStrideB, \ |
2018 kWidth, NEG kHeight, ATTEN); \ | 2018 kWidth, NEG kHeight, ATTEN); \ |
2019 } \ | 2019 } \ |
2020 int max_diff = 0; \ | |
2021 /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ | 2020 /* Convert to a 3rd format in 1 step and 2 steps and compare */ \ |
2022 const int kStrideC = kWidth * BPP_C; \ | 2021 const int kStrideC = kWidth * BPP_C; \ |
2023 align_buffer_page_end(dst_argb_c, kStrideC * kHeight + OFF); \ | 2022 align_buffer_page_end(dst_argb_c, kStrideC * kHeight + OFF); \ |
2024 align_buffer_page_end(dst_argb_bc, kStrideC * kHeight + OFF); \ | 2023 align_buffer_page_end(dst_argb_bc, kStrideC * kHeight + OFF); \ |
2025 memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ | 2024 memset(dst_argb_c + OFF, 2, kStrideC * kHeight); \ |
2026 memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ | 2025 memset(dst_argb_bc + OFF, 3, kStrideC * kHeight); \ |
2027 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \ | 2026 FMT_PLANAR##To##FMT_C(src_y + OFF, kWidth, \ |
2028 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ | 2027 src_u + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ |
2029 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ | 2028 src_v + OFF, SUBSAMPLE(kWidth, SUBSAMP_X), \ |
2030 src_a + OFF, kWidth, \ | 2029 src_a + OFF, kWidth, \ |
(...skipping 25 matching lines...) Expand all Loading... |
2056 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ | 2055 benchmark_width_, _Invert, -, 0, FMT_C, BPP_C, 0) \ |
2057 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ | 2056 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ |
2058 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ | 2057 benchmark_width_, _Opt, +, 0, FMT_C, BPP_C, 0) \ |
2059 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ | 2058 TESTQPLANARTOEI(FMT_PLANAR, SUBSAMP_X, SUBSAMP_Y, FMT_B, SUB_B, BPP_B, \ |
2060 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) | 2059 benchmark_width_, _Premult, +, 0, FMT_C, BPP_C, 1) |
2061 | 2060 |
2062 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) | 2061 TESTQPLANARTOE(I420Alpha, 2, 2, ARGB, 1, 4, ABGR, 4) |
2063 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) | 2062 TESTQPLANARTOE(I420Alpha, 2, 2, ABGR, 1, 4, ARGB, 4) |
2064 | 2063 |
2065 } // namespace libyuv | 2064 } // namespace libyuv |
OLD | NEW |