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

Side by Side Diff: source/convert_argb.cc

Issue 2559693002: Add MSA optimized ARGB Attenuate/RGB565/Shuffle/Shader/Gray/Sepia row functions (Closed)
Patch Set: Created 4 years 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 } 639 }
640 #endif 640 #endif
641 #if defined(HAS_ARGBATTENUATEROW_NEON) 641 #if defined(HAS_ARGBATTENUATEROW_NEON)
642 if (TestCpuFlag(kCpuHasNEON)) { 642 if (TestCpuFlag(kCpuHasNEON)) {
643 ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON; 643 ARGBAttenuateRow = ARGBAttenuateRow_Any_NEON;
644 if (IS_ALIGNED(width, 8)) { 644 if (IS_ALIGNED(width, 8)) {
645 ARGBAttenuateRow = ARGBAttenuateRow_NEON; 645 ARGBAttenuateRow = ARGBAttenuateRow_NEON;
646 } 646 }
647 } 647 }
648 #endif 648 #endif
649 #if defined(HAS_ARGBATTENUATEROW_MSA)
650 if (TestCpuFlag(kCpuHasMSA)) {
651 ARGBAttenuateRow = ARGBAttenuateRow_Any_MSA;
652 if (IS_ALIGNED(width, 8)) {
653 ARGBAttenuateRow = ARGBAttenuateRow_MSA;
654 }
655 }
656 #endif
649 657
650 for (y = 0; y < height; ++y) { 658 for (y = 0; y < height; ++y) {
651 I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants, 659 I422AlphaToARGBRow(src_y, src_u, src_v, src_a, dst_argb, yuvconstants,
652 width); 660 width);
653 if (attenuate) { 661 if (attenuate) {
654 ARGBAttenuateRow(dst_argb, dst_argb, width); 662 ARGBAttenuateRow(dst_argb, dst_argb, width);
655 } 663 }
656 dst_argb += dst_stride_argb; 664 dst_argb += dst_stride_argb;
657 src_a += src_stride_a; 665 src_a += src_stride_a;
658 src_y += src_stride_y; 666 src_y += src_stride_y;
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
1477 src_uyvy += src_stride_uyvy; 1485 src_uyvy += src_stride_uyvy;
1478 dst_argb += dst_stride_argb; 1486 dst_argb += dst_stride_argb;
1479 } 1487 }
1480 return 0; 1488 return 0;
1481 } 1489 }
1482 1490
1483 #ifdef __cplusplus 1491 #ifdef __cplusplus
1484 } // extern "C" 1492 } // extern "C"
1485 } // namespace libyuv 1493 } // namespace libyuv
1486 #endif 1494 #endif
OLDNEW
« no previous file with comments | « include/libyuv/row.h ('k') | source/convert_from.cc » ('j') | source/row_msa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698