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

Side by Side Diff: source/planar_functions.cc

Issue 2397693002: Add MSA optimized YUY2ToI422, YUY2ToI420, UYVYToI422, UYVYToI420 functions (Closed)
Patch Set: Updates as per review comments 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
« no previous file with comments | « source/convert.cc ('k') | source/row_any.cc » ('j') | 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after
475 #if defined(HAS_YUY2TOYROW_NEON) 475 #if defined(HAS_YUY2TOYROW_NEON)
476 if (TestCpuFlag(kCpuHasNEON)) { 476 if (TestCpuFlag(kCpuHasNEON)) {
477 YUY2ToYRow = YUY2ToYRow_Any_NEON; 477 YUY2ToYRow = YUY2ToYRow_Any_NEON;
478 YUY2ToUV422Row = YUY2ToUV422Row_Any_NEON; 478 YUY2ToUV422Row = YUY2ToUV422Row_Any_NEON;
479 if (IS_ALIGNED(width, 16)) { 479 if (IS_ALIGNED(width, 16)) {
480 YUY2ToYRow = YUY2ToYRow_NEON; 480 YUY2ToYRow = YUY2ToYRow_NEON;
481 YUY2ToUV422Row = YUY2ToUV422Row_NEON; 481 YUY2ToUV422Row = YUY2ToUV422Row_NEON;
482 } 482 }
483 } 483 }
484 #endif 484 #endif
485 #if defined(HAS_YUY2TOYROW_MSA)
486 if (TestCpuFlag(kCpuHasMSA)) {
487 YUY2ToYRow = YUY2ToYRow_Any_MSA;
488 YUY2ToUV422Row = YUY2ToUV422Row_Any_MSA;
489 if (IS_ALIGNED(width, 32)) {
490 YUY2ToYRow = YUY2ToYRow_MSA;
491 YUY2ToUV422Row = YUY2ToUV422Row_MSA;
492 }
493 }
494 #endif
485 495
486 for (y = 0; y < height; ++y) { 496 for (y = 0; y < height; ++y) {
487 YUY2ToUV422Row(src_yuy2, dst_u, dst_v, width); 497 YUY2ToUV422Row(src_yuy2, dst_u, dst_v, width);
488 YUY2ToYRow(src_yuy2, dst_y, width); 498 YUY2ToYRow(src_yuy2, dst_y, width);
489 src_yuy2 += src_stride_yuy2; 499 src_yuy2 += src_stride_yuy2;
490 dst_y += dst_stride_y; 500 dst_y += dst_stride_y;
491 dst_u += dst_stride_u; 501 dst_u += dst_stride_u;
492 dst_v += dst_stride_v; 502 dst_v += dst_stride_v;
493 } 503 }
494 return 0; 504 return 0;
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
549 #if defined(HAS_UYVYTOYROW_NEON) 559 #if defined(HAS_UYVYTOYROW_NEON)
550 if (TestCpuFlag(kCpuHasNEON)) { 560 if (TestCpuFlag(kCpuHasNEON)) {
551 UYVYToYRow = UYVYToYRow_Any_NEON; 561 UYVYToYRow = UYVYToYRow_Any_NEON;
552 UYVYToUV422Row = UYVYToUV422Row_Any_NEON; 562 UYVYToUV422Row = UYVYToUV422Row_Any_NEON;
553 if (IS_ALIGNED(width, 16)) { 563 if (IS_ALIGNED(width, 16)) {
554 UYVYToYRow = UYVYToYRow_NEON; 564 UYVYToYRow = UYVYToYRow_NEON;
555 UYVYToUV422Row = UYVYToUV422Row_NEON; 565 UYVYToUV422Row = UYVYToUV422Row_NEON;
556 } 566 }
557 } 567 }
558 #endif 568 #endif
569 #if defined(HAS_UYVYTOYROW_MSA)
570 if (TestCpuFlag(kCpuHasMSA)) {
571 UYVYToYRow = UYVYToYRow_Any_MSA;
572 UYVYToUV422Row = UYVYToUV422Row_Any_MSA;
573 if (IS_ALIGNED(width, 32)) {
574 UYVYToYRow = UYVYToYRow_MSA;
575 UYVYToUV422Row = UYVYToUV422Row_MSA;
576 }
577 }
578 #endif
559 579
560 for (y = 0; y < height; ++y) { 580 for (y = 0; y < height; ++y) {
561 UYVYToUV422Row(src_uyvy, dst_u, dst_v, width); 581 UYVYToUV422Row(src_uyvy, dst_u, dst_v, width);
562 UYVYToYRow(src_uyvy, dst_y, width); 582 UYVYToYRow(src_uyvy, dst_y, width);
563 src_uyvy += src_stride_uyvy; 583 src_uyvy += src_stride_uyvy;
564 dst_y += dst_stride_y; 584 dst_y += dst_stride_y;
565 dst_u += dst_stride_u; 585 dst_u += dst_stride_u;
566 dst_v += dst_stride_v; 586 dst_v += dst_stride_v;
567 } 587 }
568 return 0; 588 return 0;
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2875 } 2895 }
2876 free_aligned_buffer_64(rows); 2896 free_aligned_buffer_64(rows);
2877 } 2897 }
2878 return 0; 2898 return 0;
2879 } 2899 }
2880 2900
2881 #ifdef __cplusplus 2901 #ifdef __cplusplus
2882 } // extern "C" 2902 } // extern "C"
2883 } // namespace libyuv 2903 } // namespace libyuv
2884 #endif 2904 #endif
OLDNEW
« no previous file with comments | « source/convert.cc ('k') | source/row_any.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698