History

aarch64: hevc: Produce epel_hv functions for both plain neon and i8mm

AWS Graviton 3: put_hevc_epel_hv4_8_c: 163.7 put_hevc_epel_hv4_8_neon: 52.5 put_hevc_epel_hv4_8_i8mm: 49.5 put_hevc_epel_hv6_8_c: 292.2 put_hevc_epel_hv6_8_neon: 97.7 put_hevc_epel_hv6_8_i8mm: 101.2 put_hevc_epel_hv8_8_c: 471.0 put_hevc_epel_hv8_8_neon: 106.7 put_hevc_epel_hv8_8_i8mm: 102.5 put_hevc_epel_hv12_8_c: 1030.2 put_hevc_epel_hv12_8_neon: 240.5 put_hevc_epel_hv12_8_i8mm: 215.0 put_hevc_epel_hv16_8_c: 1711.5 put_hevc_epel_hv16_8_neon: 340.2 put_hevc_epel_hv16_8_i8mm: 319.2 put_hevc_epel_hv24_8_c: 3670.0 put_hevc_epel_hv24_8_neon: 702.0 put_hevc_epel_hv24_8_i8mm: 666.5 put_hevc_epel_hv32_8_c: 6785.5 put_hevc_epel_hv32_8_neon: 1247.0 put_hevc_epel_hv32_8_i8mm: 1169.0 put_hevc_epel_hv48_8_c: 14689.7 put_hevc_epel_hv48_8_neon: 2665.2 put_hevc_epel_hv48_8_i8mm: 2740.0 put_hevc_epel_hv64_8_c: 25899.2 put_hevc_epel_hv64_8_neon: 4801.2 put_hevc_epel_hv64_8_i8mm: 4487.7

Martin Storsjö committed 2 years ago

Commit 7bf3d141 parent 5b5666e2 files · +38 −26Browse files

Unified · Split

2 files
  1. libavcodec/aarch64/hevcdsp_epel_neon.S +32 −26
  2. libavcodec/aarch64/hevcdsp_init_aarch64.c +6 −0
libavcodec/aarch64/hevcdsp_epel_neon.S+32−26
@@ -2298,10 +2298,8 @@ function hevc_put_hevc_epel_hv24_8_end_neon · 2297 unmodified lines
22982298 2: ret
22992299 endfunc
23002300
2301−#if HAVE_I8MM
2302−ENABLE_I8MM
2303−
2304−function ff_hevc_put_hevc_epel_hv4_8_neon_i8mm, export=1
2301+.macro epel_hv suffix
2302+function ff_hevc_put_hevc_epel_hv4_8_\suffix, export=1
23052303 add w10, w3, #3
23062304 lsl x10, x10, #7
23072305 sub sp, sp, x10 // tmp_array
@@ -2310,13 +2308,13 @@ function ff_hevc_put_hevc_epel_hv4_8_neon_i8mm, export=1 · 2 unmodified lines
23102308 add x0, sp, #32
23112309 sub x1, x1, x2
23122310 add w3, w3, #3
2313− bl X(ff_hevc_put_hevc_epel_h4_8_neon_i8mm)
2311+ bl X(ff_hevc_put_hevc_epel_h4_8_\suffix)
23142312 ldp x0, x3, [sp, #16]
23152313 ldp x5, x30, [sp], #32
23162314 b hevc_put_hevc_epel_hv4_8_end_neon
23172315 endfunc
23182316
2319−function ff_hevc_put_hevc_epel_hv6_8_neon_i8mm, export=1
2317+function ff_hevc_put_hevc_epel_hv6_8_\suffix, export=1
23202318 add w10, w3, #3
23212319 lsl x10, x10, #7
23222320 sub sp, sp, x10 // tmp_array
@@ -2325,13 +2323,13 @@ function ff_hevc_put_hevc_epel_hv6_8_neon_i8mm, export=1 · 2 unmodified lines
23252323 add x0, sp, #32
23262324 sub x1, x1, x2
23272325 add w3, w3, #3
2328− bl X(ff_hevc_put_hevc_epel_h6_8_neon_i8mm)
2326+ bl X(ff_hevc_put_hevc_epel_h6_8_\suffix)
23292327 ldp x0, x3, [sp, #16]
23302328 ldp x5, x30, [sp], #32
23312329 b hevc_put_hevc_epel_hv6_8_end_neon
23322330 endfunc
23332331
2334−function ff_hevc_put_hevc_epel_hv8_8_neon_i8mm, export=1
2332+function ff_hevc_put_hevc_epel_hv8_8_\suffix, export=1
23352333 add w10, w3, #3
23362334 lsl x10, x10, #7
23372335 sub sp, sp, x10 // tmp_array
@@ -2340,13 +2338,13 @@ function ff_hevc_put_hevc_epel_hv8_8_neon_i8mm, export=1 · 2 unmodified lines
23402338 add x0, sp, #32
23412339 sub x1, x1, x2
23422340 add w3, w3, #3
2343− bl X(ff_hevc_put_hevc_epel_h8_8_neon_i8mm)
2341+ bl X(ff_hevc_put_hevc_epel_h8_8_\suffix)
23442342 ldp x0, x3, [sp, #16]
23452343 ldp x5, x30, [sp], #32
23462344 b hevc_put_hevc_epel_hv8_8_end_neon
23472345 endfunc
23482346
2349−function ff_hevc_put_hevc_epel_hv12_8_neon_i8mm, export=1
2347+function ff_hevc_put_hevc_epel_hv12_8_\suffix, export=1
23502348 add w10, w3, #3
23512349 lsl x10, x10, #7
23522350 sub sp, sp, x10 // tmp_array
@@ -2355,13 +2353,13 @@ function ff_hevc_put_hevc_epel_hv12_8_neon_i8mm, export=1 · 2 unmodified lines
23552353 add x0, sp, #32
23562354 sub x1, x1, x2
23572355 add w3, w3, #3
2358− bl X(ff_hevc_put_hevc_epel_h12_8_neon_i8mm)
2356+ bl X(ff_hevc_put_hevc_epel_h12_8_\suffix)
23592357 ldp x0, x3, [sp, #16]
23602358 ldp x5, x30, [sp], #32
23612359 b hevc_put_hevc_epel_hv12_8_end_neon
23622360 endfunc
23632361
2364−function ff_hevc_put_hevc_epel_hv16_8_neon_i8mm, export=1
2362+function ff_hevc_put_hevc_epel_hv16_8_\suffix, export=1
23652363 add w10, w3, #3
23662364 lsl x10, x10, #7
23672365 sub sp, sp, x10 // tmp_array
@@ -2370,13 +2368,13 @@ function ff_hevc_put_hevc_epel_hv16_8_neon_i8mm, export=1 · 2 unmodified lines
23702368 add x0, sp, #32
23712369 sub x1, x1, x2
23722370 add w3, w3, #3
2373− bl X(ff_hevc_put_hevc_epel_h16_8_neon_i8mm)
2371+ bl X(ff_hevc_put_hevc_epel_h16_8_\suffix)
23742372 ldp x0, x3, [sp, #16]
23752373 ldp x5, x30, [sp], #32
23762374 b hevc_put_hevc_epel_hv16_8_end_neon
23772375 endfunc
23782376
2379−function ff_hevc_put_hevc_epel_hv24_8_neon_i8mm, export=1
2377+function ff_hevc_put_hevc_epel_hv24_8_\suffix, export=1
23802378 add w10, w3, #3
23812379 lsl x10, x10, #7
23822380 sub sp, sp, x10 // tmp_array
@@ -2385,79 +2383,87 @@ function ff_hevc_put_hevc_epel_hv24_8_neon_i8mm, export=1 · 2 unmodified lines
23852383 add x0, sp, #32
23862384 sub x1, x1, x2
23872385 add w3, w3, #3
2388− bl X(ff_hevc_put_hevc_epel_h24_8_neon_i8mm)
2386+ bl X(ff_hevc_put_hevc_epel_h24_8_\suffix)
23892387 ldp x0, x3, [sp, #16]
23902388 ldp x5, x30, [sp], #32
23912389 b hevc_put_hevc_epel_hv24_8_end_neon
23922390 endfunc
23932391
2394−function ff_hevc_put_hevc_epel_hv32_8_neon_i8mm, export=1
2392+function ff_hevc_put_hevc_epel_hv32_8_\suffix, export=1
23952393 stp x4, x5, [sp, #-64]!
23962394 stp x2, x3, [sp, #16]
23972395 stp x0, x1, [sp, #32]
23982396 str x30, [sp, #48]
23992397 mov x6, #16
2400− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2398+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24012399 ldp x0, x1, [sp, #32]
24022400 ldp x2, x3, [sp, #16]
24032401 ldp x4, x5, [sp], #48
24042402 add x0, x0, #32
24052403 add x1, x1, #16
24062404 mov x6, #16
2407− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2405+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24082406 ldr x30, [sp], #16
24092407 ret
24102408 endfunc
24112409
2412−function ff_hevc_put_hevc_epel_hv48_8_neon_i8mm, export=1
2410+function ff_hevc_put_hevc_epel_hv48_8_\suffix, export=1
24132411 stp x4, x5, [sp, #-64]!
24142412 stp x2, x3, [sp, #16]
24152413 stp x0, x1, [sp, #32]
24162414 str x30, [sp, #48]
24172415 mov x6, #24
2418− bl X(ff_hevc_put_hevc_epel_hv24_8_neon_i8mm)
2416+ bl X(ff_hevc_put_hevc_epel_hv24_8_\suffix)
24192417 ldp x0, x1, [sp, #32]
24202418 ldp x2, x3, [sp, #16]
24212419 ldp x4, x5, [sp], #48
24222420 add x0, x0, #48
24232421 add x1, x1, #24
24242422 mov x6, #24
2425− bl X(ff_hevc_put_hevc_epel_hv24_8_neon_i8mm)
2423+ bl X(ff_hevc_put_hevc_epel_hv24_8_\suffix)
24262424 ldr x30, [sp], #16
24272425 ret
24282426 endfunc
24292427
2430−function ff_hevc_put_hevc_epel_hv64_8_neon_i8mm, export=1
2428+function ff_hevc_put_hevc_epel_hv64_8_\suffix, export=1
24312429 stp x4, x5, [sp, #-64]!
24322430 stp x2, x3, [sp, #16]
24332431 stp x0, x1, [sp, #32]
24342432 str x30, [sp, #48]
24352433 mov x6, #16
2436− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2434+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24372435 ldp x4, x5, [sp]
24382436 ldp x2, x3, [sp, #16]
24392437 ldp x0, x1, [sp, #32]
24402438 add x0, x0, #32
24412439 add x1, x1, #16
24422440 mov x6, #16
2443− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2441+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24442442 ldp x4, x5, [sp]
24452443 ldp x2, x3, [sp, #16]
24462444 ldp x0, x1, [sp, #32]
24472445 add x0, x0, #64
24482446 add x1, x1, #32
24492447 mov x6, #16
2450− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2448+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24512449 ldp x0, x1, [sp, #32]
24522450 ldp x2, x3, [sp, #16]
24532451 ldp x4, x5, [sp], #48
24542452 add x0, x0, #96
24552453 add x1, x1, #48
24562454 mov x6, #16
2457− bl X(ff_hevc_put_hevc_epel_hv16_8_neon_i8mm)
2455+ bl X(ff_hevc_put_hevc_epel_hv16_8_\suffix)
24582456 ldr x30, [sp], #16
24592457 ret
24602458 endfunc
2459+.endm
2460+
2461+epel_hv neon
2462+
2463+#if HAVE_I8MM
2464+ENABLE_I8MM
2465+
2466+epel_hv neon_i8mm
24612467
24622468 DISABLE_I8MM
24632469 #endif
libavcodec/aarch64/hevcdsp_init_aarch64.c+6−0
@@ -227,6 +227,10 @@ NEON8_FNPROTO(epel_h, (int16_t *dst, · 226 unmodified lines
227227 const uint8_t *_src, ptrdiff_t _srcstride,
228228 int height, intptr_t mx, intptr_t my, int width),);
229229
230+NEON8_FNPROTO(epel_hv, (int16_t *dst,
231+ const uint8_t *src, ptrdiff_t srcstride,
232+ int height, intptr_t mx, intptr_t my, int width), );
233+
230234 NEON8_FNPROTO(epel_h, (int16_t *dst,
231235 const uint8_t *_src, ptrdiff_t _srcstride,
232236 int height, intptr_t mx, intptr_t my, int width), _i8mm);
@@ -407,6 +411,8 @@ av_cold void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth) · 174 unmodified lines
407411 NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel, 0, 1, epel_h,);
408412 NEON8_FNASSIGN_SHARED_32(c->put_hevc_epel_uni_w, 0, 1, epel_uni_w_h,);
409413
414+ NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv,);
415+
410416 if (have_i8mm(cpu_flags)) {
411417 NEON8_FNASSIGN(c->put_hevc_epel, 0, 1, epel_h, _i8mm);
412418 NEON8_FNASSIGN(c->put_hevc_epel, 1, 1, epel_hv, _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