OLD | NEW |
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 602 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
613 // TODO(fbarchard): Implement any versions for odd width. | 613 // TODO(fbarchard): Implement any versions for odd width. |
614 // BlendPlaneRow = BlendPlaneRow_Any_SSSE3; | 614 // BlendPlaneRow = BlendPlaneRow_Any_SSSE3; |
615 if (IS_ALIGNED(width, 8)) { | 615 if (IS_ALIGNED(width, 8)) { |
616 BlendPlaneRow = BlendPlaneRow_SSSE3; | 616 BlendPlaneRow = BlendPlaneRow_SSSE3; |
617 } | 617 } |
618 } | 618 } |
619 #endif | 619 #endif |
620 #if defined(HAS_BLENDPLANEROW_AVX2) | 620 #if defined(HAS_BLENDPLANEROW_AVX2) |
621 if (TestCpuFlag(kCpuHasAVX2)) { | 621 if (TestCpuFlag(kCpuHasAVX2)) { |
622 // BlendPlaneRow = BlendPlaneRow_Any_AVX2; | 622 // BlendPlaneRow = BlendPlaneRow_Any_AVX2; |
623 if (IS_ALIGNED(width, 16)) { | 623 if (IS_ALIGNED(width, 32)) { |
624 BlendPlaneRow = BlendPlaneRow_AVX2; | 624 BlendPlaneRow = BlendPlaneRow_AVX2; |
625 } | 625 } |
626 } | 626 } |
627 #endif | 627 #endif |
628 | 628 |
629 for (y = 0; y < height; ++y) { | 629 for (y = 0; y < height; ++y) { |
630 BlendPlaneRow(src_y0, src_y1, alpha, dst_y, width); | 630 BlendPlaneRow(src_y0, src_y1, alpha, dst_y, width); |
631 src_y0 += src_stride_y0; | 631 src_y0 += src_stride_y0; |
632 src_y1 += src_stride_y1; | 632 src_y1 += src_stride_y1; |
633 alpha += alpha_stride; | 633 alpha += alpha_stride; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
681 // TODO(fbarchard): Implement any versions for odd width. | 681 // TODO(fbarchard): Implement any versions for odd width. |
682 // BlendPlaneRow = BlendPlaneRow_Any_SSSE3; | 682 // BlendPlaneRow = BlendPlaneRow_Any_SSSE3; |
683 if (IS_ALIGNED(halfwidth, 8)) { | 683 if (IS_ALIGNED(halfwidth, 8)) { |
684 BlendPlaneRow = BlendPlaneRow_SSSE3; | 684 BlendPlaneRow = BlendPlaneRow_SSSE3; |
685 } | 685 } |
686 } | 686 } |
687 #endif | 687 #endif |
688 #if defined(HAS_BLENDPLANEROW_AVX2) | 688 #if defined(HAS_BLENDPLANEROW_AVX2) |
689 if (TestCpuFlag(kCpuHasAVX2)) { | 689 if (TestCpuFlag(kCpuHasAVX2)) { |
690 // BlendPlaneRow = BlendPlaneRow_Any_AVX2; | 690 // BlendPlaneRow = BlendPlaneRow_Any_AVX2; |
691 if (IS_ALIGNED(halfwidth, 16)) { | 691 if (IS_ALIGNED(halfwidth, 32)) { |
692 BlendPlaneRow = BlendPlaneRow_AVX2; | 692 BlendPlaneRow = BlendPlaneRow_AVX2; |
693 } | 693 } |
694 } | 694 } |
695 #endif | 695 #endif |
696 #if defined(HAS_SCALEROWDOWN2_NEON) | 696 #if defined(HAS_SCALEROWDOWN2_NEON) |
697 if (TestCpuFlag(kCpuHasNEON)) { | 697 if (TestCpuFlag(kCpuHasNEON)) { |
698 ScaleRowDown2 = ScaleRowDown2Box_Any_NEON; | 698 ScaleRowDown2 = ScaleRowDown2Box_Any_NEON; |
699 if (IS_ALIGNED(halfwidth, 16)) { | 699 if (IS_ALIGNED(halfwidth, 16)) { |
700 ScaleRowDown2 = ScaleRowDown2Box_NEON; | 700 ScaleRowDown2 = ScaleRowDown2Box_NEON; |
701 } | 701 } |
(...skipping 1925 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2627 } | 2627 } |
2628 free_aligned_buffer_64(rows); | 2628 free_aligned_buffer_64(rows); |
2629 } | 2629 } |
2630 return 0; | 2630 return 0; |
2631 } | 2631 } |
2632 | 2632 |
2633 #ifdef __cplusplus | 2633 #ifdef __cplusplus |
2634 } // extern "C" | 2634 } // extern "C" |
2635 } // namespace libyuv | 2635 } // namespace libyuv |
2636 #endif | 2636 #endif |
OLD | NEW |