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

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
282 ptrdiff_t _srcstride, int height,282 ptrdiff_t _srcstride, int height,
283 const int8_t *hf, const int8_t *vf, int width);283 const int8_t *hf, const int8_t *vf, int width);
284 284
285NEON8_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
289NEON8_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
285#endif293#endif
libavcodec/aarch64/h26x/qpel_neon.S+140−0
@@ -4140,9 +4140,15 @@ endfunc · 4139 unmodified lines
4140DISABLE_I8MM4140DISABLE_I8MM
4141#endif4141#endif
4142 4142
4143function vvc_put_qpel_hv4_8_end_neon
4144 vvc_load_qpel_filterh x5
4145 mov x7, #(VVC_MAX_PB_SIZE * 2)
4146 b 1f
4147endfunc
4143 4148
4144function hevc_put_hevc_qpel_hv4_8_end_neon4149function hevc_put_hevc_qpel_hv4_8_end_neon
4145 load_qpel_filterh x5, x44150 load_qpel_filterh x5, x4
41511:
4146 ldr d16, [sp]4152 ldr d16, [sp]
4147 ldr d17, [sp, x7]4153 ldr d17, [sp, x7]
4148 add sp, sp, x7, lsl #14154 add sp, sp, x7, lsl #1
@@ -4194,9 +4200,16 @@ function hevc_put_hevc_qpel_hv6_8_end_neon · 45 unmodified lines
4194 ret4200 ret
4195endfunc4201endfunc
4196 4202
4203function vvc_put_qpel_hv8_8_end_neon
4204 vvc_load_qpel_filterh x5
4205 mov x7, #(VVC_MAX_PB_SIZE * 2)
4206 b 1f
4207endfunc
4208
4197function hevc_put_hevc_qpel_hv8_8_end_neon4209function hevc_put_hevc_qpel_hv8_8_end_neon
4198 mov x7, #1284210 mov x7, #128
4199 load_qpel_filterh x5, x44211 load_qpel_filterh x5, x4
42121:
4200 ldr q16, [sp]4213 ldr q16, [sp]
4201 ldr q17, [sp, x7]4214 ldr q17, [sp, x7]
4202 add sp, sp, x7, lsl #14215 add sp, sp, x7, lsl #1
@@ -4247,9 +4260,16 @@ function hevc_put_hevc_qpel_hv12_8_end_neon · 44 unmodified lines
4247 ret4260 ret
4248endfunc4261endfunc
4249 4262
4263function vvc_put_qpel_hv16_8_end_neon
4264 vvc_load_qpel_filterh x5
4265 mov x7, #(VVC_MAX_PB_SIZE * 2)
4266 b 1f
4267endfunc
4268
4250function hevc_put_hevc_qpel_hv16_8_end_neon4269function hevc_put_hevc_qpel_hv16_8_end_neon
4251 mov x7, #1284270 mov x7, #128
4252 load_qpel_filterh x5, x44271 load_qpel_filterh x5, x4
42721:
4253 ld1 {v16.8h, v17.8h}, [sp], x74273 ld1 {v16.8h, v17.8h}, [sp], x7
4254 ld1 {v18.8h, v19.8h}, [sp], x74274 ld1 {v18.8h, v19.8h}, [sp], x7
4255 ld1 {v20.8h, v21.8h}, [sp], x74275 ld1 {v20.8h, v21.8h}, [sp], x7
@@ -4272,6 +4292,12 @@ function hevc_put_hevc_qpel_hv16_8_end_neon · 16 unmodified lines
4272 ret4292 ret
4273endfunc4293endfunc
4274 4294
4295function vvc_put_qpel_hv32_8_end_neon
4296 vvc_load_qpel_filterh x5
4297 mov x7, #(VVC_MAX_PB_SIZE * 2)
4298 b 0f
4299endfunc
4300
4275function hevc_put_hevc_qpel_hv32_8_end_neon4301function hevc_put_hevc_qpel_hv32_8_end_neon
4276 mov x7, #1284302 mov x7, #128
4277 load_qpel_filterh x5, x44303 load_qpel_filterh x5, x4
@@ -4325,6 +4351,25 @@ function ff_hevc_put_hevc_qpel_hv4_8_\suffix, export=1 · 47 unmodified lines
4325 b hevc_put_hevc_qpel_hv4_8_end_neon4351 b hevc_put_hevc_qpel_hv4_8_end_neon
4326endfunc4352endfunc
4327 4353
4354function 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
4371endfunc
4372
4328function ff_hevc_put_hevc_qpel_hv6_8_\suffix, export=14373function ff_hevc_put_hevc_qpel_hv6_8_\suffix, export=1
4329 add w10, w3, #84374 add w10, w3, #8
4330 mov x7, #1284375 mov x7, #128
@@ -4364,6 +4409,25 @@ function ff_hevc_put_hevc_qpel_hv8_8_\suffix, export=1 · 33 unmodified lines
4364 b hevc_put_hevc_qpel_hv8_8_end_neon4409 b hevc_put_hevc_qpel_hv8_8_end_neon
4365endfunc4410endfunc
4366 4411
4412function 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
4429endfunc
4430
4367function ff_hevc_put_hevc_qpel_hv12_8_\suffix, export=14431function ff_hevc_put_hevc_qpel_hv12_8_\suffix, export=1
4368 add w10, w3, #84432 add w10, w3, #8
4369 lsl x10, x10, #74433 lsl x10, x10, #7
@@ -4403,6 +4467,25 @@ function ff_hevc_put_hevc_qpel_hv16_8_\suffix, export=1 · 33 unmodified lines
4403 b hevc_put_hevc_qpel_hv16_8_end_neon4467 b hevc_put_hevc_qpel_hv16_8_end_neon
4404endfunc4468endfunc
4405 4469
4470function 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
4487endfunc
4488
4406function ff_hevc_put_hevc_qpel_hv24_8_\suffix, export=14489function ff_hevc_put_hevc_qpel_hv24_8_\suffix, export=1
4407 stp x4, x5, [sp, #-64]!4490 stp x4, x5, [sp, #-64]!
4408 stp x2, x3, [sp, #16]4491 stp x2, x3, [sp, #16]
@@ -4439,6 +4522,26 @@ function ff_hevc_put_hevc_qpel_hv32_8_\suffix, export=1 · 30 unmodified lines
4439 b hevc_put_hevc_qpel_hv32_8_end_neon4522 b hevc_put_hevc_qpel_hv32_8_end_neon
4440endfunc4523endfunc
4441 4524
4525function 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
4543endfunc
4544
4442function ff_hevc_put_hevc_qpel_hv48_8_\suffix, export=14545function ff_hevc_put_hevc_qpel_hv48_8_\suffix, export=1
4443 stp x4, x5, [sp, #-64]!4546 stp x4, x5, [sp, #-64]!
4444 stp x2, x3, [sp, #16]4547 stp x2, x3, [sp, #16]
@@ -4472,6 +4575,43 @@ function ff_hevc_put_hevc_qpel_hv64_8_\suffix, export=1 · 27 unmodified lines
4472 ldr x30, [sp], #164575 ldr x30, [sp], #16
4473 ret4576 ret
4474endfunc4577endfunc
4578
4579function 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
4595endfunc
4596
4597function 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
4613endfunc
4614
4475.endm4615.endm
4476 4616
4477qpel_hv neon4617qpel_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
67 c->inter.put[0][5][1][0] =67 c->inter.put[0][5][1][0] =
68 c->inter.put[0][6][1][0] = ff_vvc_put_qpel_v8_8_neon;68 c->inter.put[0][6][1][0] = ff_vvc_put_qpel_v8_8_neon;
69 69
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
70 c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon;77 c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon;
71 c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon;78 c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon;
72 c->inter.put_uni[0][3][0][0] = ff_vvc_put_pel_uni_pixels16_8_neon;79 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
103 c->inter.put[0][4][0][1] = ff_vvc_put_qpel_h32_8_neon_i8mm;110 c->inter.put[0][4][0][1] = ff_vvc_put_qpel_h32_8_neon_i8mm;
104 c->inter.put[0][5][0][1] = ff_vvc_put_qpel_h64_8_neon_i8mm;111 c->inter.put[0][5][0][1] = ff_vvc_put_qpel_h64_8_neon_i8mm;
105 c->inter.put[0][6][0][1] = ff_vvc_put_qpel_h128_8_neon_i8mm;112 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;
106 }120 }
107 } else if (bd == 10) {121 } else if (bd == 10) {
108 c->alf.filter[LUMA] = alf_filter_luma_10_neon;122 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