On Apple M1: put_chroma_hv_8_4x4_c: 1.7 ( 1.00x) put_chroma_hv_8_4x4_neon: 0.2 ( 7.67x) put_chroma_hv_8_8x8_c: 5.5 ( 1.00x) put_chroma_hv_8_8x8_neon: 0.5 (11.53x) put_chroma_hv_8_16x16_c: 18.5 ( 1.00x) put_chroma_hv_8_16x16_neon: 1.5 (12.53x) put_chroma_hv_8_32x32_c: 72.5 ( 1.00x) put_chroma_hv_8_32x32_neon: 4.7 (15.34x) put_chroma_hv_8_64x64_c: 274.0 ( 1.00x) put_chroma_hv_8_64x64_neon: 18.5 (14.83x) put_chroma_hv_8_128x128_c: 1058.7 ( 1.00x) put_chroma_hv_8_128x128_neon: 75.2 (14.07x) On Android Pixel 8 Pro: put_chroma_hv_8_4x4_c: 1.2 ( 1.00x) put_chroma_hv_8_4x4_neon: 0.0 ( 0.00x) put_chroma_hv_8_4x4_i8mm: 0.2 ( 5.00x) put_chroma_hv_8_8x8_c: 4.0 ( 1.00x) put_chroma_hv_8_8x8_neon: 0.5 ( 8.00x) put_chroma_hv_8_8x8_i8mm: 0.5 ( 8.00x) put_chroma_hv_8_16x16_c: 15.2 ( 1.00x) put_chroma_hv_8_16x16_neon: 2.5 ( 6.10x) put_chroma_hv_8_16x16_i8mm: 2.2 ( 6.78x) put_chroma_hv_8_32x32_c: 61.0 ( 1.00x) put_chroma_hv_8_32x32_neon: 9.8 ( 6.26x) put_chroma_hv_8_32x32_i8mm: 8.5 ( 7.18x) put_chroma_hv_8_64x64_c: 229.5 ( 1.00x) put_chroma_hv_8_64x64_neon: 38.5 ( 5.96x) put_chroma_hv_8_64x64_i8mm: 34.0 ( 6.75x) put_chroma_hv_8_128x128_c: 919.8 ( 1.00x) put_chroma_hv_8_128x128_neon: 154.5 ( 5.95x) put_chroma_hv_8_128x128_i8mm: 140.0 ( 6.57x)
Showing the changes to libavcodec (3 of 3 files). Show all
Unified · Split
| @@ -297,4 +297,12 @@ NEON8_FNPROTO_PARTIAL_6(qpel_hv, (int16_t *dst, · 296 unmodified lines | |||
| 297 | const uint8_t *src, ptrdiff_t srcstride, int height, | 297 | const uint8_t *src, ptrdiff_t srcstride, int height, |
| 298 | const int8_t *hf, const int8_t *vf, int width), _i8mm); | 298 | const int8_t *hf, const int8_t *vf, int width), _i8mm); |
| 299 | 299 | ||
| 300 | NEON8_FNPROTO_PARTIAL_6(epel_hv, (int16_t *dst, | ||
| 301 | const uint8_t *src, ptrdiff_t srcstride, int height, | ||
| 302 | const int8_t *hf, const int8_t *vf, int width),); | ||
| 303 | |||
| 304 | NEON8_FNPROTO_PARTIAL_6(epel_hv, (int16_t *dst, | ||
| 305 | const uint8_t *src, ptrdiff_t srcstride, int height, | ||
| 306 | const int8_t *hf, const int8_t *vf, int width), _i8mm); | ||
| 307 | |||
| 300 | #endif | 308 | #endif |
| @@ -72,6 +72,11 @@ endconst · 71 unmodified lines | |||
| 72 | sxtl v0.8h, v0.8b | 72 | sxtl v0.8h, v0.8b |
| 73 | .endm | 73 | .endm |
| 74 | 74 | ||
| 75 | .macro vvc_load_epel_filterh freg | ||
| 76 | ld1 {v0.8b}, [\freg] | ||
| 77 | sxtl v0.8h, v0.8b | ||
| 78 | .endm | ||
| 79 | |||
| 75 | .macro calc_epelh dst, src0, src1, src2, src3 | 80 | .macro calc_epelh dst, src0, src1, src2, src3 |
| 76 | smull \dst\().4s, \src0\().4h, v0.h[0] | 81 | smull \dst\().4s, \src0\().4h, v0.h[0] |
| 77 | smlal \dst\().4s, \src1\().4h, v0.h[1] | 82 | smlal \dst\().4s, \src1\().4h, v0.h[1] |
| @@ -2299,10 +2304,16 @@ endfunc · 2221 unmodified lines | |||
| 2299 | DISABLE_I8MM | 2304 | DISABLE_I8MM |
| 2300 | #endif | 2305 | #endif |
| 2301 | 2306 | ||
| 2307 | function vvc_put_epel_hv4_8_end_neon | ||
| 2308 | vvc_load_epel_filterh x5 | ||
| 2309 | mov x10, #(VVC_MAX_PB_SIZE * 2) | ||
| 2310 | b 0f | ||
| 2311 | endfunc | ||
| 2302 | 2312 | ||
| 2303 | function hevc_put_hevc_epel_hv4_8_end_neon | 2313 | function hevc_put_hevc_epel_hv4_8_end_neon |
| 2304 | load_epel_filterh x5, x4 | 2314 | load_epel_filterh x5, x4 |
| 2305 | mov x10, #(HEVC_MAX_PB_SIZE * 2) | 2315 | mov x10, #(HEVC_MAX_PB_SIZE * 2) |
| 2316 | 0: | ||
| 2306 | ldr d16, [sp] | 2317 | ldr d16, [sp] |
| 2307 | ldr d17, [sp, x10] | 2318 | ldr d17, [sp, x10] |
| 2308 | add sp, sp, x10, lsl #1 | 2319 | add sp, sp, x10, lsl #1 |
| @@ -2339,9 +2350,16 @@ function hevc_put_hevc_epel_hv6_8_end_neon · 30 unmodified lines | |||
| 2339 | 2: ret | 2350 | 2: ret |
| 2340 | endfunc | 2351 | endfunc |
| 2341 | 2352 | ||
| 2353 | function vvc_put_epel_hv8_8_end_neon | ||
| 2354 | vvc_load_epel_filterh x5 | ||
| 2355 | mov x10, #(VVC_MAX_PB_SIZE * 2) | ||
| 2356 | b 0f | ||
| 2357 | endfunc | ||
| 2358 | |||
| 2342 | function hevc_put_hevc_epel_hv8_8_end_neon | 2359 | function hevc_put_hevc_epel_hv8_8_end_neon |
| 2343 | load_epel_filterh x5, x4 | 2360 | load_epel_filterh x5, x4 |
| 2344 | mov x10, #(HEVC_MAX_PB_SIZE * 2) | 2361 | mov x10, #(HEVC_MAX_PB_SIZE * 2) |
| 2362 | 0: | ||
| 2345 | ldr q16, [sp] | 2363 | ldr q16, [sp] |
| 2346 | ldr q17, [sp, x10] | 2364 | ldr q17, [sp, x10] |
| 2347 | add sp, sp, x10, lsl #1 | 2365 | add sp, sp, x10, lsl #1 |
| @@ -2379,9 +2397,16 @@ function hevc_put_hevc_epel_hv12_8_end_neon · 31 unmodified lines | |||
| 2379 | 2: ret | 2397 | 2: ret |
| 2380 | endfunc | 2398 | endfunc |
| 2381 | 2399 | ||
| 2400 | function vvc_put_epel_hv16_8_end_neon | ||
| 2401 | vvc_load_epel_filterh x5 | ||
| 2402 | mov x10, #(VVC_MAX_PB_SIZE * 2) | ||
| 2403 | b 0f | ||
| 2404 | endfunc | ||
| 2405 | |||
| 2382 | function hevc_put_hevc_epel_hv16_8_end_neon | 2406 | function hevc_put_hevc_epel_hv16_8_end_neon |
| 2383 | load_epel_filterh x5, x4 | 2407 | load_epel_filterh x5, x4 |
| 2384 | mov x10, #(HEVC_MAX_PB_SIZE * 2) | 2408 | mov x10, #(HEVC_MAX_PB_SIZE * 2) |
| 2409 | 0: | ||
| 2385 | ld1 {v16.8h, v17.8h}, [sp], x10 | 2410 | ld1 {v16.8h, v17.8h}, [sp], x10 |
| 2386 | ld1 {v18.8h, v19.8h}, [sp], x10 | 2411 | ld1 {v18.8h, v19.8h}, [sp], x10 |
| 2387 | ld1 {v20.8h, v21.8h}, [sp], x10 | 2412 | ld1 {v20.8h, v21.8h}, [sp], x10 |
| @@ -2437,6 +2462,21 @@ function ff_hevc_put_hevc_epel_hv4_8_\suffix, export=1 · 49 unmodified lines | |||
| 2437 | b hevc_put_hevc_epel_hv4_8_end_neon | 2462 | b hevc_put_hevc_epel_hv4_8_end_neon |
| 2438 | endfunc | 2463 | endfunc |
| 2439 | 2464 | ||
| 2465 | function ff_vvc_put_epel_hv4_8_\suffix, export=1 | ||
| 2466 | add w10, w3, #3 | ||
| 2467 | lsl x10, x10, #8 | ||
| 2468 | sub sp, sp, x10 // tmp_array | ||
| 2469 | stp x5, x30, [sp, #-32]! | ||
| 2470 | stp x0, x3, [sp, #16] | ||
| 2471 | add x0, sp, #32 | ||
| 2472 | sub x1, x1, x2 | ||
| 2473 | add w3, w3, #3 | ||
| 2474 | bl X(ff_vvc_put_epel_h4_8_\suffix) | ||
| 2475 | ldp x0, x3, [sp, #16] | ||
| 2476 | ldp x5, x30, [sp], #32 | ||
| 2477 | b vvc_put_epel_hv4_8_end_neon | ||
| 2478 | endfunc | ||
| 2479 | |||
| 2440 | function ff_hevc_put_hevc_epel_hv6_8_\suffix, export=1 | 2480 | function ff_hevc_put_hevc_epel_hv6_8_\suffix, export=1 |
| 2441 | add w10, w3, #3 | 2481 | add w10, w3, #3 |
| 2442 | lsl x10, x10, #7 | 2482 | lsl x10, x10, #7 |
| @@ -2467,6 +2507,21 @@ function ff_hevc_put_hevc_epel_hv8_8_\suffix, export=1 · 24 unmodified lines | |||
| 2467 | b hevc_put_hevc_epel_hv8_8_end_neon | 2507 | b hevc_put_hevc_epel_hv8_8_end_neon |
| 2468 | endfunc | 2508 | endfunc |
| 2469 | 2509 | ||
| 2510 | function ff_vvc_put_epel_hv8_8_\suffix, export=1 | ||
| 2511 | add w10, w3, #3 | ||
| 2512 | lsl x10, x10, #8 | ||
| 2513 | sub sp, sp, x10 // tmp_array | ||
| 2514 | stp x5, x30, [sp, #-32]! | ||
| 2515 | stp x0, x3, [sp, #16] | ||
| 2516 | add x0, sp, #32 | ||
| 2517 | sub x1, x1, x2 | ||
| 2518 | add w3, w3, #3 | ||
| 2519 | bl X(ff_vvc_put_epel_h8_8_\suffix) | ||
| 2520 | ldp x0, x3, [sp, #16] | ||
| 2521 | ldp x5, x30, [sp], #32 | ||
| 2522 | b vvc_put_epel_hv8_8_end_neon | ||
| 2523 | endfunc | ||
| 2524 | |||
| 2470 | function ff_hevc_put_hevc_epel_hv12_8_\suffix, export=1 | 2525 | function ff_hevc_put_hevc_epel_hv12_8_\suffix, export=1 |
| 2471 | add w10, w3, #3 | 2526 | add w10, w3, #3 |
| 2472 | lsl x10, x10, #7 | 2527 | lsl x10, x10, #7 |
| @@ -2497,6 +2552,21 @@ function ff_hevc_put_hevc_epel_hv16_8_\suffix, export=1 · 24 unmodified lines | |||
| 2497 | b hevc_put_hevc_epel_hv16_8_end_neon | 2552 | b hevc_put_hevc_epel_hv16_8_end_neon |
| 2498 | endfunc | 2553 | endfunc |
| 2499 | 2554 | ||
| 2555 | function ff_vvc_put_epel_hv16_8_\suffix, export=1 | ||
| 2556 | add w10, w3, #3 | ||
| 2557 | lsl x10, x10, #8 | ||
| 2558 | sub sp, sp, x10 // tmp_array | ||
| 2559 | stp x5, x30, [sp, #-32]! | ||
| 2560 | stp x0, x3, [sp, #16] | ||
| 2561 | add x0, sp, #32 | ||
| 2562 | sub x1, x1, x2 | ||
| 2563 | add w3, w3, #3 | ||
| 2564 | bl X(ff_vvc_put_epel_h16_8_\suffix) | ||
| 2565 | ldp x0, x3, [sp, #16] | ||
| 2566 | ldp x5, x30, [sp], #32 | ||
| 2567 | b vvc_put_epel_hv16_8_end_neon | ||
| 2568 | endfunc | ||
| 2569 | |||
| 2500 | function ff_hevc_put_hevc_epel_hv24_8_\suffix, export=1 | 2570 | function ff_hevc_put_hevc_epel_hv24_8_\suffix, export=1 |
| 2501 | add w10, w3, #3 | 2571 | add w10, w3, #3 |
| 2502 | lsl x10, x10, #7 | 2572 | lsl x10, x10, #7 |
| @@ -2530,6 +2600,24 @@ function ff_hevc_put_hevc_epel_hv32_8_\suffix, export=1 · 27 unmodified lines | |||
| 2530 | ret | 2600 | ret |
| 2531 | endfunc | 2601 | endfunc |
| 2532 | 2602 | ||
| 2603 | function ff_vvc_put_epel_hv32_8_\suffix, export=1 | ||
| 2604 | stp x4, x5, [sp, #-64]! | ||
| 2605 | stp x2, x3, [sp, #16] | ||
| 2606 | stp x0, x1, [sp, #32] | ||
| 2607 | str x30, [sp, #48] | ||
| 2608 | mov x6, #16 | ||
| 2609 | bl X(ff_vvc_put_epel_hv16_8_\suffix) | ||
| 2610 | ldp x0, x1, [sp, #32] | ||
| 2611 | ldp x2, x3, [sp, #16] | ||
| 2612 | ldp x4, x5, [sp], #48 | ||
| 2613 | add x0, x0, #32 | ||
| 2614 | add x1, x1, #16 | ||
| 2615 | mov x6, #16 | ||
| 2616 | bl X(ff_vvc_put_epel_hv16_8_\suffix) | ||
| 2617 | ldr x30, [sp], #16 | ||
| 2618 | ret | ||
| 2619 | endfunc | ||
| 2620 | |||
| 2533 | function ff_hevc_put_hevc_epel_hv48_8_\suffix, export=1 | 2621 | function ff_hevc_put_hevc_epel_hv48_8_\suffix, export=1 |
| 2534 | stp x4, x5, [sp, #-64]! | 2622 | stp x4, x5, [sp, #-64]! |
| 2535 | stp x2, x3, [sp, #16] | 2623 | stp x2, x3, [sp, #16] |
| @@ -2579,6 +2667,43 @@ function ff_hevc_put_hevc_epel_hv64_8_\suffix, export=1 · 43 unmodified lines | |||
| 2579 | ldr x30, [sp], #16 | 2667 | ldr x30, [sp], #16 |
| 2580 | ret | 2668 | ret |
| 2581 | endfunc | 2669 | endfunc |
| 2670 | |||
| 2671 | function ff_vvc_put_epel_hv64_8_\suffix, export=1 | ||
| 2672 | stp x4, x5, [sp, #-64]! | ||
| 2673 | stp x2, x3, [sp, #16] | ||
| 2674 | stp x0, x1, [sp, #32] | ||
| 2675 | str x30, [sp, #48] | ||
| 2676 | mov x6, #32 | ||
| 2677 | bl X(ff_vvc_put_epel_hv32_8_\suffix) | ||
| 2678 | ldp x0, x1, [sp, #32] | ||
| 2679 | ldp x2, x3, [sp, #16] | ||
| 2680 | ldp x4, x5, [sp], #48 | ||
| 2681 | add x0, x0, #64 | ||
| 2682 | add x1, x1, #32 | ||
| 2683 | mov x6, #32 | ||
| 2684 | bl X(ff_vvc_put_epel_hv32_8_\suffix) | ||
| 2685 | ldr x30, [sp], #16 | ||
| 2686 | ret | ||
| 2687 | endfunc | ||
| 2688 | |||
| 2689 | function ff_vvc_put_epel_hv128_8_\suffix, export=1 | ||
| 2690 | stp x4, x5, [sp, #-64]! | ||
| 2691 | stp x2, x3, [sp, #16] | ||
| 2692 | stp x0, x1, [sp, #32] | ||
| 2693 | str x30, [sp, #48] | ||
| 2694 | mov x6, #64 | ||
| 2695 | bl X(ff_vvc_put_epel_hv64_8_\suffix) | ||
| 2696 | ldp x0, x1, [sp, #32] | ||
| 2697 | ldp x2, x3, [sp, #16] | ||
| 2698 | ldp x4, x5, [sp], #48 | ||
| 2699 | add x0, x0, #128 | ||
| 2700 | add x1, x1, #64 | ||
| 2701 | mov x6, #64 | ||
| 2702 | bl X(ff_vvc_put_epel_hv64_8_\suffix) | ||
| 2703 | ldr x30, [sp], #16 | ||
| 2704 | ret | ||
| 2705 | endfunc | ||
| 2706 | |||
| 2582 | .endm | 2707 | .endm |
| 2583 | 2708 | ||
| 2584 | epel_hv neon | 2709 | epel_hv neon |
| @@ -84,6 +84,13 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 83 unmodified lines | |||
| 84 | c->inter.put[1][5][0][1] = | 84 | c->inter.put[1][5][0][1] = |
| 85 | c->inter.put[1][6][0][1] = ff_vvc_put_epel_h32_8_neon; | 85 | c->inter.put[1][6][0][1] = ff_vvc_put_epel_h32_8_neon; |
| 86 | 86 | ||
| 87 | c->inter.put[1][1][1][1] = ff_vvc_put_epel_hv4_8_neon; | ||
| 88 | c->inter.put[1][2][1][1] = ff_vvc_put_epel_hv8_8_neon; | ||
| 89 | c->inter.put[1][3][1][1] = ff_vvc_put_epel_hv16_8_neon; | ||
| 90 | c->inter.put[1][4][1][1] = ff_vvc_put_epel_hv32_8_neon; | ||
| 91 | c->inter.put[1][5][1][1] = ff_vvc_put_epel_hv64_8_neon; | ||
| 92 | c->inter.put[1][6][1][1] = ff_vvc_put_epel_hv128_8_neon; | ||
| 93 | |||
| 87 | c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon; | 94 | c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon; |
| 88 | c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon; | 95 | c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon; |
| 89 | c->inter.put_uni[0][3][0][0] = ff_vvc_put_pel_uni_pixels16_8_neon; | 96 | c->inter.put_uni[0][3][0][0] = ff_vvc_put_pel_uni_pixels16_8_neon; |
| @@ -134,6 +141,13 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 44 unmodified lines | |||
| 134 | c->inter.put[1][4][0][1] = ff_vvc_put_epel_h32_8_neon_i8mm; | 141 | c->inter.put[1][4][0][1] = ff_vvc_put_epel_h32_8_neon_i8mm; |
| 135 | c->inter.put[1][5][0][1] = ff_vvc_put_epel_h64_8_neon_i8mm; | 142 | c->inter.put[1][5][0][1] = ff_vvc_put_epel_h64_8_neon_i8mm; |
| 136 | c->inter.put[1][6][0][1] = ff_vvc_put_epel_h128_8_neon_i8mm; | 143 | c->inter.put[1][6][0][1] = ff_vvc_put_epel_h128_8_neon_i8mm; |
| 144 | |||
| 145 | c->inter.put[1][1][1][1] = ff_vvc_put_epel_hv4_8_neon_i8mm; | ||
| 146 | c->inter.put[1][2][1][1] = ff_vvc_put_epel_hv8_8_neon_i8mm; | ||
| 147 | c->inter.put[1][3][1][1] = ff_vvc_put_epel_hv16_8_neon_i8mm; | ||
| 148 | c->inter.put[1][4][1][1] = ff_vvc_put_epel_hv32_8_neon_i8mm; | ||
| 149 | c->inter.put[1][5][1][1] = ff_vvc_put_epel_hv64_8_neon_i8mm; | ||
| 150 | c->inter.put[1][6][1][1] = ff_vvc_put_epel_hv128_8_neon_i8mm; | ||
| 137 | } | 151 | } |
| 138 | } else if (bd == 10) { | 152 | } else if (bd == 10) { |
| 139 | c->alf.filter[LUMA] = alf_filter_luma_10_neon; | 153 | c->alf.filter[LUMA] = alf_filter_luma_10_neon; |