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) && TestCpuFlag(kCpuHasF16C)) { | 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) |
| 2581 if (TestCpuFlag(kCpuHasAVX2) && TestCpuFlag(kCpuHasF16C)) { |
| 2582 HalfFloatRow = HalfFloatRow_Any_F16C; |
| 2583 if (IS_ALIGNED(width, 16)) { |
| 2584 HalfFloatRow = HalfFloatRow_F16C; |
| 2585 } |
| 2586 } |
| 2587 #endif |
2580 for (y = 0; y < height; ++y) { | 2588 for (y = 0; y < height; ++y) { |
2581 HalfFloatRow(src_y, dst_y, scale, width); | 2589 HalfFloatRow(src_y, dst_y, scale, width); |
2582 src_y += src_stride_y; | 2590 src_y += src_stride_y; |
2583 dst_y += dst_stride_y; | 2591 dst_y += dst_stride_y; |
2584 } | 2592 } |
2585 return 0; | 2593 return 0; |
2586 } | 2594 } |
2587 | 2595 |
2588 // Apply a lumacolortable to each ARGB pixel. | 2596 // Apply a lumacolortable to each ARGB pixel. |
2589 LIBYUV_API | 2597 LIBYUV_API |
(...skipping 379 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2969 } | 2977 } |
2970 free_aligned_buffer_64(rows); | 2978 free_aligned_buffer_64(rows); |
2971 } | 2979 } |
2972 return 0; | 2980 return 0; |
2973 } | 2981 } |
2974 | 2982 |
2975 #ifdef __cplusplus | 2983 #ifdef __cplusplus |
2976 } // extern "C" | 2984 } // extern "C" |
2977 } // namespace libyuv | 2985 } // namespace libyuv |
2978 #endif | 2986 #endif |
OLD | NEW |