| 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 2552 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2563 } | 2563 } |
| 2564 #if defined(HAS_HALFFLOATROW_SSE2) | 2564 #if defined(HAS_HALFFLOATROW_SSE2) |
| 2565 if (TestCpuFlag(kCpuHasSSE2)) { | 2565 if (TestCpuFlag(kCpuHasSSE2)) { |
| 2566 HalfFloatRow = HalfFloatRow_Any_SSE2; | 2566 HalfFloatRow = HalfFloatRow_Any_SSE2; |
| 2567 if (IS_ALIGNED(width, 8)) { | 2567 if (IS_ALIGNED(width, 8)) { |
| 2568 HalfFloatRow = HalfFloatRow_SSE2; | 2568 HalfFloatRow = HalfFloatRow_SSE2; |
| 2569 } | 2569 } |
| 2570 } | 2570 } |
| 2571 #endif | 2571 #endif |
| 2572 #if defined(HAS_HALFFLOATROW_AVX2) | 2572 #if defined(HAS_HALFFLOATROW_AVX2) |
| 2573 if (TestCpuFlag(kCpuHasAVX2)) { | 2573 if (TestCpuFlag(kCpuHasAVX2) && TestCpuFlag(kCpuHasF16C)) { |
| 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 for (y = 0; y < height; ++y) { | 2580 for (y = 0; y < height; ++y) { |
| 2581 HalfFloatRow(src_y, dst_y, scale, width); | 2581 HalfFloatRow(src_y, dst_y, scale, width); |
| 2582 src_y += src_stride_y; | 2582 src_y += src_stride_y; |
| 2583 dst_y += dst_stride_y; | 2583 dst_y += dst_stride_y; |
| (...skipping 385 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2969 } | 2969 } |
| 2970 free_aligned_buffer_64(rows); | 2970 free_aligned_buffer_64(rows); |
| 2971 } | 2971 } |
| 2972 return 0; | 2972 return 0; |
| 2973 } | 2973 } |
| 2974 | 2974 |
| 2975 #ifdef __cplusplus | 2975 #ifdef __cplusplus |
| 2976 } // extern "C" | 2976 } // extern "C" |
| 2977 } // namespace libyuv | 2977 } // namespace libyuv |
| 2978 #endif | 2978 #endif |
| OLD | NEW |