History

aarch64/vvc: Add put_qpel_hv

With Apple M1 (no i8mm): put_luma_hv_8_4x4_c: 2.2 ( 1.00x) put_luma_hv_8_4x4_neon: 0.8 ( 3.00x) put_luma_hv_8_8x8_c: 7.0 ( 1.00x) put_luma_hv_8_8x8_neon: 0.8 ( 9.33x) put_luma_hv_8_16x16_c: 22.8 ( 1.00x) put_luma_hv_8_16x16_neon: 2.5 ( 9.10x) put_luma_hv_8_32x32_c: 84.8 ( 1.00x) put_luma_hv_8_32x32_neon: 9.5 ( 8.92x) put_luma_hv_8_64x64_c: 333.0 ( 1.00x) put_luma_hv_8_64x64_neon: 35.5 ( 9.38x) put_luma_hv_8_128x128_c: 1294.5 ( 1.00x) put_luma_hv_8_128x128_neon: 137.8 ( 9.40x) With Pixel 8 Pro: put_luma_hv_8_4x4_c: 5.0 ( 1.00x) put_luma_hv_8_4x4_neon: 0.8 ( 6.67x) put_luma_hv_8_4x4_i8mm: 0.2 (20.00x) put_luma_hv_8_8x8_c: 13.2 ( 1.00x) put_luma_hv_8_8x8_neon: 1.2 (10.60x) put_luma_hv_8_8x8_i8mm: 1.2 (10.60x) put_luma_hv_8_16x16_c: 44.2 ( 1.00x) put_luma_hv_8_16x16_neon: 4.5 ( 9.83x) put_luma_hv_8_16x16_i8mm: 4.2 (10.41x) put_luma_hv_8_32x32_c: 160.8 ( 1.00x) put_luma_hv_8_32x32_neon: 17.5 ( 9.19x) put_luma_hv_8_32x32_i8mm: 16.0 (10.05x) put_luma_hv_8_64x64_c: 611.2 ( 1.00x) put_luma_hv_8_64x64_neon: 68.0 ( 8.99x) put_luma_hv_8_64x64_i8mm: 62.2 ( 9.82x) put_luma_hv_8_128x128_c: 2384.8 ( 1.00x) put_luma_hv_8_128x128_neon: 268.8 ( 8.87x) put_luma_hv_8_128x128_i8mm: 245.8 ( 9.70x)

Zhao Zhili committed 2 years ago

Commit 5ac69251 parent a0b52af3 files · +162 −0Browse files

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

Unified · Split

3 files
  1. libavcodec/aarch64/h26x/dsp.h +8 −0
  2. libavcodec/aarch64/h26x/qpel_neon.S +140 −0
  3. libavcodec/aarch64/vvc/dsp_init.c +14 −0
libavcodec/aarch64/h26x/dsp.h+8−0
@@ -282,4 +282,12 @@ void ff_vvc_put_qpel_v8_8_neon(int16_t *dst, const uint8_t *_src, · 281 unmodified lines
282282 ptrdiff_t _srcstride, int height,
283283 const int8_t *hf, const int8_t *vf, int width);
284284
285+NEON8_FNPROTO_PARTIAL_6(qpel_hv, (int16_t *dst,
286+ const uint8_t *src, ptrdiff_t srcstride, int height,
287+ const int8_t *hf, const int8_t *vf, int width),);
288+
289+NEON8_FNPROTO_PARTIAL_6(qpel_hv, (int16_t *dst,
290+ const uint8_t *src, ptrdiff_t srcstride, int height,
291+ const int8_t *hf, const int8_t *vf, int width), _i8mm);
292+
285293 #endif
libavcodec/aarch64/h26x/qpel_neon.S+140−0
@@ -4140,9 +4140,15 @@ endfunc · 4139 unmodified lines
41404140 DISABLE_I8MM
41414141 #endif
41424142
4143+function vvc_put_qpel_hv4_8_end_neon
4144+ vvc_load_qpel_filterh x5
4145+ mov x7, #(VVC_MAX_PB_SIZE * 2)
4146+ b 1f
4147+endfunc
41434148
41444149 function hevc_put_hevc_qpel_hv4_8_end_neon
41454150 load_qpel_filterh x5, x4
4151+1:
41464152 ldr d16, [sp]
41474153 ldr d17, [sp, x7]
41484154 add sp, sp, x7, lsl #1
@@ -4194,9 +4200,16 @@ function hevc_put_hevc_qpel_hv6_8_end_neon · 45 unmodified lines
41944200 ret
41954201 endfunc
41964202
4203+function vvc_put_qpel_hv8_8_end_neon
4204+ vvc_load_qpel_filterh x5
4205+ mov x7, #(VVC_MAX_PB_SIZE * 2)
4206+ b 1f
4207+endfunc
4208+
41974209 function hevc_put_hevc_qpel_hv8_8_end_neon
41984210 mov x7, #128
41994211 load_qpel_filterh x5, x4
4212+1:
42004213 ldr q16, [sp]
42014214 ldr q17, [sp, x7]
42024215 add sp, sp, x7, lsl #1
@@ -4247,9 +4260,16 @@ function hevc_put_hevc_qpel_hv12_8_end_neon · 44 unmodified lines
42474260 ret
42484261 endfunc
42494262
4263+function vvc_put_qpel_hv16_8_end_neon
4264+ vvc_load_qpel_filterh x5
4265+ mov x7, #(VVC_MAX_PB_SIZE * 2)
4266+ b 1f
4267+endfunc
4268+
42504269 function hevc_put_hevc_qpel_hv16_8_end_neon
42514270 mov x7, #128
42524271 load_qpel_filterh x5, x4
4272+1:
42534273 ld1 {v16.8h, v17.8h}, [sp], x7
42544274 ld1 {v18.8h, v19.8h}, [sp], x7
42554275 ld1 {v20.8h, v21.8h}, [sp], x7
@@ -4272,6 +4292,12 @@ function hevc_put_hevc_qpel_hv16_8_end_neon · 16 unmodified lines
42724292 ret
42734293 endfunc
42744294
4295+function vvc_put_qpel_hv32_8_end_neon
4296+ vvc_load_qpel_filterh x5
4297+ mov x7, #(VVC_MAX_PB_SIZE * 2)
4298+ b 0f
4299+endfunc
4300+
42754301 function hevc_put_hevc_qpel_hv32_8_end_neon
42764302 mov x7, #128
42774303 load_qpel_filterh x5, x4
@@ -4325,6 +4351,25 @@ function ff_hevc_put_hevc_qpel_hv4_8_\suffix, export=1 · 47 unmodified lines
43254351 b hevc_put_hevc_qpel_hv4_8_end_neon
43264352 endfunc
43274353
4354+function ff_vvc_put_qpel_hv4_8_\suffix, export=1
4355+ add w10, w3, #8
4356+ lsl x10, x10, #8
4357+ mov x14, sp
4358+ sub sp, sp, x10 // tmp_array
4359+ stp x5, x30, [sp, #-48]!
4360+ stp x0, x3, [sp, #16]
4361+ str x14, [sp, #32]
4362+ add x0, sp, #48
4363+ sub x1, x1, x2, lsl #1
4364+ add x3, x3, #7
4365+ sub x1, x1, x2
4366+ bl X(ff_vvc_put_qpel_h4_8_\suffix)
4367+ ldr x14, [sp, #32]
4368+ ldp x0, x3, [sp, #16]
4369+ ldp x5, x30, [sp], #48
4370+ b vvc_put_qpel_hv4_8_end_neon
4371+endfunc
4372+
43284373 function ff_hevc_put_hevc_qpel_hv6_8_\suffix, export=1
43294374 add w10, w3, #8
43304375 mov x7, #128
@@ -4364,6 +4409,25 @@ function ff_hevc_put_hevc_qpel_hv8_8_\suffix, export=1 · 33 unmodified lines
43644409 b hevc_put_hevc_qpel_hv8_8_end_neon
43654410 endfunc
43664411
4412+function ff_vvc_put_qpel_hv8_8_\suffix, export=1
4413+ add w10, w3, #8
4414+ lsl x10, x10, #8
4415+ sub x1, x1, x2, lsl #1
4416+ mov x14, sp
4417+ sub sp, sp, x10 // tmp_array
4418+ stp x5, x30, [sp, #-48]!
4419+ stp x0, x3, [sp, #16]
4420+ str x14, [sp, #32]
4421+ add x0, sp, #48
4422+ add x3, x3, #7
4423+ sub x1, x1, x2
4424+ bl X(ff_vvc_put_qpel_h8_8_\suffix)
4425+ ldr x14, [sp, #32]
4426+ ldp x0, x3, [sp, #16]
4427+ ldp x5, x30, [sp], #48
4428+ b vvc_put_qpel_hv8_8_end_neon
4429+endfunc
4430+
43674431 function ff_hevc_put_hevc_qpel_hv12_8_\suffix, export=1
43684432 add w10, w3, #8
43694433 lsl x10, x10, #7
@@ -4403,6 +4467,25 @@ function ff_hevc_put_hevc_qpel_hv16_8_\suffix, export=1 · 33 unmodified lines
44034467 b hevc_put_hevc_qpel_hv16_8_end_neon
44044468 endfunc
44054469
4470+function ff_vvc_put_qpel_hv16_8_\suffix, export=1
4471+ add w10, w3, #8
4472+ lsl x10, x10, #8
4473+ sub x1, x1, x2, lsl #1
4474+ mov x14, sp
4475+ sub sp, sp, x10 // tmp_array
4476+ stp x5, x30, [sp, #-48]!
4477+ stp x0, x3, [sp, #16]
4478+ str x14, [sp, #32]
4479+ add x3, x3, #7
4480+ add x0, sp, #48
4481+ sub x1, x1, x2
4482+ bl X(ff_vvc_put_qpel_h16_8_\suffix)
4483+ ldr x14, [sp, #32]
4484+ ldp x0, x3, [sp, #16]
4485+ ldp x5, x30, [sp], #48
4486+ b vvc_put_qpel_hv16_8_end_neon
4487+endfunc
4488+
44064489 function ff_hevc_put_hevc_qpel_hv24_8_\suffix, export=1
44074490 stp x4, x5, [sp, #-64]!
44084491 stp x2, x3, [sp, #16]
@@ -4439,6 +4522,26 @@ function ff_hevc_put_hevc_qpel_hv32_8_\suffix, export=1 · 30 unmodified lines
44394522 b hevc_put_hevc_qpel_hv32_8_end_neon
44404523 endfunc
44414524
4525+function ff_vvc_put_qpel_hv32_8_\suffix, export=1
4526+ add w10, w3, #8
4527+ sub x1, x1, x2, lsl #1
4528+ lsl x10, x10, #8
4529+ sub x1, x1, x2
4530+ mov x14, sp
4531+ sub sp, sp, x10 // tmp_array
4532+ stp x5, x30, [sp, #-48]!
4533+ stp x0, x3, [sp, #16]
4534+ str x14, [sp, #32]
4535+ add x3, x3, #7
4536+ add x0, sp, #48
4537+ mov w6, #32
4538+ bl X(ff_vvc_put_qpel_h32_8_\suffix)
4539+ ldr x14, [sp, #32]
4540+ ldp x0, x3, [sp, #16]
4541+ ldp x5, x30, [sp], #48
4542+ b vvc_put_qpel_hv32_8_end_neon
4543+endfunc
4544+
44424545 function ff_hevc_put_hevc_qpel_hv48_8_\suffix, export=1
44434546 stp x4, x5, [sp, #-64]!
44444547 stp x2, x3, [sp, #16]
@@ -4472,6 +4575,43 @@ function ff_hevc_put_hevc_qpel_hv64_8_\suffix, export=1 · 27 unmodified lines
44724575 ldr x30, [sp], #16
44734576 ret
44744577 endfunc
4578+
4579+function ff_vvc_put_qpel_hv64_8_\suffix, export=1
4580+ stp x4, x5, [sp, #-64]!
4581+ stp x2, x3, [sp, #16]
4582+ stp x0, x1, [sp, #32]
4583+ str x30, [sp, #48]
4584+ mov x6, #32
4585+ bl X(ff_vvc_put_qpel_hv32_8_\suffix)
4586+ ldp x0, x1, [sp, #32]
4587+ ldp x2, x3, [sp, #16]
4588+ ldp x4, x5, [sp], #48
4589+ add x1, x1, #32
4590+ add x0, x0, #64
4591+ mov x6, #32
4592+ bl X(ff_vvc_put_qpel_hv32_8_\suffix)
4593+ ldr x30, [sp], #16
4594+ ret
4595+endfunc
4596+
4597+function ff_vvc_put_qpel_hv128_8_\suffix, export=1
4598+ stp x4, x5, [sp, #-64]!
4599+ stp x2, x3, [sp, #16]
4600+ stp x0, x1, [sp, #32]
4601+ str x30, [sp, #48]
4602+ mov x6, #64
4603+ bl X(ff_vvc_put_qpel_hv64_8_\suffix)
4604+ ldp x0, x1, [sp, #32]
4605+ ldp x2, x3, [sp, #16]
4606+ ldp x4, x5, [sp], #48
4607+ add x1, x1, #64
4608+ add x0, x0, #128
4609+ mov x6, #64
4610+ bl X(ff_vvc_put_qpel_hv64_8_\suffix)
4611+ ldr x30, [sp], #16
4612+ ret
4613+endfunc
4614+
44754615 .endm
44764616
44774617 qpel_hv neon
libavcodec/aarch64/vvc/dsp_init.c+14−0
@@ -67,6 +67,13 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 66 unmodified lines
6767 c->inter.put[0][5][1][0] =
6868 c->inter.put[0][6][1][0] = ff_vvc_put_qpel_v8_8_neon;
6969
70+ c->inter.put[0][1][1][1] = ff_vvc_put_qpel_hv4_8_neon;
71+ c->inter.put[0][2][1][1] = ff_vvc_put_qpel_hv8_8_neon;
72+ c->inter.put[0][3][1][1] = ff_vvc_put_qpel_hv16_8_neon;
73+ c->inter.put[0][4][1][1] = ff_vvc_put_qpel_hv32_8_neon;
74+ c->inter.put[0][5][1][1] = ff_vvc_put_qpel_hv64_8_neon;
75+ c->inter.put[0][6][1][1] = ff_vvc_put_qpel_hv128_8_neon;
76+
7077 c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon;
7178 c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon;
7279 c->inter.put_uni[0][3][0][0] = ff_vvc_put_pel_uni_pixels16_8_neon;
@@ -103,6 +110,13 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 30 unmodified lines
103110 c->inter.put[0][4][0][1] = ff_vvc_put_qpel_h32_8_neon_i8mm;
104111 c->inter.put[0][5][0][1] = ff_vvc_put_qpel_h64_8_neon_i8mm;
105112 c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h128_8_neon_i8mm;
113+
114+ c->inter.put[0][1][1][1] = ff_vvc_put_qpel_hv4_8_neon_i8mm;
115+ c->inter.put[0][2][1][1] = ff_vvc_put_qpel_hv8_8_neon_i8mm;
116+ c->inter.put[0][3][1][1] = ff_vvc_put_qpel_hv16_8_neon_i8mm;
117+ c->inter.put[0][4][1][1] = ff_vvc_put_qpel_hv32_8_neon_i8mm;
118+ c->inter.put[0][5][1][1] = ff_vvc_put_qpel_hv64_8_neon_i8mm;
119+ c->inter.put[0][6][1][1] = ff_vvc_put_qpel_hv128_8_neon_i8mm;
106120 }
107121 } else if (bd == 10) {
108122 c->alf.filter[LUMA] = alf_filter_luma_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