History

aarch64/vvc: Add put_epel_hv

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)

Zhao Zhili committed 2 years ago

Commit 1be5a231 parent 0dcf2043 files · +147 −0Browse files

Unified · Split

3 files
  1. libavcodec/aarch64/h26x/dsp.h +8 −0
  2. libavcodec/aarch64/h26x/epel_neon.S +125 −0
  3. libavcodec/aarch64/vvc/dsp_init.c +14 −0
libavcodec/aarch64/h26x/dsp.h+8−0
@@ -297,4 +297,12 @@ NEON8_FNPROTO_PARTIAL_6(qpel_hv, (int16_t *dst, · 296 unmodified lines
297297 const uint8_t *src, ptrdiff_t srcstride, int height,
298298 const int8_t *hf, const int8_t *vf, int width), _i8mm);
299299
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+
300308 #endif
libavcodec/aarch64/h26x/epel_neon.S+125−0
@@ -72,6 +72,11 @@ endconst · 71 unmodified lines
7272 sxtl v0.8h, v0.8b
7373 .endm
7474
75+.macro vvc_load_epel_filterh freg
76+ ld1 {v0.8b}, [\freg]
77+ sxtl v0.8h, v0.8b
78+.endm
79+
7580 .macro calc_epelh dst, src0, src1, src2, src3
7681 smull \dst\().4s, \src0\().4h, v0.h[0]
7782 smlal \dst\().4s, \src1\().4h, v0.h[1]
@@ -2299,10 +2304,16 @@ endfunc · 2221 unmodified lines
22992304 DISABLE_I8MM
23002305 #endif
23012306
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
23022312
23032313 function hevc_put_hevc_epel_hv4_8_end_neon
23042314 load_epel_filterh x5, x4
23052315 mov x10, #(HEVC_MAX_PB_SIZE * 2)
2316+0:
23062317 ldr d16, [sp]
23072318 ldr d17, [sp, x10]
23082319 add sp, sp, x10, lsl #1
@@ -2339,9 +2350,16 @@ function hevc_put_hevc_epel_hv6_8_end_neon · 30 unmodified lines
23392350 2: ret
23402351 endfunc
23412352
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+
23422359 function hevc_put_hevc_epel_hv8_8_end_neon
23432360 load_epel_filterh x5, x4
23442361 mov x10, #(HEVC_MAX_PB_SIZE * 2)
2362+0:
23452363 ldr q16, [sp]
23462364 ldr q17, [sp, x10]
23472365 add sp, sp, x10, lsl #1
@@ -2379,9 +2397,16 @@ function hevc_put_hevc_epel_hv12_8_end_neon · 31 unmodified lines
23792397 2: ret
23802398 endfunc
23812399
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+
23822406 function hevc_put_hevc_epel_hv16_8_end_neon
23832407 load_epel_filterh x5, x4
23842408 mov x10, #(HEVC_MAX_PB_SIZE * 2)
2409+0:
23852410 ld1 {v16.8h, v17.8h}, [sp], x10
23862411 ld1 {v18.8h, v19.8h}, [sp], x10
23872412 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
24372462 b hevc_put_hevc_epel_hv4_8_end_neon
24382463 endfunc
24392464
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+
24402480 function ff_hevc_put_hevc_epel_hv6_8_\suffix, export=1
24412481 add w10, w3, #3
24422482 lsl x10, x10, #7
@@ -2467,6 +2507,21 @@ function ff_hevc_put_hevc_epel_hv8_8_\suffix, export=1 · 24 unmodified lines
24672507 b hevc_put_hevc_epel_hv8_8_end_neon
24682508 endfunc
24692509
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+
24702525 function ff_hevc_put_hevc_epel_hv12_8_\suffix, export=1
24712526 add w10, w3, #3
24722527 lsl x10, x10, #7
@@ -2497,6 +2552,21 @@ function ff_hevc_put_hevc_epel_hv16_8_\suffix, export=1 · 24 unmodified lines
24972552 b hevc_put_hevc_epel_hv16_8_end_neon
24982553 endfunc
24992554
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+
25002570 function ff_hevc_put_hevc_epel_hv24_8_\suffix, export=1
25012571 add w10, w3, #3
25022572 lsl x10, x10, #7
@@ -2530,6 +2600,24 @@ function ff_hevc_put_hevc_epel_hv32_8_\suffix, export=1 · 27 unmodified lines
25302600 ret
25312601 endfunc
25322602
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+
25332621 function ff_hevc_put_hevc_epel_hv48_8_\suffix, export=1
25342622 stp x4, x5, [sp, #-64]!
25352623 stp x2, x3, [sp, #16]
@@ -2579,6 +2667,43 @@ function ff_hevc_put_hevc_epel_hv64_8_\suffix, export=1 · 43 unmodified lines
25792667 ldr x30, [sp], #16
25802668 ret
25812669 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+
25822707 .endm
25832708
25842709 epel_hv neon
libavcodec/aarch64/vvc/dsp_init.c+14−0
@@ -84,6 +84,13 @@ void ff_vvc_dsp_init_aarch64(VVCDSPContext *const c, const int bd) · 83 unmodified lines
8484 c->inter.put[1][5][0][1] =
8585 c->inter.put[1][6][0][1] = ff_vvc_put_epel_h32_8_neon;
8686
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+
8794 c->inter.put_uni[0][1][0][0] = ff_vvc_put_pel_uni_pixels4_8_neon;
8895 c->inter.put_uni[0][2][0][0] = ff_vvc_put_pel_uni_pixels8_8_neon;
8996 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
134141 c->inter.put[1][4][0][1] = ff_vvc_put_epel_h32_8_neon_i8mm;
135142 c->inter.put[1][5][0][1] = ff_vvc_put_epel_h64_8_neon_i8mm;
136143 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;
137151 }
138152 } else if (bd == 10) {
139153 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