OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 The LibYuv Project Authors. All rights reserved. | 2 * Copyright 2014 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 1381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1392 "b.gt 1b \n" | 1392 "b.gt 1b \n" |
1393 : "+r"(src_argb), // %0 | 1393 : "+r"(src_argb), // %0 |
1394 "+r"(dst_y), // %1 | 1394 "+r"(dst_y), // %1 |
1395 "+r"(width) // %2 | 1395 "+r"(width) // %2 |
1396 : | 1396 : |
1397 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7" | 1397 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5", "v6", "v7" |
1398 ); | 1398 ); |
1399 } | 1399 } |
1400 #endif // HAS_ARGBTOYROW_NEON | 1400 #endif // HAS_ARGBTOYROW_NEON |
1401 | 1401 |
| 1402 #ifdef HAS_ARGBEXTRACTALPHAROW_NEON |
| 1403 void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width) { |
| 1404 asm volatile ( |
| 1405 "1: \n" |
| 1406 MEMACCESS(0) |
| 1407 "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load row 8 pixels |
| 1408 "subs %w2, %w2, #8 \n" // 8 processed per loop |
| 1409 MEMACCESS(1) |
| 1410 "st1 {v3.8b}, [%1], #8 \n" // store 8 A's. |
| 1411 "b.gt 1b \n" |
| 1412 : "+r"(src_argb), // %0 |
| 1413 "+r"(dst_a), // %1 |
| 1414 "+r"(width) // %2 |
| 1415 : |
| 1416 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List |
| 1417 ); |
| 1418 } |
| 1419 #endif // HAS_ARGBEXTRACTALPHAROW_NEON |
| 1420 |
1402 #ifdef HAS_ARGBTOYJROW_NEON | 1421 #ifdef HAS_ARGBTOYJROW_NEON |
1403 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width) { | 1422 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width) { |
1404 asm volatile ( | 1423 asm volatile ( |
1405 "movi v4.8b, #15 \n" // B * 0.11400 coefficient | 1424 "movi v4.8b, #15 \n" // B * 0.11400 coefficient |
1406 "movi v5.8b, #75 \n" // G * 0.58700 coefficient | 1425 "movi v5.8b, #75 \n" // G * 0.58700 coefficient |
1407 "movi v6.8b, #38 \n" // R * 0.29900 coefficient | 1426 "movi v6.8b, #38 \n" // R * 0.29900 coefficient |
1408 "1: \n" | 1427 "1: \n" |
1409 MEMACCESS(0) | 1428 MEMACCESS(0) |
1410 "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB pixels. | 1429 "ld4 {v0.8b,v1.8b,v2.8b,v3.8b}, [%0], #32 \n" // load 8 ARGB pixels. |
1411 "subs %w2, %w2, #8 \n" // 8 processed per loop. | 1430 "subs %w2, %w2, #8 \n" // 8 processed per loop. |
(...skipping 1540 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2952 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List | 2971 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List |
2953 ); | 2972 ); |
2954 } | 2973 } |
2955 #endif // HAS_SOBELYROW_NEON | 2974 #endif // HAS_SOBELYROW_NEON |
2956 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) | 2975 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) |
2957 | 2976 |
2958 #ifdef __cplusplus | 2977 #ifdef __cplusplus |
2959 } // extern "C" | 2978 } // extern "C" |
2960 } // namespace libyuv | 2979 } // namespace libyuv |
2961 #endif | 2980 #endif |
OLD | NEW |