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

Side by Side Diff: source/scale_argb.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
« source/row_msa.cc ('K') | « source/row_msa.cc ('k') | no next file » | 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after
467 #endif 467 #endif
468 #if defined(HAS_I422TOARGBROW_DSPR2) 468 #if defined(HAS_I422TOARGBROW_DSPR2)
469 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(src_width, 4) && 469 if (TestCpuFlag(kCpuHasDSPR2) && IS_ALIGNED(src_width, 4) &&
470 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) && 470 IS_ALIGNED(src_y, 4) && IS_ALIGNED(src_stride_y, 4) &&
471 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) && 471 IS_ALIGNED(src_u, 2) && IS_ALIGNED(src_stride_u, 2) &&
472 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) && 472 IS_ALIGNED(src_v, 2) && IS_ALIGNED(src_stride_v, 2) &&
473 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) { 473 IS_ALIGNED(dst_argb, 4) && IS_ALIGNED(dst_stride_argb, 4)) {
474 I422ToARGBRow = I422ToARGBRow_DSPR2; 474 I422ToARGBRow = I422ToARGBRow_DSPR2;
475 } 475 }
476 #endif 476 #endif
477 #if defined(HAS_I422TOARGBROW_MSA)
478 if (TestCpuFlag(kCpuHasMSA)) {
479 I422ToARGBRow = I422ToARGBRow_Any_MSA;
480 if (IS_ALIGNED(src_width, 8)) {
481 I422ToARGBRow = I422ToARGBRow_MSA;
482 }
483 }
484 #endif
477 485
478 void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb, 486 void (*InterpolateRow)(uint8* dst_argb, const uint8* src_argb,
479 ptrdiff_t src_stride, int dst_width, int source_y_fraction) = 487 ptrdiff_t src_stride, int dst_width, int source_y_fraction) =
480 InterpolateRow_C; 488 InterpolateRow_C;
481 #if defined(HAS_INTERPOLATEROW_SSSE3) 489 #if defined(HAS_INTERPOLATEROW_SSSE3)
482 if (TestCpuFlag(kCpuHasSSSE3)) { 490 if (TestCpuFlag(kCpuHasSSSE3)) {
483 InterpolateRow = InterpolateRow_Any_SSSE3; 491 InterpolateRow = InterpolateRow_Any_SSSE3;
484 if (IS_ALIGNED(dst_width, 4)) { 492 if (IS_ALIGNED(dst_width, 4)) {
485 InterpolateRow = InterpolateRow_SSSE3; 493 InterpolateRow = InterpolateRow_SSSE3;
486 } 494 }
(...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after
850 clip_x, clip_y, clip_width, clip_height, 858 clip_x, clip_y, clip_width, clip_height,
851 filtering); 859 filtering);
852 free(argb_buffer); 860 free(argb_buffer);
853 return r; 861 return r;
854 } 862 }
855 863
856 #ifdef __cplusplus 864 #ifdef __cplusplus
857 } // extern "C" 865 } // extern "C"
858 } // namespace libyuv 866 } // namespace libyuv
859 #endif 867 #endif
OLDNEW
« source/row_msa.cc ('K') | « source/row_msa.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698