Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(647)

Side by Side Diff: source/planar_functions.cc

Issue 2430313008: scale by 1 for neon implemented (Closed)
Patch Set: one allocations for halffloat test Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « include/libyuv/version.h ('k') | source/row_any.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 2561 matching lines...) Expand 10 before | Expand all | Expand 10 after
2572 #if defined(HAS_HALFFLOATROW_AVX2) 2572 #if defined(HAS_HALFFLOATROW_AVX2)
2573 if (TestCpuFlag(kCpuHasAVX2)) { 2573 if (TestCpuFlag(kCpuHasAVX2)) {
2574 HalfFloatRow = HalfFloatRow_Any_AVX2; 2574 HalfFloatRow = HalfFloatRow_Any_AVX2;
2575 if (IS_ALIGNED(width, 16)) { 2575 if (IS_ALIGNED(width, 16)) {
2576 HalfFloatRow = HalfFloatRow_AVX2; 2576 HalfFloatRow = HalfFloatRow_AVX2;
2577 } 2577 }
2578 } 2578 }
2579 #endif 2579 #endif
2580 #if defined(HAS_HALFFLOATROW_F16C) 2580 #if defined(HAS_HALFFLOATROW_F16C)
2581 if (TestCpuFlag(kCpuHasAVX2) && TestCpuFlag(kCpuHasF16C)) { 2581 if (TestCpuFlag(kCpuHasAVX2) && TestCpuFlag(kCpuHasF16C)) {
2582 HalfFloatRow = HalfFloatRow_Any_F16C; 2582 HalfFloatRow = (scale == 1.0f) ?
2583 HalfFloat1Row_Any_F16C : HalfFloatRow_Any_F16C;
2583 if (IS_ALIGNED(width, 16)) { 2584 if (IS_ALIGNED(width, 16)) {
2584 HalfFloatRow = HalfFloatRow_F16C; 2585 HalfFloatRow = (scale == 1.0f) ? HalfFloat1Row_F16C : HalfFloatRow_F16C;
2585 } 2586 }
2586 } 2587 }
2587 #endif 2588 #endif
2588 #if defined(HAS_HALFFLOATROW_NEON) 2589 #if defined(HAS_HALFFLOATROW_NEON)
2589 if (TestCpuFlag(kCpuHasNEON)) { 2590 if (TestCpuFlag(kCpuHasNEON)) {
2590 HalfFloatRow = HalfFloatRow_Any_NEON; 2591 HalfFloatRow = (scale == 1.0f) ?
2592 HalfFloat1Row_Any_NEON : HalfFloatRow_Any_NEON;
2591 if (IS_ALIGNED(width, 8)) { 2593 if (IS_ALIGNED(width, 8)) {
2592 HalfFloatRow = HalfFloatRow_NEON; 2594 HalfFloatRow = (scale == 1.0f) ? HalfFloat1Row_NEON : HalfFloatRow_NEON;
2593 } 2595 }
2594 } 2596 }
2595 #endif 2597 #endif
2596 2598
2597 for (y = 0; y < height; ++y) { 2599 for (y = 0; y < height; ++y) {
2598 HalfFloatRow(src_y, dst_y, scale, width); 2600 HalfFloatRow(src_y, dst_y, scale, width);
2599 src_y += src_stride_y; 2601 src_y += src_stride_y;
2600 dst_y += dst_stride_y; 2602 dst_y += dst_stride_y;
2601 } 2603 }
2602 return 0; 2604 return 0;
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 } 2988 }
2987 free_aligned_buffer_64(rows); 2989 free_aligned_buffer_64(rows);
2988 } 2990 }
2989 return 0; 2991 return 0;
2990 } 2992 }
2991 2993
2992 #ifdef __cplusplus 2994 #ifdef __cplusplus
2993 } // extern "C" 2995 } // extern "C"
2994 } // namespace libyuv 2996 } // namespace libyuv
2995 #endif 2997 #endif
OLDNEW
« no previous file with comments | « include/libyuv/version.h ('k') | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698