History

aarch64/vvc: Add put_qpel_hx i8mm

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)

Zhao Zhili committed 2 years ago

Commit 9f6c8eb1 parent 25448d13 files · +76 −5Browse files

Unified · Split

3 files
  1. libavcodec/aarch64/h26x/dsp.h +4 −0
  2. libavcodec/aarch64/h26x/qpel_neon.S +63 −5
  3. libavcodec/aarch64/vvc/dsp_init.c +9 −0
libavcodec/aarch64/h26x/dsp.h+4−0
@@ -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
273NEON8_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#endif277#endif
libavcodec/aarch64/h26x/qpel_neon.S+63−5
@@ -3516,6 +3516,17 @@ endfunc · 3515 unmodified lines
3516 sub x1, x1, #33516 sub x1, x1, #3
3517.endm3517.endm
3518 3518
3519.macro VVC_QPEL_H_HEADER
3520 ld1r {v31.2d}, [x4]
3521 sub x1, x1, #3
3522.endm
3523
3524function 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
3528endfunc
3529
3519function ff_hevc_put_hevc_qpel_h4_8_neon_i8mm, export=13530function ff_hevc_put_hevc_qpel_h4_8_neon_i8mm, export=1
3520 QPEL_H_HEADER3531 QPEL_H_HEADER
3521 mov x10, #HEVC_MAX_PB_SIZE * 23532 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 ret3583 ret
3573endfunc3584endfunc
3574 3585
3586function 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
3590endfunc
3591
3575function ff_hevc_put_hevc_qpel_h8_8_neon_i8mm, export=13592function ff_hevc_put_hevc_qpel_h8_8_neon_i8mm, export=1
3576 QPEL_H_HEADER3593 QPEL_H_HEADER
3577 mov x10, #HEVC_MAX_PB_SIZE * 23594 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 ret3673 ret
3657endfunc3674endfunc
3658 3675
3676function 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
3680endfunc
3681
3659function ff_hevc_put_hevc_qpel_h16_8_neon_i8mm, export=13682function ff_hevc_put_hevc_qpel_h16_8_neon_i8mm, export=1
3660 QPEL_H_HEADER3683 QPEL_H_HEADER
3661 mov x10, #HEVC_MAX_PB_SIZE * 23684 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 ret3769 ret
3747endfunc3770endfunc
3748 3771
3772function 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
3777endfunc
3778
3749function ff_hevc_put_hevc_qpel_h32_8_neon_i8mm, export=13779function ff_hevc_put_hevc_qpel_h32_8_neon_i8mm, export=1
3750 QPEL_H_HEADER3780 QPEL_H_HEADER
3751 mov x10, #HEVC_MAX_PB_SIZE * 23781 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 ret3911 ret
3882endfunc3912endfunc
3883 3913
3884function ff_hevc_put_hevc_qpel_h64_8_neon_i8mm, export=13914.macro put_qpel_h64_8_neon_i8mm
3885 QPEL_H_HEADER
3886 sub x2, x2, #64
38871:
3888 ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x1], #643915 ld1 {v16.16b, v17.16b, v18.16b, v19.16b}, [x1], #64
3889 ext v1.16b, v16.16b, v17.16b, #13916 ext v1.16b, v16.16b, v17.16b, #1
3890 ext v2.16b, v16.16b, v17.16b, #23917 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.4s4002 sqxtn2 v20.8h, v26.4s
3976 sqxtn v21.4h, v23.4s4003 sqxtn v21.4h, v23.4s
3977 sqxtn2 v21.8h, v27.4s4004 sqxtn2 v21.8h, v27.4s
3978 stp q20, q21, [x0], #324005 stp q20, q21, [x0]
4006 add x0, x0, x10
4007.endm
4008
4009function 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
4014endfunc
4015
4016function ff_hevc_put_hevc_qpel_h64_8_neon_i8mm, export=1
4017 QPEL_H_HEADER
4018 mov x10, #32
4019 sub x2, x2, #64
40201:
4021 put_qpel_h64_8_neon_i8mm
4022 subs w3, w3, #1
4023 b.ne 1b
4024 ret
4025endfunc
4026
4027function 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
40321:
4033 put_qpel_h64_8_neon_i8mm
3979 subs w3, w3, #14034 subs w3, w3, #1
4035 put_qpel_h64_8_neon_i8mm
4036 add x1, x1, x11
3980 b.ne 1b4037 b.ne 1b
3981 ret4038 ret
3982endfunc4039endfunc
4040
3983DISABLE_I8MM4041DISABLE_I8MM
3984#endif4042#endif
3985 4043
libavcodec/aarch64/vvc/dsp_init.c+9−0
@@ -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;

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