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

Showing the changes to libavcodec (2 of 2 files). Show all

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
24602460
24612461 epel_hv neon
24622462
2463−#if HAVE_I8MM
2464−ENABLE_I8MM
2465−
2466−epel_hv neon_i8mm
2467−
2468−DISABLE_I8MM
2469−#endif
2470−
24712463 function hevc_put_hevc_epel_uni_hv4_8_end_neon
24722464 load_epel_filterh x6, x5
24732465 mov x10, #(MAX_PB_SIZE * 2)
@@ -2596,10 +2588,8 @@ function hevc_put_hevc_epel_uni_hv24_8_end_neon · 122 unmodified lines
25962588 2: ret
25972589 endfunc
25982590
2599−#if HAVE_I8MM
2600−ENABLE_I8MM
2601−
2602−function ff_hevc_put_hevc_epel_uni_hv4_8_neon_i8mm, export=1
2591+.macro epel_uni_hv suffix
2592+function ff_hevc_put_hevc_epel_uni_hv4_8_\suffix, export=1
26032593 add w10, w4, #3
26042594 lsl x10, x10, #7
26052595 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
26112601 mov x2, x3
26122602 add w3, w4, #3
26132603 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)
26152605 ldp x4, x6, [sp, #16]
26162606 ldp x0, x1, [sp, #32]
26172607 ldr x30, [sp], #48
26182608 b hevc_put_hevc_epel_uni_hv4_8_end_neon
26192609 endfunc
26202610
2621−function ff_hevc_put_hevc_epel_uni_hv6_8_neon_i8mm, export=1
2611+function ff_hevc_put_hevc_epel_uni_hv6_8_\suffix, export=1
26222612 add w10, w4, #3
26232613 lsl x10, x10, #7
26242614 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
26302620 mov x2, x3
26312621 add w3, w4, #3
26322622 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)
26342624 ldp x4, x6, [sp, #16]
26352625 ldp x0, x1, [sp, #32]
26362626 ldr x30, [sp], #48
26372627 b hevc_put_hevc_epel_uni_hv6_8_end_neon
26382628 endfunc
26392629
2640−function ff_hevc_put_hevc_epel_uni_hv8_8_neon_i8mm, export=1
2630+function ff_hevc_put_hevc_epel_uni_hv8_8_\suffix, export=1
26412631 add w10, w4, #3
26422632 lsl x10, x10, #7
26432633 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
26492639 mov x2, x3
26502640 add w3, w4, #3
26512641 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)
26532643 ldp x4, x6, [sp, #16]
26542644 ldp x0, x1, [sp, #32]
26552645 ldr x30, [sp], #48
26562646 b hevc_put_hevc_epel_uni_hv8_8_end_neon
26572647 endfunc
26582648
2659−function ff_hevc_put_hevc_epel_uni_hv12_8_neon_i8mm, export=1
2649+function ff_hevc_put_hevc_epel_uni_hv12_8_\suffix, export=1
26602650 add w10, w4, #3
26612651 lsl x10, x10, #7
26622652 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
26682658 mov x2, x3
26692659 add w3, w4, #3
26702660 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)
26722662 ldp x4, x6, [sp, #16]
26732663 ldp x0, x1, [sp, #32]
26742664 ldr x30, [sp], #48
26752665 b hevc_put_hevc_epel_uni_hv12_8_end_neon
26762666 endfunc
26772667
2678−function ff_hevc_put_hevc_epel_uni_hv16_8_neon_i8mm, export=1
2668+function ff_hevc_put_hevc_epel_uni_hv16_8_\suffix, export=1
26792669 add w10, w4, #3
26802670 lsl x10, x10, #7
26812671 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
26872677 mov x2, x3
26882678 add w3, w4, #3
26892679 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)
26912681 ldp x4, x6, [sp, #16]
26922682 ldp x0, x1, [sp, #32]
26932683 ldr x30, [sp], #48
26942684 b hevc_put_hevc_epel_uni_hv16_8_end_neon
26952685 endfunc
26962686
2697−function ff_hevc_put_hevc_epel_uni_hv24_8_neon_i8mm, export=1
2687+function ff_hevc_put_hevc_epel_uni_hv24_8_\suffix, export=1
26982688 add w10, w4, #3
26992689 lsl x10, x10, #7
27002690 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
27062696 mov x2, x3
27072697 add w3, w4, #3
27082698 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)
27102700 ldp x4, x6, [sp, #16]
27112701 ldp x0, x1, [sp, #32]
27122702 ldr x30, [sp], #48
27132703 b hevc_put_hevc_epel_uni_hv24_8_end_neon
27142704 endfunc
27152705
2716−function ff_hevc_put_hevc_epel_uni_hv32_8_neon_i8mm, export=1
2706+function ff_hevc_put_hevc_epel_uni_hv32_8_\suffix, export=1
27172707 stp x5, x6, [sp, #-64]!
27182708 stp x3, x4, [sp, #16]
27192709 stp x1, x2, [sp, #32]
27202710 stp x0, x30, [sp, #48]
27212711 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)
27232713 ldp x5, x6, [sp]
27242714 ldp x3, x4, [sp, #16]
27252715 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
27272717 add x0, x0, #16
27282718 add x2, x2, #16
27292719 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)
27312721 ldr x30, [sp, #56]
27322722 add sp, sp, #64
27332723 ret
27342724 endfunc
27352725
2736−function ff_hevc_put_hevc_epel_uni_hv48_8_neon_i8mm, export=1
2726+function ff_hevc_put_hevc_epel_uni_hv48_8_\suffix, export=1
27372727 stp x5, x6, [sp, #-64]!
27382728 stp x3, x4, [sp, #16]
27392729 stp x1, x2, [sp, #32]
27402730 stp x0, x30, [sp, #48]
27412731 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)
27432733 ldp x5, x6, [sp]
27442734 ldp x3, x4, [sp, #16]
27452735 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
27472737 add x0, x0, #24
27482738 add x2, x2, #24
27492739 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)
27512741 ldr x30, [sp, #56]
27522742 add sp, sp, #64
27532743 ret
27542744 endfunc
27552745
2756−function ff_hevc_put_hevc_epel_uni_hv64_8_neon_i8mm, export=1
2746+function ff_hevc_put_hevc_epel_uni_hv64_8_\suffix, export=1
27572747 stp x5, x6, [sp, #-64]!
27582748 stp x3, x4, [sp, #16]
27592749 stp x1, x2, [sp, #32]
27602750 stp x0, x30, [sp, #48]
27612751 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)
27632753 ldp x5, x6, [sp]
27642754 ldp x3, x4, [sp, #16]
27652755 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
27672757 add x0, x0, #16
27682758 add x2, x2, #16
27692759 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)
27712761 ldp x5, x6, [sp]
27722762 ldp x3, x4, [sp, #16]
27732763 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
27752765 add x0, x0, #32
27762766 add x2, x2, #32
27772767 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)
27792769 ldp x5, x6, [sp]
27802770 ldp x3, x4, [sp, #16]
27812771 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
27832773 add x0, x0, #48
27842774 add x2, x2, #48
27852775 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)
27872777 ldr x30, [sp, #56]
27882778 add sp, sp, #64
27892779 ret
27902780 endfunc
2781+.endm
2782+
2783+epel_uni_hv neon
2784+
2785+#if HAVE_I8MM
2786+ENABLE_I8MM
2787+
2788+epel_hv neon_i8mm
27912789
2790+epel_uni_hv neon_i8mm
27922791
27932792 function ff_hevc_put_hevc_epel_uni_w_h4_8_neon_i8mm, export=1
27942793 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
209209 const uint8_t *src, ptrdiff_t srcstride,
210210 int height, intptr_t mx, intptr_t my, int width),);
211211
212+NEON8_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+
212216 NEON8_FNPROTO(epel_uni_hv, (uint8_t *dst, ptrdiff_t _dststride,
213217 const uint8_t *src, ptrdiff_t srcstride,
214218 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
412416 NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel_uni_w, 0, 1, epel_uni_w_h,);
413417
414418 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);
419+ NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 1, epel_uni_hv,);
415420
416421 if (have_i8mm(cpu_flags)) {
417422 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