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
3573 ret3573 ret
3574endfunc3574endfunc
3575 3575
3576#if HAVE_I8MM3576.macro epel_uni_w_hv suffix
3577ENABLE_I8MM3577function ff_hevc_put_hevc_epel_uni_w_hv4_8_\suffix, export=1
3578
3579function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1
3580 epel_uni_w_hv_start3578 epel_uni_w_hv_start
3581 sxtw x4, w43579 sxtw x4, w4
3582 3580
@@ -3591,14 +3589,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv4_8_neon_i8mm, export=1 · 8 unmodified lines
3591 mov x2, x33589 mov x2, x3
3592 add x3, x4, #33590 add x3, x4, #3
3593 mov x4, x53591 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)
3595 ldp x4, x6, [sp, #16]3593 ldp x4, x6, [sp, #16]
3596 ldp x0, x1, [sp, #32]3594 ldp x0, x1, [sp, #32]
3597 ldr x30, [sp], #483595 ldr x30, [sp], #48
3598 b hevc_put_hevc_epel_uni_w_hv4_8_end_neon3596 b hevc_put_hevc_epel_uni_w_hv4_8_end_neon
3599endfunc3597endfunc
3600 3598
3601function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=13599function ff_hevc_put_hevc_epel_uni_w_hv6_8_\suffix, export=1
3602 epel_uni_w_hv_start3600 epel_uni_w_hv_start
3603 sxtw x4, w43601 sxtw x4, w4
3604 3602
@@ -3613,14 +3611,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv6_8_neon_i8mm, export=1 · 8 unmodified lines
3613 mov x2, x33611 mov x2, x3
3614 add x3, x4, #33612 add x3, x4, #3
3615 mov x4, x53613 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)
3617 ldp x4, x6, [sp, #16]3615 ldp x4, x6, [sp, #16]
3618 ldp x0, x1, [sp, #32]3616 ldp x0, x1, [sp, #32]
3619 ldr x30, [sp], #483617 ldr x30, [sp], #48
3620 b hevc_put_hevc_epel_uni_w_hv6_8_end_neon3618 b hevc_put_hevc_epel_uni_w_hv6_8_end_neon
3621endfunc3619endfunc
3622 3620
3623function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=13621function ff_hevc_put_hevc_epel_uni_w_hv8_8_\suffix, export=1
3624 epel_uni_w_hv_start3622 epel_uni_w_hv_start
3625 sxtw x4, w43623 sxtw x4, w4
3626 3624
@@ -3635,14 +3633,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv8_8_neon_i8mm, export=1 · 8 unmodified lines
3635 mov x2, x33633 mov x2, x3
3636 add x3, x4, #33634 add x3, x4, #3
3637 mov x4, x53635 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)
3639 ldp x4, x6, [sp, #16]3637 ldp x4, x6, [sp, #16]
3640 ldp x0, x1, [sp, #32]3638 ldp x0, x1, [sp, #32]
3641 ldr x30, [sp], #483639 ldr x30, [sp], #48
3642 b hevc_put_hevc_epel_uni_w_hv8_8_end_neon3640 b hevc_put_hevc_epel_uni_w_hv8_8_end_neon
3643endfunc3641endfunc
3644 3642
3645function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=13643function ff_hevc_put_hevc_epel_uni_w_hv12_8_\suffix, export=1
3646 epel_uni_w_hv_start3644 epel_uni_w_hv_start
3647 sxtw x4, w43645 sxtw x4, w4
3648 3646
@@ -3657,14 +3655,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv12_8_neon_i8mm, export=1 · 8 unmodified lines
3657 mov x2, x33655 mov x2, x3
3658 add x3, x4, #33656 add x3, x4, #3
3659 mov x4, x53657 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)
3661 ldp x4, x6, [sp, #16]3659 ldp x4, x6, [sp, #16]
3662 ldp x0, x1, [sp, #32]3660 ldp x0, x1, [sp, #32]
3663 ldr x30, [sp], #483661 ldr x30, [sp], #48
3664 b hevc_put_hevc_epel_uni_w_hv12_8_end_neon3662 b hevc_put_hevc_epel_uni_w_hv12_8_end_neon
3665endfunc3663endfunc
3666 3664
3667function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=13665function ff_hevc_put_hevc_epel_uni_w_hv16_8_\suffix, export=1
3668 epel_uni_w_hv_start3666 epel_uni_w_hv_start
3669 sxtw x4, w43667 sxtw x4, w4
3670 3668
@@ -3679,14 +3677,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv16_8_neon_i8mm, export=1 · 8 unmodified lines
3679 mov x2, x33677 mov x2, x3
3680 add x3, x4, #33678 add x3, x4, #3
3681 mov x4, x53679 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)
3683 ldp x4, x6, [sp, #16]3681 ldp x4, x6, [sp, #16]
3684 ldp x0, x1, [sp, #32]3682 ldp x0, x1, [sp, #32]
3685 ldr x30, [sp], #483683 ldr x30, [sp], #48
3686 b hevc_put_hevc_epel_uni_w_hv16_8_end_neon3684 b hevc_put_hevc_epel_uni_w_hv16_8_end_neon
3687endfunc3685endfunc
3688 3686
3689function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=13687function ff_hevc_put_hevc_epel_uni_w_hv24_8_\suffix, export=1
3690 epel_uni_w_hv_start3688 epel_uni_w_hv_start
3691 sxtw x4, w43689 sxtw x4, w4
3692 3690
@@ -3701,14 +3699,14 @@ function ff_hevc_put_hevc_epel_uni_w_hv24_8_neon_i8mm, export=1 · 8 unmodified lines
3701 mov x2, x33699 mov x2, x3
3702 add x3, x4, #33700 add x3, x4, #3
3703 mov x4, x53701 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)
3705 ldp x4, x6, [sp, #16]3703 ldp x4, x6, [sp, #16]
3706 ldp x0, x1, [sp, #32]3704 ldp x0, x1, [sp, #32]
3707 ldr x30, [sp], #483705 ldr x30, [sp], #48
3708 b hevc_put_hevc_epel_uni_w_hv24_8_end_neon3706 b hevc_put_hevc_epel_uni_w_hv24_8_end_neon
3709endfunc3707endfunc
3710 3708
3711function ff_hevc_put_hevc_epel_uni_w_hv32_8_neon_i8mm, export=13709function ff_hevc_put_hevc_epel_uni_w_hv32_8_\suffix, export=1
3712 ldp x15, x16, [sp]3710 ldp x15, x16, [sp]
3713 mov x17, #163711 mov x17, #16
3714 stp x15, x16, [sp, #-96]!3712 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
3718 stp x5, x6, [sp, #64]3716 stp x5, x6, [sp, #64]
3719 stp x17, x7, [sp, #80]3717 stp x17, x7, [sp, #80]
3720 3718
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)
3722 ldp x0, x30, [sp, #16]3720 ldp x0, x30, [sp, #16]
3723 ldp x1, x2, [sp, #32]3721 ldp x1, x2, [sp, #32]
3724 ldp x3, x4, [sp, #48]3722 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
3730 mov x17, #163728 mov x17, #16
3731 stp x15, x16, [sp, #-32]!3729 stp x15, x16, [sp, #-32]!
3732 stp x17, x30, [sp, #16]3730 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)
3734 ldp x17, x30, [sp, #16]3732 ldp x17, x30, [sp, #16]
3735 ldp x15, x16, [sp], #323733 ldp x15, x16, [sp], #32
3736 ret3734 ret
3737endfunc3735endfunc
3738 3736
3739function ff_hevc_put_hevc_epel_uni_w_hv48_8_neon_i8mm, export=13737function ff_hevc_put_hevc_epel_uni_w_hv48_8_\suffix, export=1
3740 ldp x15, x16, [sp]3738 ldp x15, x16, [sp]
3741 mov x17, #243739 mov x17, #24
3742 stp x15, x16, [sp, #-96]!3740 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
3745 stp x3, x4, [sp, #48]3743 stp x3, x4, [sp, #48]
3746 stp x5, x6, [sp, #64]3744 stp x5, x6, [sp, #64]
3747 stp x17, x7, [sp, #80]3745 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)
3749 ldp x0, x30, [sp, #16]3747 ldp x0, x30, [sp, #16]
3750 ldp x1, x2, [sp, #32]3748 ldp x1, x2, [sp, #32]
3751 ldp x3, x4, [sp, #48]3749 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
3757 mov x17, #243755 mov x17, #24
3758 stp x15, x16, [sp, #-32]!3756 stp x15, x16, [sp, #-32]!
3759 stp x17, x30, [sp, #16]3757 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)
3761 ldp x17, x30, [sp, #16]3759 ldp x17, x30, [sp, #16]
3762 ldp x15, x16, [sp], #323760 ldp x15, x16, [sp], #32
3763 ret3761 ret
3764endfunc3762endfunc
3765 3763
3766function ff_hevc_put_hevc_epel_uni_w_hv64_8_neon_i8mm, export=13764function ff_hevc_put_hevc_epel_uni_w_hv64_8_\suffix, export=1
3767 ldp x15, x16, [sp]3765 ldp x15, x16, [sp]
3768 mov x17, #323766 mov x17, #32
3769 stp x15, x16, [sp, #-96]!3767 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
3773 stp x5, x6, [sp, #64]3771 stp x5, x6, [sp, #64]
3774 stp x17, x7, [sp, #80]3772 stp x17, x7, [sp, #80]
3775 3773
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)
3777 ldp x0, x30, [sp, #16]3775 ldp x0, x30, [sp, #16]
3778 ldp x1, x2, [sp, #32]3776 ldp x1, x2, [sp, #32]
3779 ldp x3, x4, [sp, #48]3777 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
3785 mov x17, #323783 mov x17, #32
3786 stp x15, x16, [sp, #-32]!3784 stp x15, x16, [sp, #-32]!
3787 stp x17, x30, [sp, #16]3785 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)
3789 ldp x17, x30, [sp, #16]3787 ldp x17, x30, [sp, #16]
3790 ldp x15, x16, [sp], #323788 ldp x15, x16, [sp], #32
3791 ret3789 ret
3792endfunc3790endfunc
3791.endm
3792
3793epel_uni_w_hv neon
3794
3795#if HAVE_I8MM
3796ENABLE_I8MM
3797
3798epel_uni_w_hv neon_i8mm
3793 3799
3794DISABLE_I8MM3800DISABLE_I8MM
3795#endif3801#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
278 int height, int denom, int wx, int ox,278 int height, int denom, int wx, int ox,
279 intptr_t mx, intptr_t my, int width), _i8mm);279 intptr_t mx, intptr_t my, int width), _i8mm);
280 280
281NEON8_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
281NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride,286NEON8_FNPROTO(epel_uni_w_hv, (uint8_t *_dst, ptrdiff_t _dststride,
282 const uint8_t *_src, ptrdiff_t _srcstride,287 const uint8_t *_src, ptrdiff_t _srcstride,
283 int height, int denom, int wx, int ox,288 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
417 422
418 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);423 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);
419 NEON8_FNASSIGN(c->put_hevc_epel_uni, 1, 1, epel_uni_hv,);424 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,);
420 426
421 if (have_i8mm(cpu_flags)) {427 if (have_i8mm(cpu_flags)) {
422 NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm);428 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