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

Side by Side Diff: source/planar_functions.cc

Issue 2430313005: Add MSA optimized I422ToARGBRow_MSA and I422ToRGBARow_MSA 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 1225 matching lines...) Expand 10 before | Expand all | Expand 10 after
1236 #endif 1236 #endif
1237 #if defined(HAS_I422TORGBAROW_DSPR2) 1237 #if defined(HAS_I422TORGBAROW_DSPR2)
1238 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(width, 4) && 1238 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(width, 4) &&
1239 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 1239 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
1240 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) && 1240 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
1241 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) && 1241 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
1242 IS_ALIGNED(dst_rgba, 4) && IS_ALIGNED(dst_stride_rgba, 4)) { 1242 IS_ALIGNED(dst_rgba, 4) && IS_ALIGNED(dst_stride_rgba, 4)) {
1243 I422ToRGBARow = I422ToRGBARow_DSPR2; 1243 I422ToRGBARow = I422ToRGBARow_DSPR2;
1244 } 1244 }
1245 #endif 1245 #endif
1246 #if defined(HAS_I422TORGBAROW_MSA)
1247 if (TestCpuFlag(kCpuHasMSA)) {
1248 I422ToRGBARow = I422ToRGBARow_Any_MSA;
1249 if (IS_ALIGNED(width, 8)) {
1250 I422ToRGBARow = I422ToRGBARow_MSA;
1251 }
1252 }
1253 #endif
1246 1254
1247 for (y = 0; y < height; ++y) { 1255 for (y = 0; y < height; ++y) {
1248 I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width); 1256 I422ToRGBARow(src_y, src_u, src_v, dst_rgba, yuvconstants, width);
1249 dst_rgba += dst_stride_rgba; 1257 dst_rgba += dst_stride_rgba;
1250 src_y += src_stride_y; 1258 src_y += src_stride_y;
1251 src_u += src_stride_u; 1259 src_u += src_stride_u;
1252 src_v += src_stride_v; 1260 src_v += src_stride_v;
1253 } 1261 }
1254 return 0; 1262 return 0;
1255 } 1263 }
(...skipping 1730 matching lines...) Expand 10 before | Expand all | Expand 10 after
2986 } 2994 }
2987 free_aligned_buffer_64(rows); 2995 free_aligned_buffer_64(rows);
2988 } 2996 }
2989 return 0; 2997 return 0;
2990 } 2998 }
2991 2999
2992 #ifdef __cplusplus 3000 #ifdef __cplusplus
2993 } // extern "C" 3001 } // extern "C"
2994 } // namespace libyuv 3002 } // namespace libyuv
2995 #endif 3003 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698