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

Side by Side Diff: source/planar_functions.cc

Issue 2397693002: Add MSA optimized YUY2ToI422, YUY2ToI420, UYVYToI422, UYVYToI420 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 462 matching lines...) Expand 10 before | Expand all | Expand 10 after
473 YUY2ToYRow = YUY2ToYRow_Any_NEON; 473 YUY2ToYRow = YUY2ToYRow_Any_NEON;
474 if (width >= 16) { 474 if (width >= 16) {
475 YUY2ToUV422Row = YUY2ToUV422Row_Any_NEON; 475 YUY2ToUV422Row = YUY2ToUV422Row_Any_NEON;
476 } 476 }
477 if (IS_ALIGNED(width, 16)) { 477 if (IS_ALIGNED(width, 16)) {
478 YUY2ToYRow = YUY2ToYRow_NEON; 478 YUY2ToYRow = YUY2ToYRow_NEON;
479 YUY2ToUV422Row = YUY2ToUV422Row_NEON; 479 YUY2ToUV422Row = YUY2ToUV422Row_NEON;
480 } 480 }
481 } 481 }
482 #endif 482 #endif
483 #if defined(HAS_YUY2TOYROW_MSA)
484 if (TestCpuFlag(kCpuHasMSA)) {
485 YUY2ToYRow = YUY2ToYRow_Any_MSA;
486 if (width >= 16) {
fbarchard1 2016/10/05 22:03:58 todo - make Any handle remainder better so this te
manojkumar.bhosale 2016/10/07 10:42:09 Done.
487 YUY2ToUV422Row = YUY2ToUV422Row_Any_MSA;
488 }
489 if (IS_ALIGNED(width, 64)) {
490 YUY2ToYRow = YUY2ToYRow_MSA;
491 YUY2ToUV422Row = YUY2ToUV422Row_MSA;
492 }
493 }
494 #endif
483 495
484 for (y = 0; y < height; ++y) { 496 for (y = 0; y < height; ++y) {
485 YUY2ToUV422Row(src_yuy2, dst_u, dst_v, width); 497 YUY2ToUV422Row(src_yuy2, dst_u, dst_v, width);
486 YUY2ToYRow(src_yuy2, dst_y, width); 498 YUY2ToYRow(src_yuy2, dst_y, width);
487 src_yuy2 += src_stride_yuy2; 499 src_yuy2 += src_stride_yuy2;
488 dst_y += dst_stride_y; 500 dst_y += dst_stride_y;
489 dst_u += dst_stride_u; 501 dst_u += dst_stride_u;
490 dst_v += dst_stride_v; 502 dst_v += dst_stride_v;
491 } 503 }
492 return 0; 504 return 0;
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 UYVYToYRow = UYVYToYRow_Any_NEON; 557 UYVYToYRow = UYVYToYRow_Any_NEON;
546 if (width >= 16) { 558 if (width >= 16) {
547 UYVYToUV422Row = UYVYToUV422Row_Any_NEON; 559 UYVYToUV422Row = UYVYToUV422Row_Any_NEON;
548 } 560 }
549 if (IS_ALIGNED(width, 16)) { 561 if (IS_ALIGNED(width, 16)) {
550 UYVYToYRow = UYVYToYRow_NEON; 562 UYVYToYRow = UYVYToYRow_NEON;
551 UYVYToUV422Row = UYVYToUV422Row_NEON; 563 UYVYToUV422Row = UYVYToUV422Row_NEON;
552 } 564 }
553 } 565 }
554 #endif 566 #endif
567 #if defined(HAS_UYVYTOYROW_MSA)
568 if (TestCpuFlag(kCpuHasMSA)) {
569 UYVYToYRow = UYVYToYRow_Any_MSA;
570 if (width >= 16) {
571 UYVYToUV422Row = UYVYToUV422Row_Any_MSA;
572 }
573 if (IS_ALIGNED(width, 64)) {
574 UYVYToYRow = UYVYToYRow_MSA;
575 UYVYToUV422Row = UYVYToUV422Row_MSA;
576 }
577 }
578 #endif
555 579
556 for (y = 0; y < height; ++y) { 580 for (y = 0; y < height; ++y) {
557 UYVYToUV422Row(src_uyvy, dst_u, dst_v, width); 581 UYVYToUV422Row(src_uyvy, dst_u, dst_v, width);
558 UYVYToYRow(src_uyvy, dst_y, width); 582 UYVYToYRow(src_uyvy, dst_y, width);
559 src_uyvy += src_stride_uyvy; 583 src_uyvy += src_stride_uyvy;
560 dst_y += dst_stride_y; 584 dst_y += dst_stride_y;
561 dst_u += dst_stride_u; 585 dst_u += dst_stride_u;
562 dst_v += dst_stride_v; 586 dst_v += dst_stride_v;
563 } 587 }
564 return 0; 588 return 0;
(...skipping 2306 matching lines...) Expand 10 before | Expand all | Expand 10 after
2871 } 2895 }
2872 free_aligned_buffer_64(rows); 2896 free_aligned_buffer_64(rows);
2873 } 2897 }
2874 return 0; 2898 return 0;
2875 } 2899 }
2876 2900
2877 #ifdef __cplusplus 2901 #ifdef __cplusplus
2878 } // extern "C" 2902 } // extern "C"
2879 } // namespace libyuv 2903 } // namespace libyuv
2880 #endif 2904 #endif
OLDNEW
« no previous file with comments | « source/convert.cc ('k') | source/row_any.cc » ('j') | source/row_msa.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698