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 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 void (*ARGBExtractAlphaRow)(const uint8 *src_argb, uint8 *dst_a, int width) = | 2397 void (*ARGBExtractAlphaRow)(const uint8 *src_argb, uint8 *dst_a, int width) = |
2398 ARGBExtractAlphaRow_C; | 2398 ARGBExtractAlphaRow_C; |
2399 #if defined(HAS_ARGBEXTRACTALPHAROW_SSE2) | 2399 #if defined(HAS_ARGBEXTRACTALPHAROW_SSE2) |
2400 if (TestCpuFlag(kCpuHasSSE2)) { | 2400 if (TestCpuFlag(kCpuHasSSE2)) { |
2401 ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_SSE2 | 2401 ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_SSE2 |
2402 : ARGBExtractAlphaRow_Any_SSE2; | 2402 : ARGBExtractAlphaRow_Any_SSE2; |
2403 } | 2403 } |
2404 #endif | 2404 #endif |
2405 #if defined(HAS_ARGBEXTRACTALPHAROW_NEON) | 2405 #if defined(HAS_ARGBEXTRACTALPHAROW_NEON) |
2406 if (TestCpuFlag(kCpuHasNEON)) { | 2406 if (TestCpuFlag(kCpuHasNEON)) { |
2407 ARGBExtractAlphaRow = IS_ALIGNED(width, 8) ? ARGBExtractAlphaRow_NEON | 2407 ARGBExtractAlphaRow = IS_ALIGNED(width, 16) ? ARGBExtractAlphaRow_NEON |
2408 : ARGBExtractAlphaRow_Any_NEON; | 2408 : ARGBExtractAlphaRow_Any_NEON; |
2409 } | 2409 } |
2410 #endif | 2410 #endif |
2411 | 2411 |
2412 for (int y = 0; y < height; ++y) { | 2412 for (int y = 0; y < height; ++y) { |
2413 ARGBExtractAlphaRow(src_argb, dst_a, width); | 2413 ARGBExtractAlphaRow(src_argb, dst_a, width); |
2414 src_argb += src_stride; | 2414 src_argb += src_stride; |
2415 dst_a += dst_stride; | 2415 dst_a += dst_stride; |
2416 } | 2416 } |
2417 return 0; | 2417 return 0; |
2418 } | 2418 } |
(...skipping 243 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2662 } | 2662 } |
2663 free_aligned_buffer_64(rows); | 2663 free_aligned_buffer_64(rows); |
2664 } | 2664 } |
2665 return 0; | 2665 return 0; |
2666 } | 2666 } |
2667 | 2667 |
2668 #ifdef __cplusplus | 2668 #ifdef __cplusplus |
2669 } // extern "C" | 2669 } // extern "C" |
2670 } // namespace libyuv | 2670 } // namespace libyuv |
2671 #endif | 2671 #endif |
OLD | NEW |