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

Side by Side Diff: include/libyuv/scale_row.h

Issue 2527983002: Add MSA optimized ARGB scaling functions (Closed)
Patch Set: Changes as per review comments 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
« no previous file with comments | « CMakeLists.txt ('k') | libyuv.gypi » ('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 2013 The LibYuv Project Authors. All rights reserved. 2 * Copyright 2013 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 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 96
97 // The following are available on Mips platforms: 97 // The following are available on Mips platforms:
98 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \ 98 #if !defined(LIBYUV_DISABLE_MIPS) && !defined(__native_client__) && \
99 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2) 99 defined(__mips__) && defined(__mips_dsp) && (__mips_dsp_rev >= 2)
100 #define HAS_SCALEROWDOWN2_DSPR2 100 #define HAS_SCALEROWDOWN2_DSPR2
101 #define HAS_SCALEROWDOWN4_DSPR2 101 #define HAS_SCALEROWDOWN4_DSPR2
102 #define HAS_SCALEROWDOWN34_DSPR2 102 #define HAS_SCALEROWDOWN34_DSPR2
103 #define HAS_SCALEROWDOWN38_DSPR2 103 #define HAS_SCALEROWDOWN38_DSPR2
104 #endif 104 #endif
105 105
106 #if !defined(LIBYUV_DISABLE_MSA) && defined(__mips_msa)
107 #define HAS_SCALEARGBROWDOWN2_MSA
108 #define HAS_SCALEARGBROWDOWNEVEN_MSA
109 #endif
110
106 // Scale ARGB vertically with bilinear interpolation. 111 // Scale ARGB vertically with bilinear interpolation.
107 void ScalePlaneVertical(int src_height, 112 void ScalePlaneVertical(int src_height,
108 int dst_width, 113 int dst_width,
109 int dst_height, 114 int dst_height,
110 int src_stride, 115 int src_stride,
111 int dst_stride, 116 int dst_stride,
112 const uint8* src_argb, 117 const uint8* src_argb,
113 uint8* dst_argb, 118 uint8* dst_argb,
114 int x, 119 int x,
115 int y, 120 int y,
(...skipping 439 matching lines...) Expand 10 before | Expand all | Expand 10 after
555 uint8* dst, 560 uint8* dst,
556 int dst_width); 561 int dst_width);
557 void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb, 562 void ScaleARGBRowDown2Linear_NEON(const uint8* src_argb,
558 ptrdiff_t src_stride, 563 ptrdiff_t src_stride,
559 uint8* dst_argb, 564 uint8* dst_argb,
560 int dst_width); 565 int dst_width);
561 void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr, 566 void ScaleARGBRowDown2Box_NEON(const uint8* src_ptr,
562 ptrdiff_t src_stride, 567 ptrdiff_t src_stride,
563 uint8* dst, 568 uint8* dst,
564 int dst_width); 569 int dst_width);
570 void ScaleARGBRowDown2_MSA(const uint8_t* src_argb,
571 ptrdiff_t src_stride,
572 uint8_t* dst_argb,
573 int dst_width);
574 void ScaleARGBRowDown2Linear_MSA(const uint8_t* src_argb,
575 ptrdiff_t src_stride,
576 uint8_t* dst_argb,
577 int dst_width);
578 void ScaleARGBRowDown2Box_MSA(const uint8_t* src_argb,
579 ptrdiff_t src_stride,
580 uint8_t* dst_argb,
581 int dst_width);
565 void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb, 582 void ScaleARGBRowDown2_Any_SSE2(const uint8* src_argb,
566 ptrdiff_t src_stride, 583 ptrdiff_t src_stride,
567 uint8* dst_argb, 584 uint8* dst_argb,
568 int dst_width); 585 int dst_width);
569 void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb, 586 void ScaleARGBRowDown2Linear_Any_SSE2(const uint8* src_argb,
570 ptrdiff_t src_stride, 587 ptrdiff_t src_stride,
571 uint8* dst_argb, 588 uint8* dst_argb,
572 int dst_width); 589 int dst_width);
573 void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb, 590 void ScaleARGBRowDown2Box_Any_SSE2(const uint8* src_argb,
574 ptrdiff_t src_stride, 591 ptrdiff_t src_stride,
575 uint8* dst_argb, 592 uint8* dst_argb,
576 int dst_width); 593 int dst_width);
577 void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr, 594 void ScaleARGBRowDown2_Any_NEON(const uint8* src_ptr,
578 ptrdiff_t src_stride, 595 ptrdiff_t src_stride,
579 uint8* dst, 596 uint8* dst,
580 int dst_width); 597 int dst_width);
581 void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb, 598 void ScaleARGBRowDown2Linear_Any_NEON(const uint8* src_argb,
582 ptrdiff_t src_stride, 599 ptrdiff_t src_stride,
583 uint8* dst_argb, 600 uint8* dst_argb,
584 int dst_width); 601 int dst_width);
585 void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr, 602 void ScaleARGBRowDown2Box_Any_NEON(const uint8* src_ptr,
586 ptrdiff_t src_stride, 603 ptrdiff_t src_stride,
587 uint8* dst, 604 uint8* dst,
588 int dst_width); 605 int dst_width);
606 void ScaleARGBRowDown2_Any_MSA(const uint8_t* src_argb,
607 ptrdiff_t src_stride,
608 uint8_t* dst_argb,
609 int dst_width);
610 void ScaleARGBRowDown2Linear_Any_MSA(const uint8_t* src_argb,
611 ptrdiff_t src_stride,
612 uint8_t* dst_argb,
613 int dst_width);
614 void ScaleARGBRowDown2Box_Any_MSA(const uint8_t* src_argb,
615 ptrdiff_t src_stride,
616 uint8_t* dst_argb,
617 int dst_width);
589 618
590 void ScaleARGBRowDownEven_SSE2(const uint8* src_argb, 619 void ScaleARGBRowDownEven_SSE2(const uint8* src_argb,
591 ptrdiff_t src_stride, 620 ptrdiff_t src_stride,
592 int src_stepx, 621 int src_stepx,
593 uint8* dst_argb, 622 uint8* dst_argb,
594 int dst_width); 623 int dst_width);
595 void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb, 624 void ScaleARGBRowDownEvenBox_SSE2(const uint8* src_argb,
596 ptrdiff_t src_stride, 625 ptrdiff_t src_stride,
597 int src_stepx, 626 int src_stepx,
598 uint8* dst_argb, 627 uint8* dst_argb,
599 int dst_width); 628 int dst_width);
600 void ScaleARGBRowDownEven_NEON(const uint8* src_argb, 629 void ScaleARGBRowDownEven_NEON(const uint8* src_argb,
601 ptrdiff_t src_stride, 630 ptrdiff_t src_stride,
602 int src_stepx, 631 int src_stepx,
603 uint8* dst_argb, 632 uint8* dst_argb,
604 int dst_width); 633 int dst_width);
605 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb, 634 void ScaleARGBRowDownEvenBox_NEON(const uint8* src_argb,
606 ptrdiff_t src_stride, 635 ptrdiff_t src_stride,
607 int src_stepx, 636 int src_stepx,
608 uint8* dst_argb, 637 uint8* dst_argb,
609 int dst_width); 638 int dst_width);
639 void ScaleARGBRowDownEven_MSA(const uint8_t* src_argb,
640 ptrdiff_t src_stride,
641 int32_t src_stepx,
642 uint8_t* dst_argb,
643 int dst_width);
644 void ScaleARGBRowDownEvenBox_MSA(const uint8* src_argb,
645 ptrdiff_t src_stride,
646 int src_stepx,
647 uint8* dst_argb,
648 int dst_width);
610 void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb, 649 void ScaleARGBRowDownEven_Any_SSE2(const uint8* src_argb,
611 ptrdiff_t src_stride, 650 ptrdiff_t src_stride,
612 int src_stepx, 651 int src_stepx,
613 uint8* dst_argb, 652 uint8* dst_argb,
614 int dst_width); 653 int dst_width);
615 void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb, 654 void ScaleARGBRowDownEvenBox_Any_SSE2(const uint8* src_argb,
616 ptrdiff_t src_stride, 655 ptrdiff_t src_stride,
617 int src_stepx, 656 int src_stepx,
618 uint8* dst_argb, 657 uint8* dst_argb,
619 int dst_width); 658 int dst_width);
620 void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb, 659 void ScaleARGBRowDownEven_Any_NEON(const uint8* src_argb,
621 ptrdiff_t src_stride, 660 ptrdiff_t src_stride,
622 int src_stepx, 661 int src_stepx,
623 uint8* dst_argb, 662 uint8* dst_argb,
624 int dst_width); 663 int dst_width);
625 void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb, 664 void ScaleARGBRowDownEvenBox_Any_NEON(const uint8* src_argb,
626 ptrdiff_t src_stride, 665 ptrdiff_t src_stride,
627 int src_stepx, 666 int src_stepx,
628 uint8* dst_argb, 667 uint8* dst_argb,
629 int dst_width); 668 int dst_width);
669 void ScaleARGBRowDownEven_Any_MSA(const uint8_t* src_argb,
670 ptrdiff_t src_stride,
671 int32_t src_stepx,
672 uint8_t* dst_argb,
673 int dst_width);
674 void ScaleARGBRowDownEvenBox_Any_MSA(const uint8* src_argb,
675 ptrdiff_t src_stride,
676 int src_stepx,
677 uint8* dst_argb,
678 int dst_width);
630 679
631 // ScaleRowDown2Box also used by planar functions 680 // ScaleRowDown2Box also used by planar functions
632 // NEON downscalers with interpolation. 681 // NEON downscalers with interpolation.
633 682
634 // Note - not static due to reuse in convert for 444 to 420. 683 // Note - not static due to reuse in convert for 444 to 420.
635 void ScaleRowDown2_NEON(const uint8* src_ptr, 684 void ScaleRowDown2_NEON(const uint8* src_ptr,
636 ptrdiff_t src_stride, 685 ptrdiff_t src_stride,
637 uint8* dst, 686 uint8* dst,
638 int dst_width); 687 int dst_width);
639 void ScaleRowDown2Linear_NEON(const uint8* src_ptr, 688 void ScaleRowDown2Linear_NEON(const uint8* src_ptr,
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
793 ptrdiff_t src_stride, 842 ptrdiff_t src_stride,
794 uint8* dst_ptr, 843 uint8* dst_ptr,
795 int dst_width); 844 int dst_width);
796 845
797 #ifdef __cplusplus 846 #ifdef __cplusplus
798 } // extern "C" 847 } // extern "C"
799 } // namespace libyuv 848 } // namespace libyuv
800 #endif 849 #endif
801 850
802 #endif // INCLUDE_LIBYUV_SCALE_ROW_H_ 851 #endif // INCLUDE_LIBYUV_SCALE_ROW_H_
OLDNEW
« no previous file with comments | « CMakeLists.txt ('k') | libyuv.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698