History

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

AWS Graviton 3: put_hevc_epel_uni_w_hv4_8_c: 191.2 put_hevc_epel_uni_w_hv4_8_neon: 87.7 put_hevc_epel_uni_w_hv4_8_i8mm: 83.2 put_hevc_epel_uni_w_hv6_8_c: 349.5 put_hevc_epel_uni_w_hv6_8_neon: 153.0 put_hevc_epel_uni_w_hv6_8_i8mm: 148.5 put_hevc_epel_uni_w_hv8_8_c: 581.2 put_hevc_epel_uni_w_hv8_8_neon: 166.7 put_hevc_epel_uni_w_hv8_8_i8mm: 163.5 put_hevc_epel_uni_w_hv12_8_c: 1230.0 put_hevc_epel_uni_w_hv12_8_neon: 387.7 put_hevc_epel_uni_w_hv12_8_i8mm: 370.2 put_hevc_epel_uni_w_hv16_8_c: 2003.2 put_hevc_epel_uni_w_hv16_8_neon: 501.5 put_hevc_epel_uni_w_hv16_8_i8mm: 490.2 put_hevc_epel_uni_w_hv24_8_c: 4448.7 put_hevc_epel_uni_w_hv24_8_neon: 1092.2 put_hevc_epel_uni_w_hv24_8_i8mm: 1069.7 put_hevc_epel_uni_w_hv32_8_c: 7817.2 put_hevc_epel_uni_w_hv32_8_neon: 1916.2 put_hevc_epel_uni_w_hv32_8_i8mm: 1829.5 put_hevc_epel_uni_w_hv48_8_c: 16728.2 put_hevc_epel_uni_w_hv48_8_neon: 4263.7 put_hevc_epel_uni_w_hv48_8_i8mm: 4342.7 put_hevc_epel_uni_w_hv64_8_c: 29563.2 put_hevc_epel_uni_w_hv64_8_neon: 7474.2 put_hevc_epel_uni_w_hv64_8_i8mm: 7128.5

Martin Storsjö committed 2 years ago

Commit 96e5add1 parent d7294192 files · +36 −24Browse files

Unified · Split

2 files
  1. libavcodec/aarch64/hevcdsp_epel_neon.S +30 −24
  2. libavcodec/aarch64/hevcdsp_init_aarch64.c +6 −0
libavcodec/aarch64/hevcdsp_epel_neon.S+30−24
@@ -3573,10 +3573,8 @@ function hevc_put_hevc_epel_uni_w_hv24_8_end_neon · 3572 unmodified lines
35733573 ret
35743574 endfunc
35753575
3576−#if HAVE_I8MM
3577−ENABLE_I8MM
3578−
3579−function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1
3576+.macro epel_uni_w_hv suffix
3577+function ff_hevc_put_hevc_epel_uni_w_hv4_8_\suffix, export=1
35803578 epel_uni_w_hv_start
35813579 sxtw x4, w4
35823580
@@ -3591,14 +3589,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1 · 8 unmodified lines
35913589 mov x2, x3
35923590 add x3, x4, #3
35933591 mov x4, x5
3594− bl X(ff_hevc_put_hevc_epel_h4_8_neon_i8mm)
3592+ bl X(ff_hevc_put_hevc_epel_h4_8_\suffix)
35953593 ldp x4, x6, [sp, #16]
35963594 ldp x0, x1, [sp, #32]
35973595 ldr x30, [sp], #48
35983596 b hevc_put_hevc_epel_uni_w_hv4_8_end_neon
35993597 endfunc
36003598
3601−function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=1
3599+function ff_hevc_put_hevc_epel_uni_w_hv6_8_\suffix, export=1
36023600 epel_uni_w_hv_start
36033601 sxtw x4, w4
36043602
@@ -3613,14 +3611,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=1 · 8 unmodified lines
36133611 mov x2, x3
36143612 add x3, x4, #3
36153613 mov x4, x5
3616− bl X(ff_hevc_put_hevc_epel_h6_8_neon_i8mm)
3614+ bl X(ff_hevc_put_hevc_epel_h6_8_\suffix)
36173615 ldp x4, x6, [sp, #16]
36183616 ldp x0, x1, [sp, #32]
36193617 ldr x30, [sp], #48
36203618 b hevc_put_hevc_epel_uni_w_hv6_8_end_neon
36213619 endfunc
36223620
3623−function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=1
3621+function ff_hevc_put_hevc_epel_uni_w_hv8_8_\suffix, export=1
36243622 epel_uni_w_hv_start
36253623 sxtw x4, w4
36263624
@@ -3635,14 +3633,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=1 · 8 unmodified lines
36353633 mov x2, x3
36363634 add x3, x4, #3
36373635 mov x4, x5
3638− bl X(ff_hevc_put_hevc_epel_h8_8_neon_i8mm)
3636+ bl X(ff_hevc_put_hevc_epel_h8_8_\suffix)
36393637 ldp x4, x6, [sp, #16]
36403638 ldp x0, x1, [sp, #32]
36413639 ldr x30, [sp], #48
36423640 b hevc_put_hevc_epel_uni_w_hv8_8_end_neon
36433641 endfunc
36443642
3645−function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=1
3643+function ff_hevc_put_hevc_epel_uni_w_hv12_8_\suffix, export=1
36463644 epel_uni_w_hv_start
36473645 sxtw x4, w4
36483646
@@ -3657,14 +3655,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=1 · 8 unmodified lines
36573655 mov x2, x3
36583656 add x3, x4, #3
36593657 mov x4, x5
3660− bl X(ff_hevc_put_hevc_epel_h12_8_neon_i8mm)
3658+ bl X(ff_hevc_put_hevc_epel_h12_8_\suffix)
36613659 ldp x4, x6, [sp, #16]
36623660 ldp x0, x1, [sp, #32]
36633661 ldr x30, [sp], #48
36643662 b hevc_put_hevc_epel_uni_w_hv12_8_end_neon
36653663 endfunc
36663664
3667−function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=1
3665+function ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix, export=1
36683666 epel_uni_w_hv_start
36693667 sxtw x4, w4
36703668
@@ -3679,14 +3677,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=1 · 8 unmodified lines
36793677 mov x2, x3
36803678 add x3, x4, #3
36813679 mov x4, x5
3682− bl X(ff_hevc_put_hevc_epel_h16_8_neon_i8mm)
3680+ bl X(ff_hevc_put_hevc_epel_h16_8_\suffix)
36833681 ldp x4, x6, [sp, #16]
36843682 ldp x0, x1, [sp, #32]
36853683 ldr x30, [sp], #48
36863684 b hevc_put_hevc_epel_uni_w_hv16_8_end_neon
36873685 endfunc
36883686
3689−function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=1
3687+function ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix, export=1
36903688 epel_uni_w_hv_start
36913689 sxtw x4, w4
36923690
@@ -3701,14 +3699,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=1 · 8 unmodified lines
37013699 mov x2, x3
37023700 add x3, x4, #3
37033701 mov x4, x5
3704− bl X(ff_hevc_put_hevc_epel_h24_8_neon_i8mm)
3702+ bl X(ff_hevc_put_hevc_epel_h24_8_\suffix)
37053703 ldp x4, x6, [sp, #16]
37063704 ldp x0, x1, [sp, #32]
37073705 ldr x30, [sp], #48
37083706 b hevc_put_hevc_epel_uni_w_hv24_8_end_neon
37093707 endfunc
37103708
3711−function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1
3709+function ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix, export=1
37123710 ldp x15, x16, [sp]
37133711 mov x17, #16
37143712 stp x15, x16, [sp, #-96]!
@@ -3718,7 +3716,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1 · 3 unmodified lines
37183716 stp x5, x6, [sp, #64]
37193717 stp x17, x7, [sp, #80]
37203718
3721− bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm)
3719+ bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix)
37223720 ldp x0, x30, [sp, #16]
37233721 ldp x1, x2, [sp, #32]
37243722 ldp x3, x4, [sp, #48]
@@ -3730,13 +3728,13 @@ function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=1 · 5 unmodified lines
37303728 mov x17, #16
37313729 stp x15, x16, [sp, #-32]!
37323730 stp x17, x30, [sp, #16]
3733− bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm)
3731+ bl X(ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix)
37343732 ldp x17, x30, [sp, #16]
37353733 ldp x15, x16, [sp], #32
37363734 ret
37373735 endfunc
37383736
3739−function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1
3737+function ff_hevc_put_hevc_epel_uni_w_hv48_8_\suffix, export=1
37403738 ldp x15, x16, [sp]
37413739 mov x17, #24
37423740 stp x15, x16, [sp, #-96]!
@@ -3745,7 +3743,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1 · 2 unmodified lines
37453743 stp x3, x4, [sp, #48]
37463744 stp x5, x6, [sp, #64]
37473745 stp x17, x7, [sp, #80]
3748− bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm)
3746+ bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix)
37493747 ldp x0, x30, [sp, #16]
37503748 ldp x1, x2, [sp, #32]
37513749 ldp x3, x4, [sp, #48]
@@ -3757,13 +3755,13 @@ function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=1 · 5 unmodified lines
37573755 mov x17, #24
37583756 stp x15, x16, [sp, #-32]!
37593757 stp x17, x30, [sp, #16]
3760− bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm)
3758+ bl X(ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix)
37613759 ldp x17, x30, [sp, #16]
37623760 ldp x15, x16, [sp], #32
37633761 ret
37643762 endfunc
37653763
3766−function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1
3764+function ff_hevc_put_hevc_epel_uni_w_hv64_8_\suffix, export=1
37673765 ldp x15, x16, [sp]
37683766 mov x17, #32
37693767 stp x15, x16, [sp, #-96]!
@@ -3773,7 +3771,7 @@ function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1 · 3 unmodified lines
37733771 stp x5, x6, [sp, #64]
37743772 stp x17, x7, [sp, #80]
37753773
3776− bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm)
3774+ bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix)
37773775 ldp x0, x30, [sp, #16]
37783776 ldp x1, x2, [sp, #32]
37793777 ldp x3, x4, [sp, #48]
@@ -3785,11 +3783,19 @@ function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=1 · 5 unmodified lines
37853783 mov x17, #32
37863784 stp x15, x16, [sp, #-32]!
37873785 stp x17, x30, [sp, #16]
3788− bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm)
3786+ bl X(ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix)
37893787 ldp x17, x30, [sp, #16]
37903788 ldp x15, x16, [sp], #32
37913789 ret
37923790 endfunc
3791+.endm
3792+
3793+epel_uni_w_hv neon
3794+
3795+#if HAVE_I8MM
3796+ENABLE_I8MM
3797+
3798+epel_uni_w_hv neon_i8mm
37933799
37943800 DISABLE_I8MM
37953801 #endif
libavcodec/aarch64/hevcdsp_init_aarch64.c+6−0
@@ -278,6 +278,11 @@ NEON8_FNPROTO(qpel_uni_w_h, (uint8_t *_dst, ptrdiff_t _dststride, · 277 unmodified lines
278278 int height, int denom, int wx, int ox,
279279 intptr_t mx, intptr_t my, int width), _i8mm);
280280
281+NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride,
282+ const uint8_t *_src, ptrdiff_t _srcstride,
283+ int height, int denom, int wx, int ox,
284+ intptr_t mx, intptr_t my, int width),);
285+
281286 NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride,
282287 const uint8_t *_src, ptrdiff_t _srcstride,
283288 int height, int denom, int wx, int ox,
@@ -417,6 +422,7 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) · 133 unmodified lines
417422
418423 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);
419424 NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 1, epel_uni_hv,);
425+ NEON8_FNASSIGN(c->put_hevc_epel_uni_w, 1, 1, epel_uni_w_hv,);
420426
421427 if (have_i8mm(cpu_flags)) {
422428 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