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 829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
840 "b.gt 1b \n" | 840 "b.gt 1b \n" |
841 : "+r"(src_raw), // %0 | 841 : "+r"(src_raw), // %0 |
842 "+r"(dst_argb), // %1 | 842 "+r"(dst_argb), // %1 |
843 "+r"(width) // %2 | 843 "+r"(width) // %2 |
844 : | 844 : |
845 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5" // Clobber List | 845 : "cc", "memory", "v0", "v1", "v2", "v3", "v4", "v5" // Clobber List |
846 ); | 846 ); |
847 } | 847 } |
848 #endif // HAS_RAWTOARGBROW_NEON | 848 #endif // HAS_RAWTOARGBROW_NEON |
849 | 849 |
| 850 void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width) { |
| 851 asm volatile ( |
| 852 "1: \n" |
| 853 MEMACCESS(0) |
| 854 "ld3 {v0.8b,v1.8b,v2.8b}, [%0], #24 \n" // read r g b |
| 855 "subs %w2, %w2, #8 \n" // 8 processed per loop. |
| 856 "orr v3.8b, v1.8b, v1.8b \n" // move g |
| 857 "orr v4.8b, v0.8b, v0.8b \n" // move r |
| 858 MEMACCESS(1) |
| 859 "st3 {v2.8b,v3.8b,v4.8b}, [%1], #24 \n" // store b g r |
| 860 "b.gt 1b \n" |
| 861 : "+r"(src_raw), // %0 |
| 862 "+r"(dst_rgb24), // %1 |
| 863 "+r"(width) // %2 |
| 864 : |
| 865 : "cc", "memory", "v0", "v1", "v2", "v3", "v4" // Clobber List |
| 866 ); |
| 867 } |
| 868 |
850 #define RGB565TOARGB \ | 869 #define RGB565TOARGB \ |
851 "shrn v6.8b, v0.8h, #5 \n" /* G xxGGGGGG */ \ | 870 "shrn v6.8b, v0.8h, #5 \n" /* G xxGGGGGG */ \ |
852 "shl v6.8b, v6.8b, #2 \n" /* G GGGGGG00 upper 6 */ \ | 871 "shl v6.8b, v6.8b, #2 \n" /* G GGGGGG00 upper 6 */ \ |
853 "ushr v4.8b, v6.8b, #6 \n" /* G 000000GG lower 2 */ \ | 872 "ushr v4.8b, v6.8b, #6 \n" /* G 000000GG lower 2 */ \ |
854 "orr v1.8b, v4.8b, v6.8b \n" /* G */ \ | 873 "orr v1.8b, v4.8b, v6.8b \n" /* G */ \ |
855 "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ | 874 "xtn v2.8b, v0.8h \n" /* B xxxBBBBB */ \ |
856 "ushr v0.8h, v0.8h, #11 \n" /* R 000RRRRR */ \ | 875 "ushr v0.8h, v0.8h, #11 \n" /* R 000RRRRR */ \ |
857 "xtn2 v2.16b,v0.8h \n" /* R in upper part */ \ | 876 "xtn2 v2.16b,v0.8h \n" /* R in upper part */ \ |
858 "shl v2.16b, v2.16b, #3 \n" /* R,B BBBBB000 upper 5 */ \ | 877 "shl v2.16b, v2.16b, #3 \n" /* R,B BBBBB000 upper 5 */ \ |
859 "ushr v0.16b, v2.16b, #5 \n" /* R,B 00000BBB lower 3 */ \ | 878 "ushr v0.16b, v2.16b, #5 \n" /* R,B 00000BBB lower 3 */ \ |
(...skipping 2116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2976 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List | 2995 : "cc", "memory", "v0", "v1", "v2", "v3" // Clobber List |
2977 ); | 2996 ); |
2978 } | 2997 } |
2979 #endif // HAS_SOBELYROW_NEON | 2998 #endif // HAS_SOBELYROW_NEON |
2980 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) | 2999 #endif // !defined(LIBYUV_DISABLE_NEON) && defined(__aarch64__) |
2981 | 3000 |
2982 #ifdef __cplusplus | 3001 #ifdef __cplusplus |
2983 } // extern "C" | 3002 } // extern "C" |
2984 } // namespace libyuv | 3003 } // namespace libyuv |
2985 #endif | 3004 #endif |
OLD | NEW |