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 1284 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1295 "+r"(width) // %2 | 1295 "+r"(width) // %2 |
1296 : | 1296 : |
1297 : "cc", "memory", "q0", "q1", "q2", "q12", "q13" | 1297 : "cc", "memory", "q0", "q1", "q2", "q12", "q13" |
1298 ); | 1298 ); |
1299 } | 1299 } |
1300 | 1300 |
1301 void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width) { | 1301 void ARGBExtractAlphaRow_NEON(const uint8* src_argb, uint8* dst_a, int width) { |
1302 asm volatile ( | 1302 asm volatile ( |
1303 "1: \n" | 1303 "1: \n" |
1304 MEMACCESS(0) | 1304 MEMACCESS(0) |
1305 "vld4.8 {d0, d1, d2, d3}, [%0]! \n" // load row 8 pixels | 1305 "vld4.8 {d0, d2, d4, d6}, [%0]! \n" // load 8 ARGB pixels |
1306 "subs %2, %2, #8 \n" // 8 processed per loop | 1306 "vld4.8 {d1, d3, d5, d7}, [%0]! \n" // load next 8 ARGB pixels |
| 1307 "subs %2, %2, #16 \n" // 16 processed per loop |
1307 MEMACCESS(1) | 1308 MEMACCESS(1) |
1308 "vst1.8 {d3}, [%1]! \n" // store 8 A's. | 1309 "vst1.8 {q3}, [%1]! \n" // store 16 A's. |
1309 "bgt 1b \n" | 1310 "bgt 1b \n" |
1310 : "+r"(src_argb), // %0 | 1311 : "+r"(src_argb), // %0 |
1311 "+r"(dst_a), // %1 | 1312 "+r"(dst_a), // %1 |
1312 "+r"(width) // %2 | 1313 "+r"(width) // %2 |
1313 : | 1314 : |
1314 : "cc", "memory", "d0", "d1", "d2", "d3" // Clobber List | 1315 : "cc", "memory", "q0", "q1", "q2", "q3" // Clobber List |
1315 ); | 1316 ); |
1316 } | 1317 } |
1317 | 1318 |
1318 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width) { | 1319 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width) { |
1319 asm volatile ( | 1320 asm volatile ( |
1320 "vmov.u8 d24, #15 \n" // B * 0.11400 coefficient | 1321 "vmov.u8 d24, #15 \n" // B * 0.11400 coefficient |
1321 "vmov.u8 d25, #75 \n" // G * 0.58700 coefficient | 1322 "vmov.u8 d25, #75 \n" // G * 0.58700 coefficient |
1322 "vmov.u8 d26, #38 \n" // R * 0.29900 coefficient | 1323 "vmov.u8 d26, #38 \n" // R * 0.29900 coefficient |
1323 "1: \n" | 1324 "1: \n" |
1324 MEMACCESS(0) | 1325 MEMACCESS(0) |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2836 "r"(6) // %5 | 2837 "r"(6) // %5 |
2837 : "cc", "memory", "q0", "q1" // Clobber List | 2838 : "cc", "memory", "q0", "q1" // Clobber List |
2838 ); | 2839 ); |
2839 } | 2840 } |
2840 #endif // defined(__ARM_NEON__) && !defined(__aarch64__) | 2841 #endif // defined(__ARM_NEON__) && !defined(__aarch64__) |
2841 | 2842 |
2842 #ifdef __cplusplus | 2843 #ifdef __cplusplus |
2843 } // extern "C" | 2844 } // extern "C" |
2844 } // namespace libyuv | 2845 } // namespace libyuv |
2845 #endif | 2846 #endif |
OLD | NEW |