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

Side by Side Diff: source/convert_from.cc

Issue 2445343007: Add MSA optimized I422ToRGB565Row_MSA, I422ToARGB4444Row_MSA and I422ToARGB1555Row_MSA functions (Closed)
Patch Set: 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
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 639 matching lines...) Expand 10 before | Expand all | Expand 10 after
650 } 650 }
651 #endif 651 #endif
652 #if defined(HAS_I422TOARGB1555ROW_NEON) 652 #if defined(HAS_I422TOARGB1555ROW_NEON)
653 if (TestCpuFlag(kCpuHasNEON)) { 653 if (TestCpuFlag(kCpuHasNEON)) {
654 I422ToARGB1555Row = I422ToARGB1555Row_Any_NEON; 654 I422ToARGB1555Row = I422ToARGB1555Row_Any_NEON;
655 if (IS_ALIGNED(width, 8)) { 655 if (IS_ALIGNED(width, 8)) {
656 I422ToARGB1555Row = I422ToARGB1555Row_NEON; 656 I422ToARGB1555Row = I422ToARGB1555Row_NEON;
657 } 657 }
658 } 658 }
659 #endif 659 #endif
660 #if defined(HAS_I422TOARGB1555ROW_MSA)
661 if (TestCpuFlag(kCpuHasMSA)) {
662 I422ToARGB1555Row = I422ToARGB1555Row_Any_MSA;
663 if (IS_ALIGNED(width, 8)) {
664 I422ToARGB1555Row = I422ToARGB1555Row_MSA;
665 }
666 }
667 #endif
660 668
661 for (y = 0; y < height; ++y) { 669 for (y = 0; y < height; ++y) {
662 I422ToARGB1555Row(src_y, src_u, src_v, dst_argb1555, &kYuvI601Constants, 670 I422ToARGB1555Row(src_y, src_u, src_v, dst_argb1555, &kYuvI601Constants,
663 width); 671 width);
664 dst_argb1555 += dst_stride_argb1555; 672 dst_argb1555 += dst_stride_argb1555;
665 src_y += src_stride_y; 673 src_y += src_stride_y;
666 if (y & 1) { 674 if (y & 1) {
667 src_u += src_stride_u; 675 src_u += src_stride_u;
668 src_v += src_stride_v; 676 src_v += src_stride_v;
669 } 677 }
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
713 } 721 }
714 #endif 722 #endif
715 #if defined(HAS_I422TOARGB4444ROW_NEON) 723 #if defined(HAS_I422TOARGB4444ROW_NEON)
716 if (TestCpuFlag(kCpuHasNEON)) { 724 if (TestCpuFlag(kCpuHasNEON)) {
717 I422ToARGB4444Row = I422ToARGB4444Row_Any_NEON; 725 I422ToARGB4444Row = I422ToARGB4444Row_Any_NEON;
718 if (IS_ALIGNED(width, 8)) { 726 if (IS_ALIGNED(width, 8)) {
719 I422ToARGB4444Row = I422ToARGB4444Row_NEON; 727 I422ToARGB4444Row = I422ToARGB4444Row_NEON;
720 } 728 }
721 } 729 }
722 #endif 730 #endif
731 #if defined(HAS_I422TOARGB4444ROW_MSA)
732 if (TestCpuFlag(kCpuHasMSA)) {
733 I422ToARGB4444Row = I422ToARGB4444Row_Any_MSA;
734 if (IS_ALIGNED(width, 8)) {
735 I422ToARGB4444Row = I422ToARGB4444Row_MSA;
736 }
737 }
738 #endif
723 739
724 for (y = 0; y < height; ++y) { 740 for (y = 0; y < height; ++y) {
725 I422ToARGB4444Row(src_y, src_u, src_v, dst_argb4444, &kYuvI601Constants, 741 I422ToARGB4444Row(src_y, src_u, src_v, dst_argb4444, &kYuvI601Constants,
726 width); 742 width);
727 dst_argb4444 += dst_stride_argb4444; 743 dst_argb4444 += dst_stride_argb4444;
728 src_y += src_stride_y; 744 src_y += src_stride_y;
729 if (y & 1) { 745 if (y & 1) {
730 src_u += src_stride_u; 746 src_u += src_stride_u;
731 src_v += src_stride_v; 747 src_v += src_stride_v;
732 } 748 }
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after
775 } 791 }
776 #endif 792 #endif
777 #if defined(HAS_I422TORGB565ROW_NEON) 793 #if defined(HAS_I422TORGB565ROW_NEON)
778 if (TestCpuFlag(kCpuHasNEON)) { 794 if (TestCpuFlag(kCpuHasNEON)) {
779 I422ToRGB565Row = I422ToRGB565Row_Any_NEON; 795 I422ToRGB565Row = I422ToRGB565Row_Any_NEON;
780 if (IS_ALIGNED(width, 8)) { 796 if (IS_ALIGNED(width, 8)) {
781 I422ToRGB565Row = I422ToRGB565Row_NEON; 797 I422ToRGB565Row = I422ToRGB565Row_NEON;
782 } 798 }
783 } 799 }
784 #endif 800 #endif
801 #if defined(HAS_I422TORGB565ROW_MSA)
802 if (TestCpuFlag(kCpuHasMSA)) {
803 I422ToRGB565Row = I422ToRGB565Row_Any_MSA;
804 if (IS_ALIGNED(width, 8)) {
805 I422ToRGB565Row = I422ToRGB565Row_MSA;
806 }
807 }
808 #endif
785 809
786 for (y = 0; y < height; ++y) { 810 for (y = 0; y < height; ++y) {
787 I422ToRGB565Row(src_y, src_u, src_v, dst_rgb565, &kYuvI601Constants, width); 811 I422ToRGB565Row(src_y, src_u, src_v, dst_rgb565, &kYuvI601Constants, width);
788 dst_rgb565 += dst_stride_rgb565; 812 dst_rgb565 += dst_stride_rgb565;
789 src_y += src_stride_y; 813 src_y += src_stride_y;
790 if (y & 1) { 814 if (y & 1) {
791 src_u += src_stride_u; 815 src_u += src_stride_u;
792 src_v += src_stride_v; 816 src_v += src_stride_v;
793 } 817 }
794 } 818 }
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
1119 default: 1143 default:
1120 return -1; // unknown fourcc - return failure code. 1144 return -1; // unknown fourcc - return failure code.
1121 } 1145 }
1122 return r; 1146 return r;
1123 } 1147 }
1124 1148
1125 #ifdef __cplusplus 1149 #ifdef __cplusplus
1126 } // extern "C" 1150 } // extern "C"
1127 } // namespace libyuv 1151 } // namespace libyuv
1128 #endif 1152 #endif
OLDNEW
« no previous file with comments | « include/libyuv/row.h ('k') | source/row_any.cc » ('j') | source/row_msa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698