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

Side by Side Diff: source/convert_from_argb.cc

Issue 2487913004: Add MSA optimized ARGBToRGB24Row_MSA and ARGBToRAWRow_MSA functions (Closed)
Patch Set: Added missed code Created 4 years, 1 month 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 | « include/libyuv/row.h ('k') | source/row_any.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 2012 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2012 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 823 matching lines...) Expand 10 before | Expand all | Expand 10 after
834 } 834 }
835 #endif 835 #endif
836 #if defined(HAS_ARGBTORGB24ROW_NEON) 836 #if defined(HAS_ARGBTORGB24ROW_NEON)
837 if (TestCpuFlag(kCpuHasNEON)) { 837 if (TestCpuFlag(kCpuHasNEON)) {
838 ARGBToRGB24Row = ARGBToRGB24Row_Any_NEON; 838 ARGBToRGB24Row = ARGBToRGB24Row_Any_NEON;
839 if (IS_ALIGNED(width, 8)) { 839 if (IS_ALIGNED(width, 8)) {
840 ARGBToRGB24Row = ARGBToRGB24Row_NEON; 840 ARGBToRGB24Row = ARGBToRGB24Row_NEON;
841 } 841 }
842 } 842 }
843 #endif 843 #endif
844 #if defined(HAS_ARGBTORGB24ROW_MSA)
845 if (TestCpuFlag(kCpuHasMSA)) {
846 ARGBToRGB24Row = ARGBToRGB24Row_Any_MSA;
847 if (IS_ALIGNED(width, 16)) {
848 ARGBToRGB24Row = ARGBToRGB24Row_MSA;
849 }
850 }
851 #endif
844 852
845 for (y = 0; y < height; ++y) { 853 for (y = 0; y < height; ++y) {
846 ARGBToRGB24Row(src_argb, dst_rgb24, width); 854 ARGBToRGB24Row(src_argb, dst_rgb24, width);
847 src_argb += src_stride_argb; 855 src_argb += src_stride_argb;
848 dst_rgb24 += dst_stride_rgb24; 856 dst_rgb24 += dst_stride_rgb24;
849 } 857 }
850 return 0; 858 return 0;
851 } 859 }
852 860
853 // Convert ARGB To RAW. 861 // Convert ARGB To RAW.
(...skipping 30 matching lines...) Expand all
884 } 892 }
885 #endif 893 #endif
886 #if defined(HAS_ARGBTORAWROW_NEON) 894 #if defined(HAS_ARGBTORAWROW_NEON)
887 if (TestCpuFlag(kCpuHasNEON)) { 895 if (TestCpuFlag(kCpuHasNEON)) {
888 ARGBToRAWRow = ARGBToRAWRow_Any_NEON; 896 ARGBToRAWRow = ARGBToRAWRow_Any_NEON;
889 if (IS_ALIGNED(width, 8)) { 897 if (IS_ALIGNED(width, 8)) {
890 ARGBToRAWRow = ARGBToRAWRow_NEON; 898 ARGBToRAWRow = ARGBToRAWRow_NEON;
891 } 899 }
892 } 900 }
893 #endif 901 #endif
902 #if defined(HAS_ARGBTORAWROW_MSA)
903 if (TestCpuFlag(kCpuHasMSA)) {
904 ARGBToRAWRow = ARGBToRAWRow_Any_MSA;
905 if (IS_ALIGNED(width, 16)) {
906 ARGBToRAWRow = ARGBToRAWRow_MSA;
907 }
908 }
909 #endif
894 910
895 for (y = 0; y < height; ++y) { 911 for (y = 0; y < height; ++y) {
896 ARGBToRAWRow(src_argb, dst_raw, width); 912 ARGBToRAWRow(src_argb, dst_raw, width);
897 src_argb += src_stride_argb; 913 src_argb += src_stride_argb;
898 dst_raw += dst_stride_raw; 914 dst_raw += dst_stride_raw;
899 } 915 }
900 return 0; 916 return 0;
901 } 917 }
902 918
903 // Ordered 8x8 dither for 888 to 565. Values from 0 to 7. 919 // Ordered 8x8 dither for 888 to 565. Values from 0 to 7.
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after
1349 src_argb += src_stride_argb; 1365 src_argb += src_stride_argb;
1350 dst_yj += dst_stride_yj; 1366 dst_yj += dst_stride_yj;
1351 } 1367 }
1352 return 0; 1368 return 0;
1353 } 1369 }
1354 1370
1355 #ifdef __cplusplus 1371 #ifdef __cplusplus
1356 } // extern "C" 1372 } // extern "C"
1357 } // namespace libyuv 1373 } // namespace libyuv
1358 #endif 1374 #endif
OLDNEW
« no previous file with comments | « include/libyuv/row.h ('k') | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698