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

Side by Side Diff: source/convert_argb.cc

Issue 2421843002: Add MSA optimized ARGB4444ToI420 and ARGB4444ToARGB functions (Closed)
Patch Set: Created 4 years, 2 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
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 1057 matching lines...) Expand 10 before | Expand all | Expand 10 after
1068 } 1068 }
1069 #endif 1069 #endif
1070 #if defined(HAS_ARGB4444TOARGBROW_NEON) 1070 #if defined(HAS_ARGB4444TOARGBROW_NEON)
1071 if (TestCpuFlag(kCpuHasNEON)) { 1071 if (TestCpuFlag(kCpuHasNEON)) {
1072 ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_NEON; 1072 ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_NEON;
1073 if (IS_ALIGNED(width, 8)) { 1073 if (IS_ALIGNED(width, 8)) {
1074 ARGB4444ToARGBRow = ARGB4444ToARGBRow_NEON; 1074 ARGB4444ToARGBRow = ARGB4444ToARGBRow_NEON;
1075 } 1075 }
1076 } 1076 }
1077 #endif 1077 #endif
1078 #if defined(HAS_ARGB4444TOARGBROW_MSA)
1079 if (TestCpuFlag(kCpuHasMSA)) {
1080 ARGB4444ToARGBRow = ARGB4444ToARGBRow_Any_MSA;
1081 if (IS_ALIGNED(width, 16)) {
1082 ARGB4444ToARGBRow = ARGB4444ToARGBRow_MSA;
1083 }
1084 }
1085 #endif
1078 1086
1079 for (y = 0; y < height; ++y) { 1087 for (y = 0; y < height; ++y) {
1080 ARGB4444ToARGBRow(src_argb4444, dst_argb, width); 1088 ARGB4444ToARGBRow(src_argb4444, dst_argb, width);
1081 src_argb4444 += src_stride_argb4444; 1089 src_argb4444 += src_stride_argb4444;
1082 dst_argb += dst_stride_argb; 1090 dst_argb += dst_stride_argb;
1083 } 1091 }
1084 return 0; 1092 return 0;
1085 } 1093 }
1086 1094
1087 // Convert NV12 to ARGB. 1095 // Convert NV12 to ARGB.
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after
1378 src_uyvy += src_stride_uyvy; 1386 src_uyvy += src_stride_uyvy;
1379 dst_argb += dst_stride_argb; 1387 dst_argb += dst_stride_argb;
1380 } 1388 }
1381 return 0; 1389 return 0;
1382 } 1390 }
1383 1391
1384 #ifdef __cplusplus 1392 #ifdef __cplusplus
1385 } // extern "C" 1393 } // extern "C"
1386 } // namespace libyuv 1394 } // namespace libyuv
1387 #endif 1395 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698