History

aarch64: hevc: Split the qpel_*_hv functions into two parts

The first horizontal filter can use either i8mm or plain neon versions, while the second part is a pure neon implementation.

Martin Storsjö committed 2 years ago

Commit 4063e501 parent ad01d061 file · +86 −8Browse files

Unified · Split

libavcodec/aarch64/hevcdsp_qpel_neon.S+86−8
@@ -2166,6 +2166,10 @@ function ff_hevc_put_hevc_qpel_uni_hv4_8_neon_i8mm, export=1 · 2165 unmodified lines
2166 ldp x4, x6, [sp, #16]2166 ldp x4, x6, [sp, #16]
2167 ldp x0, x1, [sp, #32]2167 ldp x0, x1, [sp, #32]
2168 ldr x30, [sp], #482168 ldr x30, [sp], #48
2169 b hevc_put_hevc_qpel_uni_hv4_8_end_neon
2170endfunc
2171
2172function hevc_put_hevc_qpel_uni_hv4_8_end_neon
2169 mov x9, #(MAX_PB_SIZE * 2)2173 mov x9, #(MAX_PB_SIZE * 2)
2170 load_qpel_filterh x6, x52174 load_qpel_filterh x6, x5
2171 ldr d16, [sp]2175 ldr d16, [sp]
@@ -2208,6 +2212,10 @@ function ff_hevc_put_hevc_qpel_uni_hv6_8_neon_i8mm, export=1 · 36 unmodified lines
2208 ldp x4, x6, [sp, #16]2212 ldp x4, x6, [sp, #16]
2209 ldp x0, x1, [sp, #32]2213 ldp x0, x1, [sp, #32]
2210 ldr x30, [sp], #482214 ldr x30, [sp], #48
2215 b hevc_put_hevc_qpel_uni_hv6_8_end_neon
2216endfunc
2217
2218function hevc_put_hevc_qpel_uni_hv6_8_end_neon
2211 mov x9, #(MAX_PB_SIZE * 2)2219 mov x9, #(MAX_PB_SIZE * 2)
2212 load_qpel_filterh x6, x52220 load_qpel_filterh x6, x5
2213 sub x1, x1, #42221 sub x1, x1, #4
@@ -2253,6 +2261,10 @@ function ff_hevc_put_hevc_qpel_uni_hv8_8_neon_i8mm, export=1 · 39 unmodified lines
2253 ldp x4, x6, [sp, #16]2261 ldp x4, x6, [sp, #16]
2254 ldp x0, x1, [sp, #32]2262 ldp x0, x1, [sp, #32]
2255 ldr x30, [sp], #482263 ldr x30, [sp], #48
2264 b hevc_put_hevc_qpel_uni_hv8_8_end_neon
2265endfunc
2266
2267function hevc_put_hevc_qpel_uni_hv8_8_end_neon
2256 mov x9, #(MAX_PB_SIZE * 2)2268 mov x9, #(MAX_PB_SIZE * 2)
2257 load_qpel_filterh x6, x52269 load_qpel_filterh x6, x5
2258 ldr q16, [sp]2270 ldr q16, [sp]
@@ -2296,6 +2308,10 @@ function ff_hevc_put_hevc_qpel_uni_hv12_8_neon_i8mm, export=1 · 37 unmodified lines
2296 ldp x4, x6, [sp, #16]2308 ldp x4, x6, [sp, #16]
2297 ldp x0, x1, [sp, #32]2309 ldp x0, x1, [sp, #32]
2298 ldp x7, x30, [sp], #482310 ldp x7, x30, [sp], #48
2311 b hevc_put_hevc_qpel_uni_hv12_8_end_neon
2312endfunc
2313
2314function hevc_put_hevc_qpel_uni_hv12_8_end_neon
2299 mov x9, #(MAX_PB_SIZE * 2)2315 mov x9, #(MAX_PB_SIZE * 2)
2300 load_qpel_filterh x6, x52316 load_qpel_filterh x6, x5
2301 sub x1, x1, #82317 sub x1, x1, #8
@@ -2339,7 +2355,10 @@ function ff_hevc_put_hevc_qpel_uni_hv16_8_neon_i8mm, export=1 · 37 unmodified lines
2339 ldp x4, x6, [sp, #16]2355 ldp x4, x6, [sp, #16]
2340 ldp x0, x1, [sp, #32]2356 ldp x0, x1, [sp, #32]
2341 ldp x7, x30, [sp], #482357 ldp x7, x30, [sp], #48
2342.Lqpel_uni_hv16_loop:2358 b hevc_put_hevc_qpel_uni_hv16_8_end_neon
2359endfunc
2360
2361function hevc_put_hevc_qpel_uni_hv16_8_end_neon
2343 mov x9, #(MAX_PB_SIZE * 2)2362 mov x9, #(MAX_PB_SIZE * 2)
2344 load_qpel_filterh x6, x52363 load_qpel_filterh x6, x5
2345 sub w12, w9, w7, lsl #12364 sub w12, w9, w7, lsl #1
@@ -2414,7 +2433,7 @@ function ff_hevc_put_hevc_qpel_uni_hv32_8_neon_i8mm, export=1 · 68 unmodified lines
2414 ldp x4, x6, [sp, #16]2433 ldp x4, x6, [sp, #16]
2415 ldp x0, x1, [sp, #32]2434 ldp x0, x1, [sp, #32]
2416 ldp x7, x30, [sp], #482435 ldp x7, x30, [sp], #48
2417 b .Lqpel_uni_hv16_loop2436 b hevc_put_hevc_qpel_uni_hv16_8_end_neon
2418endfunc2437endfunc
2419 2438
2420function ff_hevc_put_hevc_qpel_uni_hv48_8_neon_i8mm, export=12439function ff_hevc_put_hevc_qpel_uni_hv48_8_neon_i8mm, export=1
@@ -2434,7 +2453,7 @@ function ff_hevc_put_hevc_qpel_uni_hv48_8_neon_i8mm, export=1 · 13 unmodified lines
2434 ldp x4, x6, [sp, #16]2453 ldp x4, x6, [sp, #16]
2435 ldp x0, x1, [sp, #32]2454 ldp x0, x1, [sp, #32]
2436 ldp x7, x30, [sp], #482455 ldp x7, x30, [sp], #48
2437 b .Lqpel_uni_hv16_loop2456 b hevc_put_hevc_qpel_uni_hv16_8_end_neon
2438endfunc2457endfunc
2439 2458
2440function ff_hevc_put_hevc_qpel_uni_hv64_8_neon_i8mm, export=12459function ff_hevc_put_hevc_qpel_uni_hv64_8_neon_i8mm, export=1
@@ -2454,7 +2473,7 @@ function ff_hevc_put_hevc_qpel_uni_hv64_8_neon_i8mm, export=1 · 13 unmodified lines
2454 ldp x4, x6, [sp, #16]2473 ldp x4, x6, [sp, #16]
2455 ldp x0, x1, [sp, #32]2474 ldp x0, x1, [sp, #32]
2456 ldp x7, x30, [sp], #482475 ldp x7, x30, [sp], #48
2457 b .Lqpel_uni_hv16_loop2476 b hevc_put_hevc_qpel_uni_hv16_8_end_neon
2458endfunc2477endfunc
2459DISABLE_I8MM2478DISABLE_I8MM
2460#endif2479#endif
@@ -3776,6 +3795,10 @@ function ff_hevc_put_hevc_qpel_hv4_8_neon_i8mm, export=1 · 1315 unmodified lines
3776 bl X(ff_hevc_put_hevc_qpel_h4_8_neon_i8mm)3795 bl X(ff_hevc_put_hevc_qpel_h4_8_neon_i8mm)
3777 ldp x0, x3, [sp, #16]3796 ldp x0, x3, [sp, #16]
3778 ldp x5, x30, [sp], #323797 ldp x5, x30, [sp], #32
3798 b hevc_put_hevc_qpel_hv4_8_end_neon
3799endfunc
3800
3801function hevc_put_hevc_qpel_hv4_8_end_neon
3779 load_qpel_filterh x5, x43802 load_qpel_filterh x5, x4
3780 ldr d16, [sp]3803 ldr d16, [sp]
3781 ldr d17, [sp, x7]3804 ldr d17, [sp, x7]
@@ -3813,6 +3836,10 @@ function ff_hevc_put_hevc_qpel_hv6_8_neon_i8mm, export=1 · 31 unmodified lines
3813 bl X(ff_hevc_put_hevc_qpel_h6_8_neon_i8mm)3836 bl X(ff_hevc_put_hevc_qpel_h6_8_neon_i8mm)
3814 ldp x0, x3, [sp, #16]3837 ldp x0, x3, [sp, #16]
3815 ldp x5, x30, [sp], #323838 ldp x5, x30, [sp], #32
3839 b hevc_put_hevc_qpel_hv6_8_end_neon
3840endfunc
3841
3842function hevc_put_hevc_qpel_hv6_8_end_neon
3816 mov x8, #1203843 mov x8, #120
3817 load_qpel_filterh x5, x43844 load_qpel_filterh x5, x4
3818 ldr q16, [sp]3845 ldr q16, [sp]
@@ -3852,6 +3879,10 @@ function ff_hevc_put_hevc_qpel_hv8_8_neon_i8mm, export=1 · 33 unmodified lines
3852 bl X(ff_hevc_put_hevc_qpel_h8_8_neon_i8mm)3879 bl X(ff_hevc_put_hevc_qpel_h8_8_neon_i8mm)
3853 ldp x0, x3, [sp, #16]3880 ldp x0, x3, [sp, #16]
3854 ldp x5, x30, [sp], #323881 ldp x5, x30, [sp], #32
3882 b hevc_put_hevc_qpel_hv8_8_end_neon
3883endfunc
3884
3885function hevc_put_hevc_qpel_hv8_8_end_neon
3855 mov x7, #1283886 mov x7, #128
3856 load_qpel_filterh x5, x43887 load_qpel_filterh x5, x4
3857 ldr q16, [sp]3888 ldr q16, [sp]
@@ -3890,6 +3921,10 @@ function ff_hevc_put_hevc_qpel_hv12_8_neon_i8mm, export=1 · 32 unmodified lines
3890 bl X(ff_hevc_put_hevc_qpel_h12_8_neon_i8mm)3921 bl X(ff_hevc_put_hevc_qpel_h12_8_neon_i8mm)
3891 ldp x0, x3, [sp, #16]3922 ldp x0, x3, [sp, #16]
3892 ldp x5, x30, [sp], #323923 ldp x5, x30, [sp], #32
3924 b hevc_put_hevc_qpel_hv12_8_end_neon
3925endfunc
3926
3927function hevc_put_hevc_qpel_hv12_8_end_neon
3893 mov x7, #1283928 mov x7, #128
3894 load_qpel_filterh x5, x43929 load_qpel_filterh x5, x4
3895 mov x8, #1123930 mov x8, #112
@@ -3927,6 +3962,10 @@ function ff_hevc_put_hevc_qpel_hv16_8_neon_i8mm, export=1 · 31 unmodified lines
3927 bl X(ff_hevc_put_hevc_qpel_h16_8_neon_i8mm)3962 bl X(ff_hevc_put_hevc_qpel_h16_8_neon_i8mm)
3928 ldp x0, x3, [sp, #16]3963 ldp x0, x3, [sp, #16]
3929 ldp x5, x30, [sp], #323964 ldp x5, x30, [sp], #32
3965 b hevc_put_hevc_qpel_hv16_8_end_neon
3966endfunc
3967
3968function hevc_put_hevc_qpel_hv16_8_end_neon
3930 mov x7, #1283969 mov x7, #128
3931 load_qpel_filterh x5, x43970 load_qpel_filterh x5, x4
3932 ld1 {v16.8h, v17.8h}, [sp], x73971 ld1 {v16.8h, v17.8h}, [sp], x7
@@ -3979,6 +4018,10 @@ function ff_hevc_put_hevc_qpel_hv32_8_neon_i8mm, export=1 · 46 unmodified lines
3979 bl X(ff_hevc_put_hevc_qpel_h32_8_neon_i8mm)4018 bl X(ff_hevc_put_hevc_qpel_h32_8_neon_i8mm)
3980 ldp x0, x3, [sp, #16]4019 ldp x0, x3, [sp, #16]
3981 ldp x5, x30, [sp], #324020 ldp x5, x30, [sp], #32
4021 b hevc_put_hevc_qpel_hv32_8_end_neon
4022endfunc
4023
4024function hevc_put_hevc_qpel_hv32_8_end_neon
3982 mov x7, #1284025 mov x7, #128
3983 load_qpel_filterh x5, x44026 load_qpel_filterh x5, x4
39840: mov x8, sp // src40270: mov x8, sp // src
@@ -4127,6 +4170,10 @@ endfunc · 142 unmodified lines
4127 4170
4128function ff_hevc_put_hevc_qpel_uni_w_hv4_8_neon_i8mm, export=14171function ff_hevc_put_hevc_qpel_uni_w_hv4_8_neon_i8mm, export=1
4129 QPEL_UNI_W_HV_HEADER 44172 QPEL_UNI_W_HV_HEADER 4
4173 b hevc_put_hevc_qpel_uni_w_hv4_8_end_neon
4174endfunc
4175
4176function hevc_put_hevc_qpel_uni_w_hv4_8_end_neon
4130 ldr d16, [sp]4177 ldr d16, [sp]
4131 ldr d17, [sp, x10]4178 ldr d17, [sp, x10]
4132 add sp, sp, x10, lsl #14179 add sp, sp, x10, lsl #1
@@ -4217,6 +4264,10 @@ endfunc · 84 unmodified lines
4217 4264
4218function ff_hevc_put_hevc_qpel_uni_w_hv8_8_neon_i8mm, export=14265function ff_hevc_put_hevc_qpel_uni_w_hv8_8_neon_i8mm, export=1
4219 QPEL_UNI_W_HV_HEADER 84266 QPEL_UNI_W_HV_HEADER 8
4267 b hevc_put_hevc_qpel_uni_w_hv8_8_end_neon
4268endfunc
4269
4270function hevc_put_hevc_qpel_uni_w_hv8_8_end_neon
4220 ldr q16, [sp]4271 ldr q16, [sp]
4221 ldr q17, [sp, x10]4272 ldr q17, [sp, x10]
4222 add sp, sp, x10, lsl #14273 add sp, sp, x10, lsl #1
@@ -4327,6 +4378,10 @@ endfunc · 104 unmodified lines
4327 4378
4328function ff_hevc_put_hevc_qpel_uni_w_hv16_8_neon_i8mm, export=14379function ff_hevc_put_hevc_qpel_uni_w_hv16_8_neon_i8mm, export=1
4329 QPEL_UNI_W_HV_HEADER 164380 QPEL_UNI_W_HV_HEADER 16
4381 b hevc_put_hevc_qpel_uni_w_hv16_8_end_neon
4382endfunc
4383
4384function hevc_put_hevc_qpel_uni_w_hv16_8_end_neon
4330 ldp q16, q1, [sp]4385 ldp q16, q1, [sp]
4331 add sp, sp, x104386 add sp, sp, x10
4332 ldp q17, q2, [sp]4387 ldp q17, q2, [sp]
@@ -4430,6 +4485,10 @@ endfunc · 97 unmodified lines
4430 4485
4431function ff_hevc_put_hevc_qpel_uni_w_hv32_8_neon_i8mm, export=14486function ff_hevc_put_hevc_qpel_uni_w_hv32_8_neon_i8mm, export=1
4432 QPEL_UNI_W_HV_HEADER 324487 QPEL_UNI_W_HV_HEADER 32
4488 b hevc_put_hevc_qpel_uni_w_hv32_8_end_neon
4489endfunc
4490
4491function hevc_put_hevc_qpel_uni_w_hv32_8_end_neon
4433 mov x11, sp4492 mov x11, sp
4434 mov w12, w224493 mov w12, w22
4435 mov x13, x204494 mov x13, x20
@@ -4543,6 +4602,10 @@ endfunc · 107 unmodified lines
4543 4602
4544function ff_hevc_put_hevc_qpel_uni_w_hv64_8_neon_i8mm, export=14603function ff_hevc_put_hevc_qpel_uni_w_hv64_8_neon_i8mm, export=1
4545 QPEL_UNI_W_HV_HEADER 644604 QPEL_UNI_W_HV_HEADER 64
4605 b hevc_put_hevc_qpel_uni_w_hv64_8_end_neon
4606endfunc
4607
4608function hevc_put_hevc_qpel_uni_w_hv64_8_end_neon
4546 mov x11, sp4609 mov x11, sp
4547 mov w12, w224610 mov w12, w22
4548 mov x13, x204611 mov x13, x20
@@ -4671,6 +4734,10 @@ function ff_hevc_put_hevc_qpel_bi_hv4_8_neon_i8mm, export=1 · 122 unmodified lines
4671 ldp x4, x5, [sp, #16]4734 ldp x4, x5, [sp, #16]
4672 ldp x0, x1, [sp, #32]4735 ldp x0, x1, [sp, #32]
4673 ldp x7, x30, [sp], #484736 ldp x7, x30, [sp], #48
4737 b hevc_put_hevc_qpel_bi_hv4_8_end_neon
4738endfunc
4739
4740function hevc_put_hevc_qpel_bi_hv4_8_end_neon
4674 mov x9, #(MAX_PB_SIZE * 2)4741 mov x9, #(MAX_PB_SIZE * 2)
4675 load_qpel_filterh x7, x64742 load_qpel_filterh x7, x6
4676 ld1 {v16.4h}, [sp], x94743 ld1 {v16.4h}, [sp], x9
@@ -4712,6 +4779,10 @@ function ff_hevc_put_hevc_qpel_bi_hv6_8_neon_i8mm, export=1 · 35 unmodified lines
4712 ldp x4, x5, [sp, #16]4779 ldp x4, x5, [sp, #16]
4713 ldp x0, x1, [sp, #32]4780 ldp x0, x1, [sp, #32]
4714 ldp x7, x30, [sp], #484781 ldp x7, x30, [sp], #48
4782 b hevc_put_hevc_qpel_bi_hv6_8_end_neon
4783endfunc
4784
4785function hevc_put_hevc_qpel_bi_hv6_8_end_neon
4715 mov x9, #(MAX_PB_SIZE * 2)4786 mov x9, #(MAX_PB_SIZE * 2)
4716 load_qpel_filterh x7, x64787 load_qpel_filterh x7, x6
4717 sub x1, x1, #44788 sub x1, x1, #4
@@ -4758,6 +4829,10 @@ function ff_hevc_put_hevc_qpel_bi_hv8_8_neon_i8mm, export=1 · 40 unmodified lines
4758 ldp x4, x5, [sp, #16]4829 ldp x4, x5, [sp, #16]
4759 ldp x0, x1, [sp, #32]4830 ldp x0, x1, [sp, #32]
4760 ldp x7, x30, [sp], #484831 ldp x7, x30, [sp], #48
4832 b hevc_put_hevc_qpel_bi_hv8_8_end_neon
4833endfunc
4834
4835function hevc_put_hevc_qpel_bi_hv8_8_end_neon
4761 mov x9, #(MAX_PB_SIZE * 2)4836 mov x9, #(MAX_PB_SIZE * 2)
4762 load_qpel_filterh x7, x64837 load_qpel_filterh x7, x6
4763 ld1 {v16.8h}, [sp], x94838 ld1 {v16.8h}, [sp], x9
@@ -4822,7 +4897,10 @@ function ff_hevc_put_hevc_qpel_bi_hv16_8_neon_i8mm, export=1 · 58 unmodified lines
4822 ldp x0, x1, [sp, #32]4897 ldp x0, x1, [sp, #32]
4823 ldp x7, x30, [sp], #484898 ldp x7, x30, [sp], #48
4824 mov x6, #16 // width4899 mov x6, #16 // width
4825.Lqpel_bi_hv16_loop:4900 b hevc_put_hevc_qpel_bi_hv16_8_end_neon
4901endfunc
4902
4903function hevc_put_hevc_qpel_bi_hv16_8_end_neon
4826 load_qpel_filterh x7, x84904 load_qpel_filterh x7, x8
4827 mov x9, #(MAX_PB_SIZE * 2)4905 mov x9, #(MAX_PB_SIZE * 2)
4828 mov x10, x64906 mov x10, x6
@@ -4908,7 +4986,7 @@ function ff_hevc_put_hevc_qpel_bi_hv32_8_neon_i8mm, export=1 · 79 unmodified lines
4908 ldp x0, x1, [sp, #32]4986 ldp x0, x1, [sp, #32]
4909 ldp x7, x30, [sp], #484987 ldp x7, x30, [sp], #48
4910 mov x6, #32 // width4988 mov x6, #32 // width
4911 b .Lqpel_bi_hv16_loop4989 b hevc_put_hevc_qpel_bi_hv16_8_end_neon
4912endfunc4990endfunc
4913 4991
4914function ff_hevc_put_hevc_qpel_bi_hv48_8_neon_i8mm, export=14992function ff_hevc_put_hevc_qpel_bi_hv48_8_neon_i8mm, export=1
@@ -4929,7 +5007,7 @@ function ff_hevc_put_hevc_qpel_bi_hv48_8_neon_i8mm, export=1 · 14 unmodified lines
4929 ldp x0, x1, [sp, #32]5007 ldp x0, x1, [sp, #32]
4930 ldp x7, x30, [sp], #485008 ldp x7, x30, [sp], #48
4931 mov x6, #48 // width5009 mov x6, #48 // width
4932 b .Lqpel_bi_hv16_loop5010 b hevc_put_hevc_qpel_bi_hv16_8_end_neon
4933endfunc5011endfunc
4934 5012
4935function ff_hevc_put_hevc_qpel_bi_hv64_8_neon_i8mm, export=15013function ff_hevc_put_hevc_qpel_bi_hv64_8_neon_i8mm, export=1
@@ -4950,7 +5028,7 @@ function ff_hevc_put_hevc_qpel_bi_hv64_8_neon_i8mm, export=1 · 14 unmodified lines
4950 ldp x0, x1, [sp, #32]5028 ldp x0, x1, [sp, #32]
4951 ldp x7, x30, [sp], #485029 ldp x7, x30, [sp], #48
4952 mov x6, #64 // width5030 mov x6, #64 // width
4953 b .Lqpel_bi_hv16_loop5031 b hevc_put_hevc_qpel_bi_hv16_8_end_neon
4954endfunc5032endfunc
4955 5033
4956DISABLE_I8MM5034DISABLE_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