Benchmark on Android pixel 8 with -fno-vectorize put_luma_h_8_4x4_c: 0.2 ( 1.00x) put_luma_h_8_4x4_neon: 0.2 ( 1.00x) put_luma_h_8_4x4_i8mm: 0.0 ( 0.00x) put_luma_h_8_8x8_c: 1.5 ( 1.00x) put_luma_h_8_8x8_neon: 0.5 ( 3.00x) put_luma_h_8_8x8_i8mm: 0.5 ( 3.00x) put_luma_h_8_16x16_c: 6.2 ( 1.00x) put_luma_h_8_16x16_neon: 2.0 ( 3.12x) put_luma_h_8_16x16_i8mm: 1.5 ( 4.17x) put_luma_h_8_32x32_c: 25.5 ( 1.00x) put_luma_h_8_32x32_neon: 9.0 ( 2.83x) put_luma_h_8_32x32_i8mm: 6.8 ( 3.78x) put_luma_h_8_64x64_c: 99.8 ( 1.00x) put_luma_h_8_64x64_neon: 35.2 ( 2.83x) put_luma_h_8_64x64_i8mm: 27.2 ( 3.66x) put_luma_h_8_128x128_c: 422.0 ( 1.00x) put_luma_h_8_128x128_neon: 138.5 ( 3.05x) put_luma_h_8_128x128_i8mm: 109.2 ( 3.86x)
Showing the changes to libavcodec (3 of 3 files). Show all
Unified · Split
| @@ -270,4 +270,8 @@ NEON8_FNPROTO_PARTIAL_6(pel_uni_w_pixels, (uint8_t *_dst, ptrdiff_t _dststride, · 269 unmodified lines | |||
| 270 | int height, int denom, int wx, int ox, | 270 | int height, int denom, int wx, int ox, |
| 271 | const int8_t *hf, const int8_t *vf, int width),); | 271 | const int8_t *hf, const int8_t *vf, int width),); |
| 272 | 272 | ||
| 273 | NEON8_FNPROTO_PARTIAL_6(qpel_h, (int16_t * dst, | ||
| 274 | const uint8_t *_src, ptrdiff_t _srcstride, int height, | ||
| 275 | const int8_t *hf, const int8_t *vf, int width), _i8mm); | ||
| 276 | |||
| 273 | #endif | 277 | #endif |
| @@ -3516,6 +3516,17 @@ endfunc · 3515 unmodified lines | |||
| 3516 | sub x1, x1, #3 | 3516 | sub x1, x1, #3 |
| 3517 | .endm | 3517 | .endm |
| 3518 | 3518 | ||
| 3519 | .macro VVC_QPEL_H_HEADER | ||
| 3520 | ld1r {v31.2d}, [x4] | ||
| 3521 | sub x1, x1, #3 | ||
| 3522 | .endm | ||
| 3523 | |||
| 3524 | function ff_vvc_put_qpel_h4_8_neon_i8mm, export=1 | ||
| 3525 | VVC_QPEL_H_HEADER | ||
| 3526 | mov x10, #VVC_MAX_PB_SIZE * 2 | ||
| 3527 | b 1f | ||
| 3528 | endfunc | ||
| 3529 | |||
| 3519 | function ff_hevc_put_hevc_qpel_h4_8_neon_i8mm, export=1 | 3530 | function ff_hevc_put_hevc_qpel_h4_8_neon_i8mm, export=1 |
| 3520 | QPEL_H_HEADER | 3531 | QPEL_H_HEADER |
| 3521 | mov x10, #HEVC_MAX_PB_SIZE * 2 | 3532 | mov x10, #HEVC_MAX_PB_SIZE * 2 |
| @@ -3572,6 +3583,12 @@ function ff_hevc_put_hevc_qpel_h6_8_neon_i8mm, export=1 · 50 unmodified lines | |||
| 3572 | ret | 3583 | ret |
| 3573 | endfunc | 3584 | endfunc |
| 3574 | 3585 | ||
| 3586 | function ff_vvc_put_qpel_h8_8_neon_i8mm, export=1 | ||
| 3587 | VVC_QPEL_H_HEADER | ||
| 3588 | mov x10, #VVC_MAX_PB_SIZE * 2 | ||
| 3589 | b 1f | ||
| 3590 | endfunc | ||
| 3591 | |||
| 3575 | function ff_hevc_put_hevc_qpel_h8_8_neon_i8mm, export=1 | 3592 | function ff_hevc_put_hevc_qpel_h8_8_neon_i8mm, export=1 |
| 3576 | QPEL_H_HEADER | 3593 | QPEL_H_HEADER |
| 3577 | mov x10, #HEVC_MAX_PB_SIZE * 2 | 3594 | mov x10, #HEVC_MAX_PB_SIZE * 2 |
| @@ -3656,6 +3673,12 @@ function ff_hevc_put_hevc_qpel_h12_8_neon_i8mm, export=1 · 78 unmodified lines | |||
| 3656 | ret | 3673 | ret |
| 3657 | endfunc | 3674 | endfunc |
| 3658 | 3675 | ||
| 3676 | function ff_vvc_put_qpel_h16_8_neon_i8mm, export=1 | ||
| 3677 | VVC_QPEL_H_HEADER | ||
| 3678 | mov x10, #VVC_MAX_PB_SIZE * 2 | ||
| 3679 | b 1f | ||
| 3680 | endfunc | ||
| 3681 | |||
| 3659 | function ff_hevc_put_hevc_qpel_h16_8_neon_i8mm, export=1 | 3682 | function ff_hevc_put_hevc_qpel_h16_8_neon_i8mm, export=1 |
| 3660 | QPEL_H_HEADER | 3683 | QPEL_H_HEADER |
| 3661 | mov x10, #HEVC_MAX_PB_SIZE * 2 | 3684 | mov x10, #HEVC_MAX_PB_SIZE * 2 |
| @@ -3746,6 +3769,13 @@ function ff_hevc_put_hevc_qpel_h24_8_neon_i8mm, export=1 · 84 unmodified lines | |||
| 3746 | ret | 3769 | ret |
| 3747 | endfunc | 3770 | endfunc |
| 3748 | 3771 | ||
| 3772 | function ff_vvc_put_qpel_h32_8_neon_i8mm, export=1 | ||
| 3773 | VVC_QPEL_H_HEADER | ||
| 3774 | mov x10, #VVC_MAX_PB_SIZE * 2 | ||
| 3775 | add x15, x0, #32 | ||
| 3776 | b 1f | ||
| 3777 | endfunc | ||
| 3778 | |||
| 3749 | function ff_hevc_put_hevc_qpel_h32_8_neon_i8mm, export=1 | 3779 | function ff_hevc_put_hevc_qpel_h32_8_neon_i8mm, export=1 |
| 3750 | QPEL_H_HEADER | 3780 | QPEL_H_HEADER |
| 3751 | mov x10, #HEVC_MAX_PB_SIZE * 2 | 3781 | mov x10, #HEVC_MAX_PB_SIZE * 2 |
| @@ -3881,10 +3911,7 @@ function ff_hevc_put_hevc_qpel_h48_8_neon_i8mm, export=1 · 129 unmodified lines | |||
| 3881 | ret | 3911 | ret |
| 3882 | endfunc | 3912 | endfunc |
| 3883 | 3913 | ||
| 3884 | function ff_hevc_put_hevc_qpel_h64_8_neon_i8mm, export=1 | 3914 | .macro put_qpel_h64_8_neon_i8mm |
| 3885 | QPEL_H_HEADER | ||
| 3886 | sub x2, x2, #64 | ||
| 3887 | 1: | ||
| 3888 | ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x1], #64 | 3915 | ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x1], #64 |
| 3889 | ext v1.16b, v16.16b, v17.16b, #1 | 3916 | ext v1.16b, v16.16b, v17.16b, #1 |
| 3890 | ext v2.16b, v16.16b, v17.16b, #2 | 3917 | ext v2.16b, v16.16b, v17.16b, #2 |
| @@ -3975,11 +4002,42 @@ function ff_hevc_put_hevc_qpel_h64_8_neon_i8mm, export=1 · 84 unmodified lines | |||
| 3975 | sqxtn2 v20.8h, v26.4s | 4002 | sqxtn2 v20.8h, v26.4s |
| 3976 | sqxtn v21.4h, v23.4s | 4003 | sqxtn v21.4h, v23.4s |
| 3977 | sqxtn2 v21.8h, v27.4s | 4004 | sqxtn2 v21.8h, v27.4s |
| 3978 | stp q20, q21, [x0], #32 | 4005 | stp q20, q21, [x0] |
| 4006 | add x0, x0, x10 | ||
| 4007 | .endm | ||
| 4008 | |||
| 4009 | function ff_vvc_put_qpel_h64_8_neon_i8mm, export=1 | ||
| 4010 | VVC_QPEL_H_HEADER | ||
| 4011 | mov x10, #(VVC_MAX_PB_SIZE * 2 - 32 * 3) | ||
| 4012 | sub x2, x2, #64 | ||
| 4013 | b 1f | ||
| 4014 | endfunc | ||
| 4015 | |||
| 4016 | function ff_hevc_put_hevc_qpel_h64_8_neon_i8mm, export=1 | ||
| 4017 | QPEL_H_HEADER | ||
| 4018 | mov x10, #32 | ||
| 4019 | sub x2, x2, #64 | ||
| 4020 | 1: | ||
| 4021 | put_qpel_h64_8_neon_i8mm | ||
| 4022 | subs w3, w3, #1 | ||
| 4023 | b.ne 1b | ||
| 4024 | ret | ||
| 4025 | endfunc | ||
| 4026 | |||
| 4027 | function ff_vvc_put_qpel_h128_8_neon_i8mm, export=1 | ||
| 4028 | VVC_QPEL_H_HEADER | ||
| 4029 | sub x11, x2, #128 | ||
| 4030 | mov x10, #32 | ||
| 4031 | mov x2, #0 | ||
| 4032 | 1: | ||
| 4033 | put_qpel_h64_8_neon_i8mm | ||
| 3979 | subs w3, w3, #1 | 4034 | subs w3, w3, #1 |
| 4035 | put_qpel_h64_8_neon_i8mm | ||
| 4036 | add x1, x1, x11 | ||
| 3980 | b.ne 1b | 4037 | b.ne 1b |
| 3981 | ret | 4038 | ret |
| 3982 | endfunc | 4039 | endfunc |
| 4040 | |||
| 3983 | DISABLE_I8MM | 4041 | DISABLE_I8MM |
| 3984 | #endif | 4042 | #endif |
| 3985 | 4043 | ||
| @@ -88,6 +88,15 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 87 unmodified lines | |||
| 88 | c->sao.edge_filter[i] = ff_vvc_sao_edge_filter_16x16_8_neon; | 88 | c->sao.edge_filter[i] = ff_vvc_sao_edge_filter_16x16_8_neon; |
| 89 | c->alf.filter[LUMA] = alf_filter_luma_8_neon; | 89 | c->alf.filter[LUMA] = alf_filter_luma_8_neon; |
| 90 | c->alf.filter[CHROMA] = alf_filter_chroma_8_neon; | 90 | c->alf.filter[CHROMA] = alf_filter_chroma_8_neon; |
| 91 | |||
| 92 | if (have_i8mm(cpu_flags)) { | ||
| 93 | c->inter.put[0][1][0][1] = ff_vvc_put_qpel_h4_8_neon_i8mm; | ||
| 94 | c->inter.put[0][2][0][1] = ff_vvc_put_qpel_h8_8_neon_i8mm; | ||
| 95 | c->inter.put[0][3][0][1] = ff_vvc_put_qpel_h16_8_neon_i8mm; | ||
| 96 | c->inter.put[0][4][0][1] = ff_vvc_put_qpel_h32_8_neon_i8mm; | ||
| 97 | c->inter.put[0][5][0][1] = ff_vvc_put_qpel_h64_8_neon_i8mm; | ||
| 98 | c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h128_8_neon_i8mm; | ||
| 99 | } | ||
| 91 | } else if (bd == 10) { | 100 | } else if (bd == 10) { |
| 92 | c->alf.filter[LUMA] = alf_filter_luma_10_neon; | 101 | c->alf.filter[LUMA] = alf_filter_luma_10_neon; |
| 93 | c->alf.filter[CHROMA] = alf_filter_chroma_10_neon; | 102 | c->alf.filter[CHROMA] = alf_filter_chroma_10_neon; |