History

aarch64: hevc: Produce epel_uni_hv functions for both neon and i8mm

AWS Graviton 3: put_hevc_epel_uni_hv4_8_c: 163.5 put_hevc_epel_uni_hv4_8_neon: 59.7 put_hevc_epel_uni_hv4_8_i8mm: 57.5 put_hevc_epel_uni_hv6_8_c: 344.7 put_hevc_epel_uni_hv6_8_neon: 105.0 put_hevc_epel_uni_hv6_8_i8mm: 102.7 put_hevc_epel_uni_hv8_8_c: 552.2 put_hevc_epel_uni_hv8_8_neon: 111.2 put_hevc_epel_uni_hv8_8_i8mm: 104.0 put_hevc_epel_uni_hv12_8_c: 1195.0 put_hevc_epel_uni_hv12_8_neon: 248.7 put_hevc_epel_uni_hv12_8_i8mm: 229.5 put_hevc_epel_uni_hv16_8_c: 1910.2 put_hevc_epel_uni_hv16_8_neon: 339.5 put_hevc_epel_uni_hv16_8_i8mm: 323.2 put_hevc_epel_uni_hv24_8_c: 4048.2 put_hevc_epel_uni_hv24_8_neon: 737.7 put_hevc_epel_uni_hv24_8_i8mm: 713.7 put_hevc_epel_uni_hv32_8_c: 6865.7 put_hevc_epel_uni_hv32_8_neon: 1285.0 put_hevc_epel_uni_hv32_8_i8mm: 1206.0 put_hevc_epel_uni_hv48_8_c: 15830.5 put_hevc_epel_uni_hv48_8_neon: 2844.7 put_hevc_epel_uni_hv48_8_i8mm: 2914.0 put_hevc_epel_uni_hv64_8_c: 27912.7 put_hevc_epel_uni_hv64_8_neon: 4970.5 put_hevc_epel_uni_hv64_8_i8mm: 4653.7

Martin Storsjö committed 2 years ago

Commit d7294191 parent 7bf3d142 files · +38 −34Browse files

Unified · Split

2 files
  1. libavcodec/aarch64/hevcdsp_epel_neon.S +33 −34
  2. libavcodec/aarch64/hevcdsp_init_aarch64.c +5 −0
libavcodec/aarch64/hevcdsp_epel_neon.S+33−34
@@ -2460,14 +2460,6 @@ endfunc · 2459 unmodified lines
2460 2460
2461epel_hv neon2461epel_hv neon
2462 2462
2463#if HAVE_I8MM
2464ENABLE_I8MM
2465
2466epel_hv neon_i8mm
2467
2468DISABLE_I8MM
2469#endif
2470
2471function hevc_put_hevc_epel_uni_hv4_8_end_neon2463function hevc_put_hevc_epel_uni_hv4_8_end_neon
2472 load_epel_filterh x6, x52464 load_epel_filterh x6, x5
2473 mov x10, #(MAX_PB_SIZE * 2)2465 mov x10, #(MAX_PB_SIZE * 2)
@@ -2596,10 +2588,8 @@ function hevc_put_hevc_epel_uni_hv24_8_end_neon · 122 unmodified lines
25962: ret25882: ret
2597endfunc2589endfunc
2598 2590
2599#if HAVE_I8MM2591.macro epel_uni_hv suffix
2600ENABLE_I8MM2592function ff_hevc_put_hevc_epel_uni_hv4_8_\suffix, export=1
2601
2602function ff_hevc_put_hevc_epel_uni_hv4_8_neon_i8mm, export=1
2603 add w10, w4, #32593 add w10, w4, #3
2604 lsl x10, x10, #72594 lsl x10, x10, #7
2605 sub sp, sp, x10 // tmp_array2595 sub sp, sp, x10 // tmp_array
@@ -2611,14 +2601,14 @@ function ff_hevc_put_hevc_epel_uni_hv4_8_neon_i8mm, export=1 · 5 unmodified lines
2611 mov x2, x32601 mov x2, x3
2612 add w3, w4, #32602 add w3, w4, #3
2613 mov x4, x52603 mov x4, x5
2614 bl X(ff_hevc_put_hevc_epel_h4_8_neon_i8mm)2604 bl X(ff_hevc_put_hevc_epel_h4_8_\suffix)
2615 ldp x4, x6, [sp, #16]2605 ldp x4, x6, [sp, #16]
2616 ldp x0, x1, [sp, #32]2606 ldp x0, x1, [sp, #32]
2617 ldr x30, [sp], #482607 ldr x30, [sp], #48
2618 b hevc_put_hevc_epel_uni_hv4_8_end_neon2608 b hevc_put_hevc_epel_uni_hv4_8_end_neon
2619endfunc2609endfunc
2620 2610
2621function ff_hevc_put_hevc_epel_uni_hv6_8_neon_i8mm, export=12611function ff_hevc_put_hevc_epel_uni_hv6_8_\suffix, export=1
2622 add w10, w4, #32612 add w10, w4, #3
2623 lsl x10, x10, #72613 lsl x10, x10, #7
2624 sub sp, sp, x10 // tmp_array2614 sub sp, sp, x10 // tmp_array
@@ -2630,14 +2620,14 @@ function ff_hevc_put_hevc_epel_uni_hv6_8_neon_i8mm, export=1 · 5 unmodified lines
2630 mov x2, x32620 mov x2, x3
2631 add w3, w4, #32621 add w3, w4, #3
2632 mov x4, x52622 mov x4, x5
2633 bl X(ff_hevc_put_hevc_epel_h6_8_neon_i8mm)2623 bl X(ff_hevc_put_hevc_epel_h6_8_\suffix)
2634 ldp x4, x6, [sp, #16]2624 ldp x4, x6, [sp, #16]
2635 ldp x0, x1, [sp, #32]2625 ldp x0, x1, [sp, #32]
2636 ldr x30, [sp], #482626 ldr x30, [sp], #48
2637 b hevc_put_hevc_epel_uni_hv6_8_end_neon2627 b hevc_put_hevc_epel_uni_hv6_8_end_neon
2638endfunc2628endfunc
2639 2629
2640function ff_hevc_put_hevc_epel_uni_hv8_8_neon_i8mm, export=12630function ff_hevc_put_hevc_epel_uni_hv8_8_\suffix, export=1
2641 add w10, w4, #32631 add w10, w4, #3
2642 lsl x10, x10, #72632 lsl x10, x10, #7
2643 sub sp, sp, x10 // tmp_array2633 sub sp, sp, x10 // tmp_array
@@ -2649,14 +2639,14 @@ function ff_hevc_put_hevc_epel_uni_hv8_8_neon_i8mm, export=1 · 5 unmodified lines
2649 mov x2, x32639 mov x2, x3
2650 add w3, w4, #32640 add w3, w4, #3
2651 mov x4, x52641 mov x4, x5
2652 bl X(ff_hevc_put_hevc_epel_h8_8_neon_i8mm)2642 bl X(ff_hevc_put_hevc_epel_h8_8_\suffix)
2653 ldp x4, x6, [sp, #16]2643 ldp x4, x6, [sp, #16]
2654 ldp x0, x1, [sp, #32]2644 ldp x0, x1, [sp, #32]
2655 ldr x30, [sp], #482645 ldr x30, [sp], #48
2656 b hevc_put_hevc_epel_uni_hv8_8_end_neon2646 b hevc_put_hevc_epel_uni_hv8_8_end_neon
2657endfunc2647endfunc
2658 2648
2659function ff_hevc_put_hevc_epel_uni_hv12_8_neon_i8mm, export=12649function ff_hevc_put_hevc_epel_uni_hv12_8_\suffix, export=1
2660 add w10, w4, #32650 add w10, w4, #3
2661 lsl x10, x10, #72651 lsl x10, x10, #7
2662 sub sp, sp, x10 // tmp_array2652 sub sp, sp, x10 // tmp_array
@@ -2668,14 +2658,14 @@ function ff_hevc_put_hevc_epel_uni_hv12_8_neon_i8mm, export=1 · 5 unmodified lines
2668 mov x2, x32658 mov x2, x3
2669 add w3, w4, #32659 add w3, w4, #3
2670 mov x4, x52660 mov x4, x5
2671 bl X(ff_hevc_put_hevc_epel_h12_8_neon_i8mm)2661 bl X(ff_hevc_put_hevc_epel_h12_8_\suffix)
2672 ldp x4, x6, [sp, #16]2662 ldp x4, x6, [sp, #16]
2673 ldp x0, x1, [sp, #32]2663 ldp x0, x1, [sp, #32]
2674 ldr x30, [sp], #482664 ldr x30, [sp], #48
2675 b hevc_put_hevc_epel_uni_hv12_8_end_neon2665 b hevc_put_hevc_epel_uni_hv12_8_end_neon
2676endfunc2666endfunc
2677 2667
2678function ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm, export=12668function ff_hevc_put_hevc_epel_uni_hv16_8_\suffix, export=1
2679 add w10, w4, #32669 add w10, w4, #3
2680 lsl x10, x10, #72670 lsl x10, x10, #7
2681 sub sp, sp, x10 // tmp_array2671 sub sp, sp, x10 // tmp_array
@@ -2687,14 +2677,14 @@ function ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm, export=1 · 5 unmodified lines
2687 mov x2, x32677 mov x2, x3
2688 add w3, w4, #32678 add w3, w4, #3
2689 mov x4, x52679 mov x4, x5
2690 bl X(ff_hevc_put_hevc_epel_h16_8_neon_i8mm)2680 bl X(ff_hevc_put_hevc_epel_h16_8_\suffix)
2691 ldp x4, x6, [sp, #16]2681 ldp x4, x6, [sp, #16]
2692 ldp x0, x1, [sp, #32]2682 ldp x0, x1, [sp, #32]
2693 ldr x30, [sp], #482683 ldr x30, [sp], #48
2694 b hevc_put_hevc_epel_uni_hv16_8_end_neon2684 b hevc_put_hevc_epel_uni_hv16_8_end_neon
2695endfunc2685endfunc
2696 2686
2697function ff_hevc_put_hevc_epel_uni_hv24_8_neon_i8mm, export=12687function ff_hevc_put_hevc_epel_uni_hv24_8_\suffix, export=1
2698 add w10, w4, #32688 add w10, w4, #3
2699 lsl x10, x10, #72689 lsl x10, x10, #7
2700 sub sp, sp, x10 // tmp_array2690 sub sp, sp, x10 // tmp_array
@@ -2706,20 +2696,20 @@ function ff_hevc_put_hevc_epel_uni_hv24_8_neon_i8mm, export=1 · 5 unmodified lines
2706 mov x2, x32696 mov x2, x3
2707 add w3, w4, #32697 add w3, w4, #3
2708 mov x4, x52698 mov x4, x5
2709 bl X(ff_hevc_put_hevc_epel_h24_8_neon_i8mm)2699 bl X(ff_hevc_put_hevc_epel_h24_8_\suffix)
2710 ldp x4, x6, [sp, #16]2700 ldp x4, x6, [sp, #16]
2711 ldp x0, x1, [sp, #32]2701 ldp x0, x1, [sp, #32]
2712 ldr x30, [sp], #482702 ldr x30, [sp], #48
2713 b hevc_put_hevc_epel_uni_hv24_8_end_neon2703 b hevc_put_hevc_epel_uni_hv24_8_end_neon
2714endfunc2704endfunc
2715 2705
2716function ff_hevc_put_hevc_epel_uni_hv32_8_neon_i8mm, export=12706function ff_hevc_put_hevc_epel_uni_hv32_8_\suffix, export=1
2717 stp x5, x6, [sp, #-64]!2707 stp x5, x6, [sp, #-64]!
2718 stp x3, x4, [sp, #16]2708 stp x3, x4, [sp, #16]
2719 stp x1, x2, [sp, #32]2709 stp x1, x2, [sp, #32]
2720 stp x0, x30, [sp, #48]2710 stp x0, x30, [sp, #48]
2721 mov x7, #162711 mov x7, #16
2722 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2712 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2723 ldp x5, x6, [sp]2713 ldp x5, x6, [sp]
2724 ldp x3, x4, [sp, #16]2714 ldp x3, x4, [sp, #16]
2725 ldp x1, x2, [sp, #32]2715 ldp x1, x2, [sp, #32]
@@ -2727,19 +2717,19 @@ function ff_hevc_put_hevc_epel_uni_hv32_8_neon_i8mm, export=1 · 1 unmodified line
2727 add x0, x0, #162717 add x0, x0, #16
2728 add x2, x2, #162718 add x2, x2, #16
2729 mov x7, #162719 mov x7, #16
2730 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2720 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2731 ldr x30, [sp, #56]2721 ldr x30, [sp, #56]
2732 add sp, sp, #642722 add sp, sp, #64
2733 ret2723 ret
2734endfunc2724endfunc
2735 2725
2736function ff_hevc_put_hevc_epel_uni_hv48_8_neon_i8mm, export=12726function ff_hevc_put_hevc_epel_uni_hv48_8_\suffix, export=1
2737 stp x5, x6, [sp, #-64]!2727 stp x5, x6, [sp, #-64]!
2738 stp x3, x4, [sp, #16]2728 stp x3, x4, [sp, #16]
2739 stp x1, x2, [sp, #32]2729 stp x1, x2, [sp, #32]
2740 stp x0, x30, [sp, #48]2730 stp x0, x30, [sp, #48]
2741 mov x7, #242731 mov x7, #24
2742 bl X(ff_hevc_put_hevc_epel_uni_hv24_8_neon_i8mm)2732 bl X(ff_hevc_put_hevc_epel_uni_hv24_8_\suffix)
2743 ldp x5, x6, [sp]2733 ldp x5, x6, [sp]
2744 ldp x3, x4, [sp, #16]2734 ldp x3, x4, [sp, #16]
2745 ldp x1, x2, [sp, #32]2735 ldp x1, x2, [sp, #32]
@@ -2747,19 +2737,19 @@ function ff_hevc_put_hevc_epel_uni_hv48_8_neon_i8mm, export=1 · 1 unmodified line
2747 add x0, x0, #242737 add x0, x0, #24
2748 add x2, x2, #242738 add x2, x2, #24
2749 mov x7, #242739 mov x7, #24
2750 bl X(ff_hevc_put_hevc_epel_uni_hv24_8_neon_i8mm)2740 bl X(ff_hevc_put_hevc_epel_uni_hv24_8_\suffix)
2751 ldr x30, [sp, #56]2741 ldr x30, [sp, #56]
2752 add sp, sp, #642742 add sp, sp, #64
2753 ret2743 ret
2754endfunc2744endfunc
2755 2745
2756function ff_hevc_put_hevc_epel_uni_hv64_8_neon_i8mm, export=12746function ff_hevc_put_hevc_epel_uni_hv64_8_\suffix, export=1
2757 stp x5, x6, [sp, #-64]!2747 stp x5, x6, [sp, #-64]!
2758 stp x3, x4, [sp, #16]2748 stp x3, x4, [sp, #16]
2759 stp x1, x2, [sp, #32]2749 stp x1, x2, [sp, #32]
2760 stp x0, x30, [sp, #48]2750 stp x0, x30, [sp, #48]
2761 mov x7, #162751 mov x7, #16
2762 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2752 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2763 ldp x5, x6, [sp]2753 ldp x5, x6, [sp]
2764 ldp x3, x4, [sp, #16]2754 ldp x3, x4, [sp, #16]
2765 ldp x1, x2, [sp, #32]2755 ldp x1, x2, [sp, #32]
@@ -2767,7 +2757,7 @@ function ff_hevc_put_hevc_epel_uni_hv64_8_neon_i8mm, export=1 · 1 unmodified line
2767 add x0, x0, #162757 add x0, x0, #16
2768 add x2, x2, #162758 add x2, x2, #16
2769 mov x7, #162759 mov x7, #16
2770 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2760 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2771 ldp x5, x6, [sp]2761 ldp x5, x6, [sp]
2772 ldp x3, x4, [sp, #16]2762 ldp x3, x4, [sp, #16]
2773 ldp x1, x2, [sp, #32]2763 ldp x1, x2, [sp, #32]
@@ -2775,7 +2765,7 @@ function ff_hevc_put_hevc_epel_uni_hv64_8_neon_i8mm, export=1 · 1 unmodified line
2775 add x0, x0, #322765 add x0, x0, #32
2776 add x2, x2, #322766 add x2, x2, #32
2777 mov x7, #162767 mov x7, #16
2778 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2768 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2779 ldp x5, x6, [sp]2769 ldp x5, x6, [sp]
2780 ldp x3, x4, [sp, #16]2770 ldp x3, x4, [sp, #16]
2781 ldp x1, x2, [sp, #32]2771 ldp x1, x2, [sp, #32]
@@ -2783,12 +2773,21 @@ function ff_hevc_put_hevc_epel_uni_hv64_8_neon_i8mm, export=1 · 1 unmodified line
2783 add x0, x0, #482773 add x0, x0, #48
2784 add x2, x2, #482774 add x2, x2, #48
2785 mov x7, #162775 mov x7, #16
2786 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm)2776 bl X(ff_hevc_put_hevc_epel_uni_hv16_8_\suffix)
2787 ldr x30, [sp, #56]2777 ldr x30, [sp, #56]
2788 add sp, sp, #642778 add sp, sp, #64
2789 ret2779 ret
2790endfunc2780endfunc
2781.endm
2782
2783epel_uni_hv neon
2784
2785#if HAVE_I8MM
2786ENABLE_I8MM
2787
2788epel_hv neon_i8mm
2791 2789
2790epel_uni_hv neon_i8mm
2792 2791
2793function ff_hevc_put_hevc_epel_uni_w_h4_8_neon_i8mm, export=12792function ff_hevc_put_hevc_epel_uni_w_h4_8_neon_i8mm, export=1
2794 EPEL_UNI_W_H_HEADER2793 EPEL_UNI_W_H_HEADER
libavcodec/aarch64/hevcdsp_init_aarch64.c+5−0
@@ -209,6 +209,10 @@ NEON8_FNPROTO(epel_uni_v, (uint8_t *dst, ptrdiff_t dststride, · 208 unmodified lines
209 const uint8_t *src, ptrdiff_t srcstride,209 const uint8_t *src, ptrdiff_t srcstride,
210 int height, intptr_t mx, intptr_t my, int width),);210 int height, intptr_t mx, intptr_t my, int width),);
211 211
212NEON8_FNPROTO(epel_uni_hv, (uint8_t *dst, ptrdiff_t _dststride,
213 const uint8_t *src, ptrdiff_t srcstride,
214 int height, intptr_t mx, intptr_t my, int width),);
215
212NEON8_FNPROTO(epel_uni_hv, (uint8_t *dst, ptrdiff_t _dststride,216NEON8_FNPROTO(epel_uni_hv, (uint8_t *dst, ptrdiff_t _dststride,
213 const uint8_t *src, ptrdiff_t srcstride,217 const uint8_t *src, ptrdiff_t srcstride,
214 int height, intptr_t mx, intptr_t my, int width), _i8mm);218 int height, intptr_t mx, intptr_t my, int width), _i8mm);
@@ -412,6 +416,7 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) · 197 unmodified lines
412 NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel_uni_w, 0, 1, epel_uni_w_h,);416 NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel_uni_w, 0, 1, epel_uni_w_h,);
413 417
414 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);418 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);
419 NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 1, epel_uni_hv,);
415 420
416 if (have_i8mm(cpu_flags)) {421 if (have_i8mm(cpu_flags)) {
417 NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm);422 NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm);

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t