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

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

Issue 2600713002: Add MSA optimized RAW/RGB/ARGB to ARGB/Y/UV row functions (Closed)
Patch Set: Resolved merge conflicts Created 3 years, 11 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') | no next file with comments »
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 #define HAS_ARGBTOUV444ROW_MSA 409 #define HAS_ARGBTOUV444ROW_MSA
410 #define HAS_ARGBMULTIPLYROW_MSA 410 #define HAS_ARGBMULTIPLYROW_MSA
411 #define HAS_ARGBADDROW_MSA 411 #define HAS_ARGBADDROW_MSA
412 #define HAS_ARGBSUBTRACTROW_MSA 412 #define HAS_ARGBSUBTRACTROW_MSA
413 #define HAS_ARGBATTENUATEROW_MSA 413 #define HAS_ARGBATTENUATEROW_MSA
414 #define HAS_ARGBTORGB565DITHERROW_MSA 414 #define HAS_ARGBTORGB565DITHERROW_MSA
415 #define HAS_ARGBSHUFFLEROW_MSA 415 #define HAS_ARGBSHUFFLEROW_MSA
416 #define HAS_ARGBSHADEROW_MSA 416 #define HAS_ARGBSHADEROW_MSA
417 #define HAS_ARGBGRAYROW_MSA 417 #define HAS_ARGBGRAYROW_MSA
418 #define HAS_ARGBSEPIAROW_MSA 418 #define HAS_ARGBSEPIAROW_MSA
419 #define HAS_ARGB1555TOARGBROW_MSA
420 #define HAS_RGB565TOARGBROW_MSA
421 #define HAS_RGB24TOARGBROW_MSA
422 #define HAS_RAWTOARGBROW_MSA
423 #define HAS_ARGB1555TOYROW_MSA
424 #define HAS_RGB565TOYROW_MSA
425 #define HAS_RGB24TOYROW_MSA
426 #define HAS_RAWTOYROW_MSA
427 #define HAS_ARGB1555TOUVROW_MSA
428 #define HAS_RGB565TOUVROW_MSA
429 #define HAS_RGB24TOUVROW_MSA
430 #define HAS_RAWTOUVROW_MSA
419 #endif 431 #endif
420 432
421 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__) 433 #if defined(_MSC_VER) && !defined(__CLR_VER) && !defined(__clang__)
422 #if defined(VISUALC_HAS_AVX2) 434 #if defined(VISUALC_HAS_AVX2)
423 #define SIMD_ALIGNED(var) __declspec(align(32)) var 435 #define SIMD_ALIGNED(var) __declspec(align(32)) var
424 #else 436 #else
425 #define SIMD_ALIGNED(var) __declspec(align(16)) var 437 #define SIMD_ALIGNED(var) __declspec(align(16)) var
426 #endif 438 #endif
427 typedef __declspec(align(16)) int16 vec16[8]; 439 typedef __declspec(align(16)) int16 vec16[8];
428 typedef __declspec(align(16)) int32 vec32[4]; 440 typedef __declspec(align(16)) int32 vec32[4];
(...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after
815 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555, 827 void ARGB1555ToUVRow_NEON(const uint8* src_argb1555,
816 int src_stride_argb1555, 828 int src_stride_argb1555,
817 uint8* dst_u, 829 uint8* dst_u,
818 uint8* dst_v, 830 uint8* dst_v,
819 int width); 831 int width);
820 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444, 832 void ARGB4444ToUVRow_NEON(const uint8* src_argb4444,
821 int src_stride_argb4444, 833 int src_stride_argb4444,
822 uint8* dst_u, 834 uint8* dst_u,
823 uint8* dst_v, 835 uint8* dst_v,
824 int width); 836 int width);
837 void RGB24ToUVRow_MSA(const uint8* src_rgb24,
838 int src_stride_rgb24,
839 uint8* dst_u,
840 uint8* dst_v,
841 int width);
842 void RAWToUVRow_MSA(const uint8* src_raw,
843 int src_stride_raw,
844 uint8* dst_u,
845 uint8* dst_v,
846 int width);
847 void RGB565ToUVRow_MSA(const uint8* src_rgb565,
848 int src_stride_rgb565,
849 uint8* dst_u,
850 uint8* dst_v,
851 int width);
852 void ARGB1555ToUVRow_MSA(const uint8* src_argb1555,
853 int src_stride_argb1555,
854 uint8* dst_u,
855 uint8* dst_v,
856 int width);
825 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width); 857 void BGRAToYRow_NEON(const uint8* src_bgra, uint8* dst_y, int width);
826 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width); 858 void ABGRToYRow_NEON(const uint8* src_abgr, uint8* dst_y, int width);
827 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width); 859 void RGBAToYRow_NEON(const uint8* src_rgba, uint8* dst_y, int width);
828 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width); 860 void RGB24ToYRow_NEON(const uint8* src_rgb24, uint8* dst_y, int width);
829 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width); 861 void RAWToYRow_NEON(const uint8* src_raw, uint8* dst_y, int width);
830 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width); 862 void RGB565ToYRow_NEON(const uint8* src_rgb565, uint8* dst_y, int width);
831 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width); 863 void ARGB1555ToYRow_NEON(const uint8* src_argb1555, uint8* dst_y, int width);
832 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width); 864 void ARGB4444ToYRow_NEON(const uint8* src_argb4444, uint8* dst_y, int width);
865 void RGB24ToYRow_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
866 void RAWToYRow_MSA(const uint8* src_raw, uint8* dst_y, int width);
867 void RGB565ToYRow_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
868 void ARGB1555ToYRow_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
833 void BGRAToUVRow_DSPR2(const uint8* src_bgra, 869 void BGRAToUVRow_DSPR2(const uint8* src_bgra,
834 int src_stride_bgra, 870 int src_stride_bgra,
835 uint8* dst_u, 871 uint8* dst_u,
836 uint8* dst_v, 872 uint8* dst_v,
837 int width); 873 int width);
838 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 874 void BGRAToYRow_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
839 void ABGRToUVRow_DSPR2(const uint8* src_abgr, 875 void ABGRToUVRow_DSPR2(const uint8* src_abgr,
840 int src_stride_abgr, 876 int src_stride_abgr,
841 uint8* dst_u, 877 uint8* dst_u,
842 uint8* dst_v, 878 uint8* dst_v,
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 uint8* dst_y, 919 uint8* dst_y,
884 int width); 920 int width);
885 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width); 921 void BGRAToYRow_Any_DSPR2(const uint8* src_bgra, uint8* dst_y, int width);
886 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width); 922 void ARGBToYRow_Any_DSPR2(const uint8* src_argb, uint8* dst_y, int width);
887 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width); 923 void ABGRToYRow_Any_DSPR2(const uint8* src_abgr, uint8* dst_y, int width);
888 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width); 924 void RGBAToYRow_Any_DSPR2(const uint8* src_rgba, uint8* dst_y, int width);
889 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444, 925 void ARGB4444ToYRow_Any_NEON(const uint8* src_argb4444,
890 uint8* dst_y, 926 uint8* dst_y,
891 int width); 927 int width);
892 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width); 928 void ARGBToYRow_Any_MSA(const uint8* src_argb, uint8* dst_y, int width);
929 void RGB24ToYRow_Any_MSA(const uint8* src_rgb24, uint8* dst_y, int width);
930 void RAWToYRow_Any_MSA(const uint8* src_raw, uint8* dst_y, int width);
931 void RGB565ToYRow_Any_MSA(const uint8* src_rgb565, uint8* dst_y, int width);
932 void ARGB1555ToYRow_Any_MSA(const uint8* src_argb1555, uint8* dst_y, int width);
893 933
894 void ARGBToUVRow_AVX2(const uint8* src_argb, 934 void ARGBToUVRow_AVX2(const uint8* src_argb,
895 int src_stride_argb, 935 int src_stride_argb,
896 uint8* dst_u, 936 uint8* dst_u,
897 uint8* dst_v, 937 uint8* dst_v,
898 int width); 938 int width);
899 void ARGBToUVJRow_AVX2(const uint8* src_argb, 939 void ARGBToUVJRow_AVX2(const uint8* src_argb,
900 int src_stride_argb, 940 int src_stride_argb,
901 uint8* dst_u, 941 uint8* dst_u,
902 uint8* dst_v, 942 uint8* dst_v,
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after
1017 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555, 1057 void ARGB1555ToUVRow_Any_NEON(const uint8* src_argb1555,
1018 int src_stride_argb1555, 1058 int src_stride_argb1555,
1019 uint8* dst_u, 1059 uint8* dst_u,
1020 uint8* dst_v, 1060 uint8* dst_v,
1021 int width); 1061 int width);
1022 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444, 1062 void ARGB4444ToUVRow_Any_NEON(const uint8* src_argb4444,
1023 int src_stride_argb4444, 1063 int src_stride_argb4444,
1024 uint8* dst_u, 1064 uint8* dst_u,
1025 uint8* dst_v, 1065 uint8* dst_v,
1026 int width); 1066 int width);
1067 void RGB24ToUVRow_Any_MSA(const uint8* src_rgb24,
1068 int src_stride_rgb24,
1069 uint8* dst_u,
1070 uint8* dst_v,
1071 int width);
1072 void RAWToUVRow_Any_MSA(const uint8* src_raw,
1073 int src_stride_raw,
1074 uint8* dst_u,
1075 uint8* dst_v,
1076 int width);
1077 void RGB565ToUVRow_Any_MSA(const uint8* src_rgb565,
1078 int src_stride_rgb565,
1079 uint8* dst_u,
1080 uint8* dst_v,
1081 int width);
1082 void ARGB1555ToUVRow_Any_MSA(const uint8* src_argb1555,
1083 int src_stride_argb1555,
1084 uint8* dst_u,
1085 uint8* dst_v,
1086 int width);
1027 void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra, 1087 void BGRAToUVRow_Any_DSPR2(const uint8* src_bgra,
1028 int src_stride_bgra, 1088 int src_stride_bgra,
1029 uint8* dst_u, 1089 uint8* dst_u,
1030 uint8* dst_v, 1090 uint8* dst_v,
1031 int width); 1091 int width);
1032 void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr, 1092 void ABGRToUVRow_Any_DSPR2(const uint8* src_abgr,
1033 int src_stride_abgr, 1093 int src_stride_abgr,
1034 uint8* dst_u, 1094 uint8* dst_u,
1035 uint8* dst_v, 1095 uint8* dst_v,
1036 int width); 1096 int width);
(...skipping 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
1334 int width); 1394 int width);
1335 void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width); 1395 void RGB565ToARGBRow_AVX2(const uint8* src_rgb565, uint8* dst_argb, int width);
1336 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555, 1396 void ARGB1555ToARGBRow_AVX2(const uint8* src_argb1555,
1337 uint8* dst_argb, 1397 uint8* dst_argb,
1338 int width); 1398 int width);
1339 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444, 1399 void ARGB4444ToARGBRow_AVX2(const uint8* src_argb4444,
1340 uint8* dst_argb, 1400 uint8* dst_argb,
1341 int width); 1401 int width);
1342 1402
1343 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width); 1403 void RGB24ToARGBRow_NEON(const uint8* src_rgb24, uint8* dst_argb, int width);
1404 void RGB24ToARGBRow_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
1344 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width); 1405 void RAWToARGBRow_NEON(const uint8* src_raw, uint8* dst_argb, int width);
1406 void RAWToARGBRow_MSA(const uint8* src_raw, uint8* dst_argb, int width);
1345 void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 1407 void RAWToRGB24Row_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
1346 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width); 1408 void RGB565ToARGBRow_NEON(const uint8* src_rgb565, uint8* dst_argb, int width);
1409 void RGB565ToARGBRow_MSA(const uint8* src_rgb565, uint8* dst_argb, int width);
1347 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555, 1410 void ARGB1555ToARGBRow_NEON(const uint8* src_argb1555,
1348 uint8* dst_argb, 1411 uint8* dst_argb,
1349 int width); 1412 int width);
1413 void ARGB1555ToARGBRow_MSA(const uint8* src_argb1555,
1414 uint8* dst_argb,
1415 int width);
1350 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444, 1416 void ARGB4444ToARGBRow_NEON(const uint8* src_argb4444,
1351 uint8* dst_argb, 1417 uint8* dst_argb,
1352 int width); 1418 int width);
1353 void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width); 1419 void RGB24ToARGBRow_DSPR2(const uint8* src_rgb24, uint8* dst_argb, int width);
1354 void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); 1420 void RAWToARGBRow_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
1355 void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width); 1421 void RGB565ToARGBRow_DSPR2(const uint8* src_rgb565, uint8* dst_argb, int width);
1356 void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555, 1422 void ARGB1555ToARGBRow_DSPR2(const uint8* src_argb1555,
1357 uint8* dst_argb, 1423 uint8* dst_argb,
1358 int width); 1424 int width);
1359 void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444, 1425 void ARGB4444ToARGBRow_DSPR2(const uint8* src_argb4444,
(...skipping 29 matching lines...) Expand all
1389 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555, 1455 void ARGB1555ToARGBRow_Any_AVX2(const uint8* src_argb1555,
1390 uint8* dst_argb, 1456 uint8* dst_argb,
1391 int width); 1457 int width);
1392 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444, 1458 void ARGB4444ToARGBRow_Any_AVX2(const uint8* src_argb4444,
1393 uint8* dst_argb, 1459 uint8* dst_argb,
1394 int width); 1460 int width);
1395 1461
1396 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24, 1462 void RGB24ToARGBRow_Any_NEON(const uint8* src_rgb24,
1397 uint8* dst_argb, 1463 uint8* dst_argb,
1398 int width); 1464 int width);
1465 void RGB24ToARGBRow_Any_MSA(const uint8* src_rgb24, uint8* dst_argb, int width);
1399 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width); 1466 void RAWToARGBRow_Any_NEON(const uint8* src_raw, uint8* dst_argb, int width);
1467 void RAWToARGBRow_Any_MSA(const uint8* src_raw, uint8* dst_argb, int width);
1400 void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width); 1468 void RAWToRGB24Row_Any_NEON(const uint8* src_raw, uint8* dst_rgb24, int width);
1401 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565, 1469 void RGB565ToARGBRow_Any_NEON(const uint8* src_rgb565,
1402 uint8* dst_argb, 1470 uint8* dst_argb,
1403 int width); 1471 int width);
1472 void RGB565ToARGBRow_Any_MSA(const uint8* src_rgb565,
1473 uint8* dst_argb,
1474 int width);
1404 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555, 1475 void ARGB1555ToARGBRow_Any_NEON(const uint8* src_argb1555,
1405 uint8* dst_argb, 1476 uint8* dst_argb,
1406 int width); 1477 int width);
1478 void ARGB1555ToARGBRow_Any_MSA(const uint8* src_argb1555,
1479 uint8* dst_argb,
1480 int width);
1407 void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444, 1481 void ARGB4444ToARGBRow_Any_NEON(const uint8* src_argb4444,
1408 uint8* dst_argb, 1482 uint8* dst_argb,
1409 int width); 1483 int width);
1410 void RGB24ToARGBRow_Any_DSPR2(const uint8* src_rgb24, 1484 void RGB24ToARGBRow_Any_DSPR2(const uint8* src_rgb24,
1411 uint8* dst_argb, 1485 uint8* dst_argb,
1412 int width); 1486 int width);
1413 void RAWToARGBRow_Any_DSPR2(const uint8* src_raw, uint8* dst_argb, int width); 1487 void RAWToARGBRow_Any_DSPR2(const uint8* src_raw, uint8* dst_argb, int width);
1414 void RGB565ToARGBRow_Any_DSPR2(const uint8* src_rgb565, 1488 void RGB565ToARGBRow_Any_DSPR2(const uint8* src_rgb565,
1415 uint8* dst_argb, 1489 uint8* dst_argb,
1416 int width); 1490 int width);
(...skipping 1431 matching lines...) Expand 10 before | Expand all | Expand 10 after
2848 int width, 2922 int width,
2849 const uint8* luma, 2923 const uint8* luma,
2850 uint32 lumacoeff); 2924 uint32 lumacoeff);
2851 2925
2852 #ifdef __cplusplus 2926 #ifdef __cplusplus
2853 } // extern "C" 2927 } // extern "C"
2854 } // namespace libyuv 2928 } // namespace libyuv
2855 #endif 2929 #endif
2856 2930
2857 #endif // INCLUDE_LIBYUV_ROW_H_ 2931 #endif // INCLUDE_LIBYUV_ROW_H_
OLDNEW
« no previous file with comments | « no previous file | source/convert.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698