Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(696)

Side by Side Diff: include/libyuv/row.h

Issue 2641153003: Add MSA optimized ARGB/ABGR/BGRA/RGBA To Y/UV row functions (Closed)
Patch Set: Fixed loop increments Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | source/convert.cc » ('j') | source/row_msa.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 #define HAS_ARGB1555TOUVROW_MSA 427 #define HAS_ARGB1555TOUVROW_MSA
428 #define HAS_RGB565TOUVROW_MSA 428 #define HAS_RGB565TOUVROW_MSA
429 #define HAS_RGB24TOUVROW_MSA 429 #define HAS_RGB24TOUVROW_MSA
430 #define HAS_RAWTOUVROW_MSA 430 #define HAS_RAWTOUVROW_MSA
431 #define HAS_NV12TOARGBROW_MSA 431 #define HAS_NV12TOARGBROW_MSA
432 #define HAS_NV12TORGB565ROW_MSA 432 #define HAS_NV12TORGB565ROW_MSA
433 #define HAS_NV21TOARGBROW_MSA 433 #define HAS_NV21TOARGBROW_MSA
434 #define HAS_SOBELROW_MSA 434 #define HAS_SOBELROW_MSA
435 #define HAS_SOBELTOPLANEROW_MSA 435 #define HAS_SOBELTOPLANEROW_MSA
436 #define HAS_SOBELXYROW_MSA 436 #define HAS_SOBELXYROW_MSA
437 #define HAS_ARGBTOYJROW_MSA
438 #define HAS_BGRATOYROW_MSA
439 #define HAS_ABGRTOYROW_MSA
440 #define HAS_RGBATOYROW_MSA
441 #define HAS_ARGBTOUVJROW_MSA
442 #define HAS_BGRATOUVROW_MSA
443 #define HAS_ABGRTOUVROW_MSA
444 #define HAS_RGBATOUVROW_MSA
437 #endif 445 #endif
438 446
439 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) 447 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
440 #if defined(VISUALC_HAS_AVX2) 448 #if defined(VISUALC_HAS_AVX2)
441 #define SIMD_ALIGNED(var) __declspec(align(32)) var 449 #define SIMD_ALIGNED(var) __declspec(align(32)) var
442 #else 450 #else
443 #define SIMD_ALIGNED(var) __declspec(align(16)) var 451 #define SIMD_ALIGNED(var) __declspec(align(16)) var
444 #endif 452 #endif
445 typedef __declspec(align(16)) int16 vec16[8]; 453 typedef __declspec(align(16)) int16 vec16[8];
446 typedef __declspec(align(16)) int32 vec32[4]; 454 typedef __declspec(align(16)) int32 vec32[4];
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 #define IACA_SSC_MARK(MARK_ID) \ 647 #define IACA_SSC_MARK(MARK_ID) \
640 __asm__ __volatile__("\n\t movl $" #MARK_ID \ 648 __asm__ __volatile__("\n\t movl $" #MARK_ID \
641 ", %%ebx" \ 649 ", %%ebx" \
642 "\n\t .byte 0x64, 0x67, 0x90" \ 650 "\n\t .byte 0x64, 0x67, 0x90" \
643 : \ 651 : \
644 : \ 652 : \
645 : "memory"); 653 : "memory");
646 654
647 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B"); 655 #define IACA_UD_BYTES __asm__ __volatile__("\n\t .byte 0x0F, 0x0B");
648 656
649 #else /* Visual C */ 657 #else /* Visual C */
650 #define IACA_UD_BYTES \ 658 #define IACA_UD_BYTES \
651 { __asm _emit 0x0F __asm _emit 0x0B } 659 { __asm _emit 0x0F __asm _emit 0x0B }
652 660
653 #define IACA_SSC_MARK(x) \ 661 #define IACA_SSC_MARK(x) \
654 { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 } 662 { __asm mov ebx, x __asm _emit 0x64 __asm _emit 0x67 __asm _emit 0x90 }
655 663
656 #define IACA_VC64_START __writegsbyte(111, 111); 664 #define IACA_VC64_START __writegsbyte(111, 111);
657 #define IACA_VC64_END __writegsbyte(222, 222); 665 #define IACA_VC64_END __writegsbyte(222, 222);
658 #endif 666 #endif
659 667
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
836 void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width); 844 void ARGBToYJRow_Any_AVX2(const uint8* src_argb, uint8* dst_y, int width);
837 void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width); 845 void ARGBToYJRow_SSSE3(const uint8* src_argb, uint8* dst_y, int width);
838 void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width); 846 void BGRAToYRow_SSSE3(const uint8* src_bgra, uint8* dst_y, int width);
839 void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width); 847 void ABGRToYRow_SSSE3(const uint8* src_abgr, uint8* dst_y, int width);
840 void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width); 848 void RGBAToYRow_SSSE3(const uint8* src_rgba, uint8* dst_y, int width);
841 void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width); 849 void RGB24ToYRow_SSSE3(const uint8* src_rgb24, uint8* dst_y, int width);
842 void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width); 850 void RAWToYRow_SSSE3(const uint8* src_raw, uint8* dst_y, int width);
843 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 851 void ARGBToYRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
844 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width); 852 void ARGBToYJRow_NEON(const uint8* src_argb, uint8* dst_y, int width);
845 void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width); 853 void ARGBToYRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
854 void ARGBToYJRow_MSA(const uint8* src_argb, uint8* dst_y, int width);
846 void ARGBToUV444Row_NEON(const uint8* src_argb, 855 void ARGBToUV444Row_NEON(const uint8* src_argb,
847 uint8* dst_u, 856 uint8* dst_u,
848 uint8* dst_v, 857 uint8* dst_v,
849 int width); 858 int width);
850 void ARGBToUVRow_NEON(const uint8* src_argb, 859 void ARGBToUVRow_NEON(const uint8* src_argb,
851 int src_stride_argb, 860 int src_stride_argb,
852 uint8* dst_u, 861 uint8* dst_u,
853 uint8* dst_v, 862 uint8* dst_v,
854 int width); 863 int width);
855 void ARGBToUV444Row_MSA(const uint8* src_argb, 864 void ARGBToUV444Row_MSA(const uint8* src_argb,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
899 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, 908 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555,
900 int src_stride_argb1555, 909 int src_stride_argb1555,
901 uint8* dst_u, 910 uint8* dst_u,
902 uint8* dst_v, 911 uint8* dst_v,
903 int width); 912 int width);
904 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, 913 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444,
905 int src_stride_argb4444, 914 int src_stride_argb4444,
906 uint8* dst_u, 915 uint8* dst_u,
907 uint8* dst_v, 916 uint8* dst_v,
908 int width); 917 int width);
918 void ARGBToUVJRow_MSA(const uint8* src_argb,
919 int src_stride_argb,
920 uint8* dst_u,
921 uint8* dst_v,
922 int width);
923 void BGRAToUVRow_MSA(const uint8* src_bgra,
924 int src_stride_bgra,
925 uint8* dst_u,
926 uint8* dst_v,
927 int width);
928 void ABGRToUVRow_MSA(const uint8* src_abgr,
929 int src_stride_abgr,
930 uint8* dst_u,
931 uint8* dst_v,
932 int width);
933 void RGBAToUVRow_MSA(const uint8* src_rgba,
934 int src_stride_rgba,
935 uint8* dst_u,
936 uint8* dst_v,
937 int width);
909 void RGB24ToUVRow_MSA(const uint8* src_rgb24, 938 void RGB24ToUVRow_MSA(const uint8* src_rgb24,
910 int src_stride_rgb24, 939 int src_stride_rgb24,
911 uint8* dst_u, 940 uint8* dst_u,
912 uint8* dst_v, 941 uint8* dst_v,
913 int width); 942 int width);
914 void RAWToUVRow_MSA(const uint8* src_raw, 943 void RAWToUVRow_MSA(const uint8* src_raw,
915 int src_stride_raw, 944 int src_stride_raw,
916 uint8* dst_u, 945 uint8* dst_u,
917 uint8* dst_v, 946 uint8* dst_v,
918 int width); 947 int width);
919 void RGB565ToUVRow_MSA(const uint8* src_rgb565, 948 void RGB565ToUVRow_MSA(const uint8* src_rgb565,
920 int src_stride_rgb565, 949 int src_stride_rgb565,
921 uint8* dst_u, 950 uint8* dst_u,
922 uint8* dst_v, 951 uint8* dst_v,
923 int width); 952 int width);
924 void ARGB1555ToUVRow_MSA(const uint8* src_argb1555, 953 void ARGB1555ToUVRow_MSA(const uint8* src_argb1555,
925 int src_stride_argb1555, 954 int src_stride_argb1555,
926 uint8* dst_u, 955 uint8* dst_u,
927 uint8* dst_v, 956 uint8* dst_v,
928 int width); 957 int width);
929 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); 958 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width);
930 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); 959 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width);
931 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width); 960 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width);
932 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width); 961 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
933 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width); 962 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width);
934 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width); 963 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
935 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); 964 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width);
936 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); 965 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width);
966 void BGRAToYRow_MSA(const uint8* src_bgra, uint8* dst_y, int width);
967 void ABGRToYRow_MSA(const uint8* src_abgr, uint8* dst_y, int width);
968 void RGBAToYRow_MSA(const uint8* src_rgba, uint8* dst_y, int width);
937 void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 969 void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
938 void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width); 970 void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width);
939 void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 971 void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
940 void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 972 void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
941 void BGRAToUVRow_DSPR2(const uint8* src_bgra, 973 void BGRAToUVRow_DSPR2(const uint8* src_bgra,
942 int src_stride_bgra, 974 int src_stride_bgra,
943 uint8* dst_u, 975 uint8* dst_u,
944 uint8* dst_v, 976 uint8* dst_v,
945 int width); 977 int width);
946 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 978 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
990 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555, 1022 void ARGB1555ToYRow_Any_NEON(const uint8* src_argb1555,
991 uint8* dst_y, 1023 uint8* dst_y,
992 int width); 1024 int width);
993 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 1025 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
994 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 1026 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
995 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 1027 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
996 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 1028 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
997 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, 1029 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444,
998 uint8* dst_y, 1030 uint8* dst_y,
999 int width); 1031 int width);
1032 void BGRAToYRow_Any_MSA(const uint8* src_bgra, uint8* dst_y, int width);
1033 void ABGRToYRow_Any_MSA(const uint8* src_abgr, uint8* dst_y, int width);
1034 void RGBAToYRow_Any_MSA(const uint8* src_rgba, uint8* dst_y, int width);
1035 void ARGBToYJRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
1000 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 1036 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
1001 void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width); 1037 void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
1002 void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width); 1038 void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width);
1003 void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width); 1039 void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
1004 void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width); 1040 void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
1005 1041
1006 void ARGBToUVRow_AVX2(const uint8* src_argb, 1042 void ARGBToUVRow_AVX2(const uint8* src_argb,
1007 int src_stride_argb, 1043 int src_stride_argb,
1008 uint8* dst_u, 1044 uint8* dst_u,
1009 uint8* dst_v, 1045 uint8* dst_v,
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after
1129 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, 1165 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
1130 int src_stride_argb1555, 1166 int src_stride_argb1555,
1131 uint8* dst_u, 1167 uint8* dst_u,
1132 uint8* dst_v, 1168 uint8* dst_v,
1133 int width); 1169 int width);
1134 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, 1170 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
1135 int src_stride_argb4444, 1171 int src_stride_argb4444,
1136 uint8* dst_u, 1172 uint8* dst_u,
1137 uint8* dst_v, 1173 uint8* dst_v,
1138 int width); 1174 int width);
1175 void ARGBToUVJRow_Any_MSA(const uint8* src_argb,
1176 int src_stride_argb,
1177 uint8* dst_u,
1178 uint8* dst_v,
1179 int width);
1180 void BGRAToUVRow_Any_MSA(const uint8* src_bgra,
1181 int src_stride_bgra,
1182 uint8* dst_u,
1183 uint8* dst_v,
1184 int width);
1185 void ABGRToUVRow_Any_MSA(const uint8* src_abgr,
1186 int src_stride_abgr,
1187 uint8* dst_u,
1188 uint8* dst_v,
1189 int width);
1190 void RGBAToUVRow_Any_MSA(const uint8* src_rgba,
1191 int src_stride_rgba,
1192 uint8* dst_u,
1193 uint8* dst_v,
1194 int width);
1139 void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24, 1195 void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24,
1140 int src_stride_rgb24, 1196 int src_stride_rgb24,
1141 uint8* dst_u, 1197 uint8* dst_u,
1142 uint8* dst_v, 1198 uint8* dst_v,
1143 int width); 1199 int width);
1144 void RAWToUVRow_Any_MSA(const uint8* src_raw, 1200 void RAWToUVRow_Any_MSA(const uint8* src_raw,
1145 int src_stride_raw, 1201 int src_stride_raw,
1146 uint8* dst_u, 1202 uint8* dst_u,
1147 uint8* dst_v, 1203 uint8* dst_v,
1148 int width); 1204 int width);
(...skipping 1884 matching lines...) Expand 10 before | Expand all | Expand 10 after
3033 int width, 3089 int width,
3034 const uint8* luma, 3090 const uint8* luma,
3035 uint32 lumacoeff); 3091 uint32 lumacoeff);
3036 3092
3037 #ifdef __cplusplus 3093 #ifdef __cplusplus
3038 } // extern "C" 3094 } // extern "C"
3039 } // namespace libyuv 3095 } // namespace libyuv
3040 #endif 3096 #endif
3041 3097
3042 #endif // INCLUDE_LIBYUV_ROW_H_ 3098 #endif // INCLUDE_LIBYUV_ROW_H_
OLDNEW
« no previous file with comments | « no previous file | source/convert.cc » ('j') | source/row_msa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698