Some functions have slightly different indentation styles; try to match the surrounding code. libavcodec/aarch64/vc1dsp_neon.S is skipped here, as it intentionally uses a layered indentation style to visually show how different unrolled/interleaved phases fit together.
Unified · Split
| @@ -526,7 +526,7 @@ function ff_h264_h_loop_filter_chroma_mbaff_intra_neon, export=1 · 525 unmodified lines | |||
| 526 | ld1 {v17.8b}, [x4], x1 | 526 | ld1 {v17.8b}, [x4], x1 |
| 527 | ld1 {v19.8b}, [x4], x1 | 527 | ld1 {v19.8b}, [x4], x1 |
| 528 | 528 | ||
| 529 | transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29 | 529 | transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29 |
| 530 | 530 | ||
| 531 | h264_loop_filter_chroma_intra | 531 | h264_loop_filter_chroma_intra |
| 532 | 532 | ||
| @@ -554,7 +554,7 @@ h_loop_filter_chroma420_intra: · 21 unmodified lines | |||
| 554 | ld1 {v17.s}[1], [x4], x1 | 554 | ld1 {v17.s}[1], [x4], x1 |
| 555 | ld1 {v19.s}[1], [x4], x1 | 555 | ld1 {v19.s}[1], [x4], x1 |
| 556 | 556 | ||
| 557 | transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29 | 557 | transpose_4x8B v18, v16, v17, v19, v26, v27, v28, v29 |
| 558 | 558 | ||
| 559 | h264_loop_filter_chroma_intra | 559 | h264_loop_filter_chroma_intra |
| 560 | 560 | ||
| @@ -1017,7 +1017,7 @@ function ff_h264_h_loop_filter_chroma_mbaff_intra_neon_10, export=1 · 456 unmodified lines | |||
| 1017 | ld1 {v16.8h}, [x4], x1 | 1017 | ld1 {v16.8h}, [x4], x1 |
| 1018 | ld1 {v19.8h}, [x9], x1 | 1018 | ld1 {v19.8h}, [x9], x1 |
| 1019 | 1019 | ||
| 1020 | transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29 | 1020 | transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29 |
| 1021 | 1021 | ||
| 1022 | h264_loop_filter_chroma_intra_10 | 1022 | h264_loop_filter_chroma_intra_10 |
| 1023 | 1023 | ||
| @@ -1045,7 +1045,7 @@ h_loop_filter_chroma420_intra_10: · 21 unmodified lines | |||
| 1045 | ld1 {v19.4h}, [x4], x1 | 1045 | ld1 {v19.4h}, [x4], x1 |
| 1046 | ld1 {v19.d}[1], [x9], x1 | 1046 | ld1 {v19.d}[1], [x9], x1 |
| 1047 | 1047 | ||
| 1048 | transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29 | 1048 | transpose_4x8H v18, v16, v17, v19, v26, v27, v28, v29 |
| 1049 | 1049 | ||
| 1050 | h264_loop_filter_chroma_intra_10 | 1050 | h264_loop_filter_chroma_intra_10 |
| 1051 | 1051 | ||
| @@ -580,8 +580,8 @@ function \type\()_h264_qpel16_hv_lowpass_l2_neon · 579 unmodified lines | |||
| 580 | endfunc | 580 | endfunc |
| 581 | .endm | 581 | .endm |
| 582 | 582 | ||
| 583 | h264_qpel16_hv put | 583 | h264_qpel16_hv put |
| 584 | h264_qpel16_hv avg | 584 | h264_qpel16_hv avg |
| 585 | 585 | ||
| 586 | .macro h264_qpel8 type | 586 | .macro h264_qpel8 type |
| 587 | function ff_\type\()_h264_qpel8_mc10_neon, export=1 | 587 | function ff_\type\()_h264_qpel8_mc10_neon, export=1 |
| @@ -759,8 +759,8 @@ function ff_\type\()_h264_qpel8_mc33_neon, export=1 · 171 unmodified lines | |||
| 759 | endfunc | 759 | endfunc |
| 760 | .endm | 760 | .endm |
| 761 | 761 | ||
| 762 | h264_qpel8 put | 762 | h264_qpel8 put |
| 763 | h264_qpel8 avg | 763 | h264_qpel8 avg |
| 764 | 764 | ||
| 765 | .macro h264_qpel16 type | 765 | .macro h264_qpel16 type |
| 766 | function ff_\type\()_h264_qpel16_mc10_neon, export=1 | 766 | function ff_\type\()_h264_qpel16_mc10_neon, export=1 |
| @@ -931,5 +931,5 @@ function ff_\type\()_h264_qpel16_mc33_neon, export=1 · 164 unmodified lines | |||
| 931 | endfunc | 931 | endfunc |
| 932 | .endm | 932 | .endm |
| 933 | 933 | ||
| 934 | h264_qpel16 put | 934 | h264_qpel16 put |
| 935 | h264_qpel16 avg | 935 | h264_qpel16 avg |
| @@ -239,23 +239,23 @@ function hevc_add_residual_32x32_16_neon, export=0 · 238 unmodified lines | |||
| 239 | endfunc | 239 | endfunc |
| 240 | 240 | ||
| 241 | .macro tr_4x4 in0, in1, in2, in3, out0, out1, out2, out3, shift | 241 | .macro tr_4x4 in0, in1, in2, in3, out0, out1, out2, out3, shift |
| 242 | sshll v20.4s, \in0, #6 | 242 | sshll v20.4s, \in0, #6 |
| 243 | sshll v21.4s, \in0, #6 | 243 | sshll v21.4s, \in0, #6 |
| 244 | smull v22.4s, \in1, v4.h[1] | 244 | smull v22.4s, \in1, v4.h[1] |
| 245 | smull v23.4s, \in1, v4.h[3] | 245 | smull v23.4s, \in1, v4.h[3] |
| 246 | smlal v20.4s, \in2, v4.h[0] //e0 | 246 | smlal v20.4s, \in2, v4.h[0] //e0 |
| 247 | smlsl v21.4s, \in2, v4.h[0] //e1 | 247 | smlsl v21.4s, \in2, v4.h[0] //e1 |
| 248 | smlal v22.4s, \in3, v4.h[3] //o0 | 248 | smlal v22.4s, \in3, v4.h[3] //o0 |
| 249 | smlsl v23.4s, \in3, v4.h[1] //o1 | 249 | smlsl v23.4s, \in3, v4.h[1] //o1 |
| 250 | 250 | ||
| 251 | add v24.4s, v20.4s, v22.4s | 251 | add v24.4s, v20.4s, v22.4s |
| 252 | sub v20.4s, v20.4s, v22.4s | 252 | sub v20.4s, v20.4s, v22.4s |
| 253 | add v22.4s, v21.4s, v23.4s | 253 | add v22.4s, v21.4s, v23.4s |
| 254 | sub v21.4s, v21.4s, v23.4s | 254 | sub v21.4s, v21.4s, v23.4s |
| 255 | sqrshrn \out0, v24.4s, #\shift | 255 | sqrshrn \out0, v24.4s, #\shift |
| 256 | sqrshrn \out3, v20.4s, #\shift | 256 | sqrshrn \out3, v20.4s, #\shift |
| 257 | sqrshrn \out1, v22.4s, #\shift | 257 | sqrshrn \out1, v22.4s, #\shift |
| 258 | sqrshrn \out2, v21.4s, #\shift | 258 | sqrshrn \out2, v21.4s, #\shift |
| 259 | .endm | 259 | .endm |
| 260 | 260 | ||
| 261 | .macro idct_4x4 bitdepth | 261 | .macro idct_4x4 bitdepth |
| @@ -294,19 +294,19 @@ endfunc · 32 unmodified lines | |||
| 294 | 294 | ||
| 295 | // uses and clobbers v28-v31 as temp registers | 295 | // uses and clobbers v28-v31 as temp registers |
| 296 | .macro tr_4x4_8 in0, in1, in2, in3, out0, out1, out2, out3, p1, p2 | 296 | .macro tr_4x4_8 in0, in1, in2, in3, out0, out1, out2, out3, p1, p2 |
| 297 | sshll\p1 v28.4s, \in0, #6 | 297 | sshll\p1 v28.4s, \in0, #6 |
| 298 | mov v29.16b, v28.16b | 298 | mov v29.16b, v28.16b |
| 299 | smull\p1 v30.4s, \in1, v0.h[1] | 299 | smull\p1 v30.4s, \in1, v0.h[1] |
| 300 | smull\p1 v31.4s, \in1, v0.h[3] | 300 | smull\p1 v31.4s, \in1, v0.h[3] |
| 301 | smlal\p2 v28.4s, \in2, v0.h[0] //e0 | 301 | smlal\p2 v28.4s, \in2, v0.h[0] //e0 |
| 302 | smlsl\p2 v29.4s, \in2, v0.h[0] //e1 | 302 | smlsl\p2 v29.4s, \in2, v0.h[0] //e1 |
| 303 | smlal\p2 v30.4s, \in3, v0.h[3] //o0 | 303 | smlal\p2 v30.4s, \in3, v0.h[3] //o0 |
| 304 | smlsl\p2 v31.4s, \in3, v0.h[1] //o1 | 304 | smlsl\p2 v31.4s, \in3, v0.h[1] //o1 |
| 305 | 305 | ||
| 306 | add \out0, v28.4s, v30.4s | 306 | add \out0, v28.4s, v30.4s |
| 307 | add \out1, v29.4s, v31.4s | 307 | add \out1, v29.4s, v31.4s |
| 308 | sub \out2, v29.4s, v31.4s | 308 | sub \out2, v29.4s, v31.4s |
| 309 | sub \out3, v28.4s, v30.4s | 309 | sub \out3, v28.4s, v30.4s |
| 310 | .endm | 310 | .endm |
| 311 | 311 | ||
| 312 | .macro transpose_8x8 r0, r1, r2, r3, r4, r5, r6, r7 | 312 | .macro transpose_8x8 r0, r1, r2, r3, r4, r5, r6, r7 |
| @@ -362,11 +362,11 @@ endfunc · 49 unmodified lines | |||
| 362 | .macro idct_8x8 bitdepth | 362 | .macro idct_8x8 bitdepth |
| 363 | function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1 | 363 | function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1 |
| 364 | //x0 - coeffs | 364 | //x0 - coeffs |
| 365 | mov x1, x0 | 365 | mov x1, x0 |
| 366 | ld1 {v16.8h-v19.8h}, [x1], #64 | 366 | ld1 {v16.8h-v19.8h}, [x1], #64 |
| 367 | ld1 {v20.8h-v23.8h}, [x1] | 367 | ld1 {v20.8h-v23.8h}, [x1] |
| 368 | 368 | ||
| 369 | movrel x1, trans | 369 | movrel x1, trans |
| 370 | ld1 {v0.8h}, [x1] | 370 | ld1 {v0.8h}, [x1] |
| 371 | 371 | ||
| 372 | tr_8x4 7, v16,.4h, v17,.4h, v18,.4h, v19,.4h, v20,.4h, v21,.4h, v22,.4h, v23,.4h | 372 | tr_8x4 7, v16,.4h, v17,.4h, v18,.4h, v19,.4h, v20,.4h, v21,.4h, v22,.4h, v23,.4h |
| @@ -379,7 +379,7 @@ function ff_hevc_idct_8x8_\bitdepth\()_neon, export=1 · 6 unmodified lines | |||
| 379 | 379 | ||
| 380 | transpose_8x8 v16, v17, v18, v19, v20, v21, v22, v23 | 380 | transpose_8x8 v16, v17, v18, v19, v20, v21, v22, v23 |
| 381 | 381 | ||
| 382 | mov x1, x0 | 382 | mov x1, x0 |
| 383 | st1 {v16.8h-v19.8h}, [x1], #64 | 383 | st1 {v16.8h-v19.8h}, [x1], #64 |
| 384 | st1 {v20.8h-v23.8h}, [x1] | 384 | st1 {v20.8h-v23.8h}, [x1] |
| 385 | 385 | ||
| @@ -388,8 +388,8 @@ endfunc · 2 unmodified lines | |||
| 388 | .endm | 388 | .endm |
| 389 | 389 | ||
| 390 | .macro butterfly e, o, tmp_p, tmp_m | 390 | .macro butterfly e, o, tmp_p, tmp_m |
| 391 | add \tmp_p, \e, \o | 391 | add \tmp_p, \e, \o |
| 392 | sub \tmp_m, \e, \o | 392 | sub \tmp_m, \e, \o |
| 393 | .endm | 393 | .endm |
| 394 | 394 | ||
| 395 | .macro tr16_8x4 in0, in1, in2, in3, offset | 395 | .macro tr16_8x4 in0, in1, in2, in3, offset |
| @@ -418,7 +418,7 @@ endfunc · 22 unmodified lines | |||
| 418 | butterfly v25.4s, v29.4s, v17.4s, v22.4s | 418 | butterfly v25.4s, v29.4s, v17.4s, v22.4s |
| 419 | butterfly v26.4s, v30.4s, v18.4s, v21.4s | 419 | butterfly v26.4s, v30.4s, v18.4s, v21.4s |
| 420 | butterfly v27.4s, v31.4s, v19.4s, v20.4s | 420 | butterfly v27.4s, v31.4s, v19.4s, v20.4s |
| 421 | add x4, sp, #\offset | 421 | add x4, sp, #\offset |
| 422 | st1 {v16.4s-v19.4s}, [x4], #64 | 422 | st1 {v16.4s-v19.4s}, [x4], #64 |
| 423 | st1 {v20.4s-v23.4s}, [x4] | 423 | st1 {v20.4s-v23.4s}, [x4] |
| 424 | .endm | 424 | .endm |
| @@ -435,14 +435,14 @@ endfunc · 10 unmodified lines | |||
| 435 | .endm | 435 | .endm |
| 436 | 436 | ||
| 437 | .macro add_member in, t0, t1, t2, t3, t4, t5, t6, t7, op0, op1, op2, op3, op4, op5, op6, op7, p | 437 | .macro add_member in, t0, t1, t2, t3, t4, t5, t6, t7, op0, op1, op2, op3, op4, op5, op6, op7, p |
| 438 | sum_sub v21.4s, \in, \t0, \op0, \p | 438 | sum_sub v21.4s, \in, \t0, \op0, \p |
| 439 | sum_sub v22.4s, \in, \t1, \op1, \p | 439 | sum_sub v22.4s, \in, \t1, \op1, \p |
| 440 | sum_sub v23.4s, \in, \t2, \op2, \p | 440 | sum_sub v23.4s, \in, \t2, \op2, \p |
| 441 | sum_sub v24.4s, \in, \t3, \op3, \p | 441 | sum_sub v24.4s, \in, \t3, \op3, \p |
| 442 | sum_sub v25.4s, \in, \t4, \op4, \p | 442 | sum_sub v25.4s, \in, \t4, \op4, \p |
| 443 | sum_sub v26.4s, \in, \t5, \op5, \p | 443 | sum_sub v26.4s, \in, \t5, \op5, \p |
| 444 | sum_sub v27.4s, \in, \t6, \op6, \p | 444 | sum_sub v27.4s, \in, \t6, \op6, \p |
| 445 | sum_sub v28.4s, \in, \t7, \op7, \p | 445 | sum_sub v28.4s, \in, \t7, \op7, \p |
| 446 | .endm | 446 | .endm |
| 447 | 447 | ||
| 448 | .macro butterfly16 in0, in1, in2, in3, in4, in5, in6, in7 | 448 | .macro butterfly16 in0, in1, in2, in3, in4, in5, in6, in7 |
| @@ -528,20 +528,20 @@ endfunc · 79 unmodified lines | |||
| 528 | 528 | ||
| 529 | .macro tr_16x4 name, shift, offset, step | 529 | .macro tr_16x4 name, shift, offset, step |
| 530 | function func_tr_16x4_\name | 530 | function func_tr_16x4_\name |
| 531 | mov x1, x5 | 531 | mov x1, x5 |
| 532 | add x3, x5, #(\step * 64) | 532 | add x3, x5, #(\step * 64) |
| 533 | mov x2, #(\step * 128) | 533 | mov x2, #(\step * 128) |
| 534 | load16 v16.d, v17.d, v18.d, v19.d | 534 | load16 v16.d, v17.d, v18.d, v19.d |
| 535 | movrel x1, trans | 535 | movrel x1, trans |
| 536 | ld1 {v0.8h}, [x1] | 536 | ld1 {v0.8h}, [x1] |
| 537 | 537 | ||
| 538 | tr16_8x4 v16, v17, v18, v19, \offset | 538 | tr16_8x4 v16, v17, v18, v19, \offset |
| 539 | 539 | ||
| 540 | add x1, x5, #(\step * 32) | 540 | add x1, x5, #(\step * 32) |
| 541 | add x3, x5, #(\step * 3 *32) | 541 | add x3, x5, #(\step * 3 *32) |
| 542 | mov x2, #(\step * 128) | 542 | mov x2, #(\step * 128) |
| 543 | load16 v20.d, v17.d, v18.d, v19.d | 543 | load16 v20.d, v17.d, v18.d, v19.d |
| 544 | movrel x1, trans, 16 | 544 | movrel x1, trans, 16 |
| 545 | ld1 {v1.8h}, [x1] | 545 | ld1 {v1.8h}, [x1] |
| 546 | smull v21.4s, v20.4h, v1.h[0] | 546 | smull v21.4s, v20.4h, v1.h[0] |
| 547 | smull v22.4s, v20.4h, v1.h[1] | 547 | smull v22.4s, v20.4h, v1.h[1] |
| @@ -560,19 +560,19 @@ function func_tr_16x4_\name · 12 unmodified lines | |||
| 560 | add_member v19.4h, v1.h[6], v1.h[3], v1.h[0], v1.h[2], v1.h[5], v1.h[7], v1.h[4], v1.h[1], +, -, +, -, +, +, -, + | 560 | add_member v19.4h, v1.h[6], v1.h[3], v1.h[0], v1.h[2], v1.h[5], v1.h[7], v1.h[4], v1.h[1], +, -, +, -, +, +, -, + |
| 561 | add_member v19.8h, v1.h[7], v1.h[6], v1.h[5], v1.h[4], v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, +, -, +, -, 2 | 561 | add_member v19.8h, v1.h[7], v1.h[6], v1.h[5], v1.h[4], v1.h[3], v1.h[2], v1.h[1], v1.h[0], +, -, +, -, +, -, +, -, 2 |
| 562 | 562 | ||
| 563 | add x4, sp, #\offset | 563 | add x4, sp, #\offset |
| 564 | ld1 {v16.4s-v19.4s}, [x4], #64 | 564 | ld1 {v16.4s-v19.4s}, [x4], #64 |
| 565 | butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s | 565 | butterfly16 v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, v24.4s |
| 566 | .if \shift > 0 | 566 | .if \shift > 0 |
| 567 | scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift | 567 | scale v29, v30, v31, v24, v20.4s, v16.4s, v21.4s, v17.4s, v22.4s, v18.4s, v23.4s, v19.4s, \shift |
| 568 | transpose16_4x4_2 v29, v30, v31, v24, v2, v3, v4, v5, v6, v7 | 568 | transpose16_4x4_2 v29, v30, v31, v24, v2, v3, v4, v5, v6, v7 |
| 569 | mov x1, x6 | 569 | mov x1, x6 |
| 570 | add x3, x6, #(24 +3*32) | 570 | add x3, x6, #(24 +3*32) |
| 571 | mov x2, #32 | 571 | mov x2, #32 |
| 572 | mov x4, #-32 | 572 | mov x4, #-32 |
| 573 | store16 v29.d, v30.d, v31.d, v24.d, x4 | 573 | store16 v29.d, v30.d, v31.d, v24.d, x4 |
| 574 | .else | 574 | .else |
| 575 | store_to_stack \offset, (\offset + 240), v20.4s, v21.4s, v22.4s, v23.4s, v19.4s, v18.4s, v17.4s, v16.4s | 575 | store_to_stack \offset, (\offset + 240), v20.4s, v21.4s, v22.4s, v23.4s, v19.4s, v18.4s, v17.4s, v16.4s |
| 576 | .endif | 576 | .endif |
| 577 | 577 | ||
| 578 | add x4, sp, #(\offset + 64) | 578 | add x4, sp, #(\offset + 64) |
| @@ -582,13 +582,13 @@ function func_tr_16x4_\name · 3 unmodified lines | |||
| 582 | scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift | 582 | scale v29, v30, v31, v20, v20.4s, v16.4s, v25.4s, v17.4s, v26.4s, v18.4s, v27.4s, v19.4s, \shift |
| 583 | transpose16_4x4_2 v29, v30, v31, v20, v2, v3, v4, v5, v6, v7 | 583 | transpose16_4x4_2 v29, v30, v31, v20, v2, v3, v4, v5, v6, v7 |
| 584 | 584 | ||
| 585 | add x1, x6, #8 | 585 | add x1, x6, #8 |
| 586 | add x3, x6, #(16 + 3 * 32) | 586 | add x3, x6, #(16 + 3 * 32) |
| 587 | mov x2, #32 | 587 | mov x2, #32 |
| 588 | mov x4, #-32 | 588 | mov x4, #-32 |
| 589 | store16 v29.d, v30.d, v31.d, v20.d, x4 | 589 | store16 v29.d, v30.d, v31.d, v20.d, x4 |
| 590 | .else | 590 | .else |
| 591 | store_to_stack (\offset + 64), (\offset + 176), v20.4s, v25.4s, v26.4s, v27.4s, v19.4s, v18.4s, v17.4s, v16.4s | 591 | store_to_stack (\offset + 64), (\offset + 176), v20.4s, v25.4s, v26.4s, v27.4s, v19.4s, v18.4s, v17.4s, v16.4s |
| 592 | .endif | 592 | .endif |
| 593 | 593 | ||
| 594 | ret | 594 | ret |
| @@ -601,21 +601,21 @@ function ff_hevc_idct_16x16_\bitdepth\()_neon, export=1 · 6 unmodified lines | |||
| 601 | mov x15, x30 | 601 | mov x15, x30 |
| 602 | 602 | ||
| 603 | // allocate a temp buffer | 603 | // allocate a temp buffer |
| 604 | sub sp, sp, #640 | 604 | sub sp, sp, #640 |
| 605 | 605 | ||
| 606 | .irp i, 0, 1, 2, 3 | 606 | .irp i, 0, 1, 2, 3 |
| 607 | add x5, x0, #(8 * \i) | 607 | add x5, x0, #(8 * \i) |
| 608 | add x6, sp, #(8 * \i * 16) | 608 | add x6, sp, #(8 * \i * 16) |
| 609 | bl func_tr_16x4_firstpass | 609 | bl func_tr_16x4_firstpass |
| 610 | .endr | 610 | .endr |
| 611 | 611 | ||
| 612 | .irp i, 0, 1, 2, 3 | 612 | .irp i, 0, 1, 2, 3 |
| 613 | add x5, sp, #(8 * \i) | 613 | add x5, sp, #(8 * \i) |
| 614 | add x6, x0, #(8 * \i * 16) | 614 | add x6, x0, #(8 * \i * 16) |
| 615 | bl func_tr_16x4_secondpass_\bitdepth | 615 | bl func_tr_16x4_secondpass_\bitdepth |
| 616 | .endr | 616 | .endr |
| 617 | 617 | ||
| 618 | add sp, sp, #640 | 618 | add sp, sp, #640 |
| 619 | 619 | ||
| 620 | ret x15 | 620 | ret x15 |
| 621 | endfunc | 621 | endfunc |
| @@ -644,10 +644,10 @@ endfunc · 22 unmodified lines | |||
| 644 | .endm | 644 | .endm |
| 645 | 645 | ||
| 646 | .macro add_member32 in, t0, t1, t2, t3, op0, op1, op2, op3, p | 646 | .macro add_member32 in, t0, t1, t2, t3, op0, op1, op2, op3, p |
| 647 | sum_sub v24.4s, \in, \t0, \op0, \p | 647 | sum_sub v24.4s, \in, \t0, \op0, \p |
| 648 | sum_sub v25.4s, \in, \t1, \op1, \p | 648 | sum_sub v25.4s, \in, \t1, \op1, \p |
| 649 | sum_sub v26.4s, \in, \t2, \op2, \p | 649 | sum_sub v26.4s, \in, \t2, \op2, \p |
| 650 | sum_sub v27.4s, \in, \t3, \op3, \p | 650 | sum_sub v27.4s, \in, \t3, \op3, \p |
| 651 | .endm | 651 | .endm |
| 652 | 652 | ||
| 653 | .macro butterfly32 in0, in1, in2, in3, out | 653 | .macro butterfly32 in0, in1, in2, in3, out |
| @@ -841,85 +841,85 @@ idct_32x32 8 · 187 unmodified lines | |||
| 841 | idct_32x32 10 | 841 | idct_32x32 10 |
| 842 | 842 | ||
| 843 | .macro tr4_luma_shift r0, r1, r2, r3, shift | 843 | .macro tr4_luma_shift r0, r1, r2, r3, shift |
| 844 | saddl v0.4s, \r0, \r2 // c0 = src0 + src2 | 844 | saddl v0.4s, \r0, \r2 // c0 = src0 + src2 |
| 845 | saddl v1.4s, \r2, \r3 // c1 = src2 + src3 | 845 | saddl v1.4s, \r2, \r3 // c1 = src2 + src3 |
| 846 | ssubl v2.4s, \r0, \r3 // c2 = src0 - src3 | 846 | ssubl v2.4s, \r0, \r3 // c2 = src0 - src3 |
| 847 | smull v3.4s, \r1, v21.4h // c3 = 74 * src1 | 847 | smull v3.4s, \r1, v21.4h // c3 = 74 * src1 |
| 848 | 848 | ||
| 849 | saddl v7.4s, \r0, \r3 // src0 + src3 | 849 | saddl v7.4s, \r0, \r3 // src0 + src3 |
| 850 | ssubw v7.4s, v7.4s, \r2 // src0 - src2 + src3 | 850 | ssubw v7.4s, v7.4s, \r2 // src0 - src2 + src3 |
| 851 | mul v7.4s, v7.4s, v18.4s // dst2 = 74 * (src0 - src2 + src3) | 851 | mul v7.4s, v7.4s, v18.4s // dst2 = 74 * (src0 - src2 + src3) |
| 852 | 852 | ||
| 853 | mul v5.4s, v0.4s, v19.4s // 29 * c0 | 853 | mul v5.4s, v0.4s, v19.4s // 29 * c0 |
| 854 | mul v6.4s, v1.4s, v20.4s // 55 * c1 | 854 | mul v6.4s, v1.4s, v20.4s // 55 * c1 |
| 855 | add v5.4s, v5.4s, v6.4s // 29 * c0 + 55 * c1 | 855 | add v5.4s, v5.4s, v6.4s // 29 * c0 + 55 * c1 |
| 856 | add v5.4s, v5.4s, v3.4s // dst0 = 29 * c0 + 55 * c1 + c3 | 856 | add v5.4s, v5.4s, v3.4s // dst0 = 29 * c0 + 55 * c1 + c3 |
| 857 | 857 | ||
| 858 | mul v1.4s, v1.4s, v19.4s // 29 * c1 | 858 | mul v1.4s, v1.4s, v19.4s // 29 * c1 |
| 859 | mul v6.4s, v2.4s, v20.4s // 55 * c2 | 859 | mul v6.4s, v2.4s, v20.4s // 55 * c2 |
| 860 | sub v6.4s, v6.4s, v1.4s // 55 * c2 - 29 * c1 | 860 | sub v6.4s, v6.4s, v1.4s // 55 * c2 - 29 * c1 |
| 861 | add v6.4s, v6.4s, v3.4s // dst1 = 55 * c2 - 29 * c1 + c3 | 861 | add v6.4s, v6.4s, v3.4s // dst1 = 55 * c2 - 29 * c1 + c3 |
| 862 | 862 | ||
| 863 | mul v0.4s, v0.4s, v20.4s // 55 * c0 | 863 | mul v0.4s, v0.4s, v20.4s // 55 * c0 |
| 864 | mul v2.4s, v2.4s, v19.4s // 29 * c2 | 864 | mul v2.4s, v2.4s, v19.4s // 29 * c2 |
| 865 | add v0.4s, v0.4s, v2.4s // 55 * c0 + 29 * c2 | 865 | add v0.4s, v0.4s, v2.4s // 55 * c0 + 29 * c2 |
| 866 | sub v0.4s, v0.4s, v3.4s // dst3 = 55 * c0 + 29 * c2 - c3 | 866 | sub v0.4s, v0.4s, v3.4s // dst3 = 55 * c0 + 29 * c2 - c3 |
| 867 | 867 | ||
| 868 | sqrshrn \r0, v5.4s, \shift | 868 | sqrshrn \r0, v5.4s, \shift |
| 869 | sqrshrn \r1, v6.4s, \shift | 869 | sqrshrn \r1, v6.4s, \shift |
| 870 | sqrshrn \r2, v7.4s, \shift | 870 | sqrshrn \r2, v7.4s, \shift |
| 871 | sqrshrn \r3, v0.4s, \shift | 871 | sqrshrn \r3, v0.4s, \shift |
| 872 | .endm | 872 | .endm |
| 873 | 873 | ||
| 874 | function ff_hevc_transform_luma_4x4_neon_8, export=1 | 874 | function ff_hevc_transform_luma_4x4_neon_8, export=1 |
| 875 | ld1 {v28.4h-v31.4h}, [x0] | 875 | ld1 {v28.4h-v31.4h}, [x0] |
| 876 | movi v18.4s, #74 | 876 | movi v18.4s, #74 |
| 877 | movi v19.4s, #29 | 877 | movi v19.4s, #29 |
| 878 | movi v20.4s, #55 | 878 | movi v20.4s, #55 |
| 879 | movi v21.4h, #74 | 879 | movi v21.4h, #74 |
| 880 | 880 | ||
| 881 | tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #7 | 881 | tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #7 |
| 882 | transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 | 882 | transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 |
| 883 | 883 | ||
| 884 | tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #12 | 884 | tr4_luma_shift v28.4h, v29.4h, v30.4h, v31.4h, #12 |
| 885 | transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 | 885 | transpose_4x4H v28, v29, v30, v31, v22, v23, v24, v25 |
| 886 | 886 | ||
| 887 | st1 {v28.4h-v31.4h}, [x0] | 887 | st1 {v28.4h-v31.4h}, [x0] |
| 888 | ret | 888 | ret |
| 889 | endfunc | 889 | endfunc |
| 890 | 890 | ||
| 891 | // void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs) | 891 | // void ff_hevc_idct_NxN_dc_DEPTH_neon(int16_t *coeffs) |
| 892 | .macro idct_dc size, bitdepth | 892 | .macro idct_dc size, bitdepth |
| 893 | function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1 | 893 | function ff_hevc_idct_\size\()x\size\()_dc_\bitdepth\()_neon, export=1 |
| 894 | ld1r {v4.8h}, [x0] | 894 | ld1r {v4.8h}, [x0] |
| 895 | srshr v4.8h, v4.8h, #1 | 895 | srshr v4.8h, v4.8h, #1 |
| 896 | srshr v0.8h, v4.8h, #(14 - \bitdepth) | 896 | srshr v0.8h, v4.8h, #(14 - \bitdepth) |
| 897 | srshr v1.8h, v4.8h, #(14 - \bitdepth) | 897 | srshr v1.8h, v4.8h, #(14 - \bitdepth) |
| 898 | .if \size > 4 | 898 | .if \size > 4 |
| 899 | srshr v2.8h, v4.8h, #(14 - \bitdepth) | 899 | srshr v2.8h, v4.8h, #(14 - \bitdepth) |
| 900 | srshr v3.8h, v4.8h, #(14 - \bitdepth) | 900 | srshr v3.8h, v4.8h, #(14 - \bitdepth) |
| 901 | .if \size > 16 /* dc 32x32 */ | 901 | .if \size > 16 /* dc 32x32 */ |
| 902 | mov x2, #4 | 902 | mov x2, #4 |
| 903 | 1: | 903 | 1: |
| 904 | subs x2, x2, #1 | 904 | subs x2, x2, #1 |
| 905 | .endif | 905 | .endif |
| 906 | add x12, x0, #64 | 906 | add x12, x0, #64 |
| 907 | mov x13, #128 | 907 | mov x13, #128 |
| 908 | .if \size > 8 /* dc 16x16 */ | 908 | .if \size > 8 /* dc 16x16 */ |
| 909 | st1 {v0.8h-v3.8h}, [x0], x13 | 909 | st1 {v0.8h-v3.8h}, [x0], x13 |
| 910 | st1 {v0.8h-v3.8h}, [x12], x13 | 910 | st1 {v0.8h-v3.8h}, [x12], x13 |
| 911 | st1 {v0.8h-v3.8h}, [x0], x13 | 911 | st1 {v0.8h-v3.8h}, [x0], x13 |
| 912 | st1 {v0.8h-v3.8h}, [x12], x13 | 912 | st1 {v0.8h-v3.8h}, [x12], x13 |
| 913 | st1 {v0.8h-v3.8h}, [x0], x13 | 913 | st1 {v0.8h-v3.8h}, [x0], x13 |
| 914 | st1 {v0.8h-v3.8h}, [x12], x13 | 914 | st1 {v0.8h-v3.8h}, [x12], x13 |
| 915 | .endif /* dc 8x8 */ | 915 | .endif /* dc 8x8 */ |
| 916 | st1 {v0.8h-v3.8h}, [x0], x13 | 916 | st1 {v0.8h-v3.8h}, [x0], x13 |
| 917 | st1 {v0.8h-v3.8h}, [x12], x13 | 917 | st1 {v0.8h-v3.8h}, [x12], x13 |
| 918 | .if \size > 16 /* dc 32x32 */ | 918 | .if \size > 16 /* dc 32x32 */ |
| 919 | bne 1b | 919 | bne 1b |
| 920 | .endif | 920 | .endif |
| 921 | .else /* dc 4x4 */ | 921 | .else /* dc 4x4 */ |
| 922 | st1 {v0.8h-v1.8h}, [x0] | 922 | st1 {v0.8h-v1.8h}, [x0] |
| 923 | .endif | 923 | .endif |
| 924 | ret | 924 | ret |
| 925 | endfunc | 925 | endfunc |
| @@ -840,19 +840,19 @@ function ff_hevc_put_hevc_qpel_uni_v16_8_neon, export=1 · 839 unmodified lines | |||
| 840 | endfunc | 840 | endfunc |
| 841 | 841 | ||
| 842 | function ff_hevc_put_hevc_qpel_uni_v24_8_neon, export=1 | 842 | function ff_hevc_put_hevc_qpel_uni_v24_8_neon, export=1 |
| 843 | b X(ff_hevc_put_hevc_qpel_uni_v12_8_neon) | 843 | b X(ff_hevc_put_hevc_qpel_uni_v12_8_neon) |
| 844 | endfunc | 844 | endfunc |
| 845 | 845 | ||
| 846 | function ff_hevc_put_hevc_qpel_uni_v32_8_neon, export=1 | 846 | function ff_hevc_put_hevc_qpel_uni_v32_8_neon, export=1 |
| 847 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) | 847 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) |
| 848 | endfunc | 848 | endfunc |
| 849 | 849 | ||
| 850 | function ff_hevc_put_hevc_qpel_uni_v48_8_neon, export=1 | 850 | function ff_hevc_put_hevc_qpel_uni_v48_8_neon, export=1 |
| 851 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) | 851 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) |
| 852 | endfunc | 852 | endfunc |
| 853 | 853 | ||
| 854 | function ff_hevc_put_hevc_qpel_uni_v64_8_neon, export=1 | 854 | function ff_hevc_put_hevc_qpel_uni_v64_8_neon, export=1 |
| 855 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) | 855 | b X(ff_hevc_put_hevc_qpel_uni_v16_8_neon) |
| 856 | endfunc | 856 | endfunc |
| 857 | 857 | ||
| 858 | function ff_hevc_put_hevc_pel_uni_w_pixels4_8_neon, export=1 | 858 | function ff_hevc_put_hevc_pel_uni_w_pixels4_8_neon, export=1 |
| @@ -1560,21 +1560,21 @@ endfunc · 701 unmodified lines | |||
| 1560 | #if HAVE_I8MM | 1560 | #if HAVE_I8MM |
| 1561 | 1561 | ||
| 1562 | .macro calc_all2 | 1562 | .macro calc_all2 |
| 1563 | calc v30, v31, v16, v18, v20, v22, v24, v26, v28, v30, v17, v19, v21, v23, v25, v27, v29, v31 | 1563 | calc v30, v31, v16, v18, v20, v22, v24, v26, v28, v30, v17, v19, v21, v23, v25, v27, v29, v31 |
| 1564 | b.eq 2f | 1564 | b.eq 2f |
| 1565 | calc v16, v17, v18, v20, v22, v24, v26, v28, v30, v16, v19, v21, v23, v25, v27, v29, v31, v17 | 1565 | calc v16, v17, v18, v20, v22, v24, v26, v28, v30, v16, v19, v21, v23, v25, v27, v29, v31, v17 |
| 1566 | b.eq 2f | 1566 | b.eq 2f |
| 1567 | calc v18, v19, v20, v22, v24, v26, v28, v30, v16, v18, v21, v23, v25, v27, v29, v31, v17, v19 | 1567 | calc v18, v19, v20, v22, v24, v26, v28, v30, v16, v18, v21, v23, v25, v27, v29, v31, v17, v19 |
| 1568 | b.eq 2f | 1568 | b.eq 2f |
| 1569 | calc v20, v21, v22, v24, v26, v28, v30, v16, v18, v20, v23, v25, v27, v29, v31, v17, v19, v21 | 1569 | calc v20, v21, v22, v24, v26, v28, v30, v16, v18, v20, v23, v25, v27, v29, v31, v17, v19, v21 |
| 1570 | b.eq 2f | 1570 | b.eq 2f |
| 1571 | calc v22, v23, v24, v26, v28, v30, v16, v18, v20, v22, v25, v27, v29, v31, v17, v19, v21, v23 | 1571 | calc v22, v23, v24, v26, v28, v30, v16, v18, v20, v22, v25, v27, v29, v31, v17, v19, v21, v23 |
| 1572 | b.eq 2f | 1572 | b.eq 2f |
| 1573 | calc v24, v25, v26, v28, v30, v16, v18, v20, v22, v24, v27, v29, v31, v17, v19, v21, v23, v25 | 1573 | calc v24, v25, v26, v28, v30, v16, v18, v20, v22, v24, v27, v29, v31, v17, v19, v21, v23, v25 |
| 1574 | b.eq 2f | 1574 | b.eq 2f |
| 1575 | calc v26, v27, v28, v30, v16, v18, v20, v22, v24, v26, v29, v31, v17, v19, v21, v23, v25, v27 | 1575 | calc v26, v27, v28, v30, v16, v18, v20, v22, v24, v26, v29, v31, v17, v19, v21, v23, v25, v27 |
| 1576 | b.eq 2f | 1576 | b.eq 2f |
| 1577 | calc v28, v29, v30, v16, v18, v20, v22, v24, v26, v28, v31, v17, v19, v21, v23, v25, v27, v29 | 1577 | calc v28, v29, v30, v16, v18, v20, v22, v24, v26, v28, v31, v17, v19, v21, v23, v25, v27, v29 |
| 1578 | b.hi 1b | 1578 | b.hi 1b |
| 1579 | .endm | 1579 | .endm |
| 1580 | 1580 | ||
| @@ -34,13 +34,13 @@ endconst · 33 unmodified lines | |||
| 34 | 34 | ||
| 35 | function ff_opus_deemphasis_neon, export=1 | 35 | function ff_opus_deemphasis_neon, export=1 |
| 36 | movrel x4, tab_st | 36 | movrel x4, tab_st |
| 37 | ld1 {v4.4s}, [x4] | 37 | ld1 {v4.4s}, [x4] |
| 38 | movrel x4, tab_x0 | 38 | movrel x4, tab_x0 |
| 39 | ld1 {v5.4s}, [x4] | 39 | ld1 {v5.4s}, [x4] |
| 40 | movrel x4, tab_x1 | 40 | movrel x4, tab_x1 |
| 41 | ld1 {v6.4s}, [x4] | 41 | ld1 {v6.4s}, [x4] |
| 42 | movrel x4, tab_x2 | 42 | movrel x4, tab_x2 |
| 43 | ld1 {v7.4s}, [x4] | 43 | ld1 {v7.4s}, [x4] |
| 44 | 44 | ||
| 45 | fmul v0.4s, v4.4s, v0.s[0] | 45 | fmul v0.4s, v4.4s, v0.s[0] |
| 46 | 46 | ||
| @@ -330,32 +330,32 @@ endfunc · 329 unmodified lines | |||
| 330 | // v17: hev | 330 | // v17: hev |
| 331 | 331 | ||
| 332 | // convert to signed value: | 332 | // convert to signed value: |
| 333 | eor v3.16b, v3.16b, v21.16b // PS0 = P0 ^ 0x80 | 333 | eor v3.16b, v3.16b, v21.16b // PS0 = P0 ^ 0x80 |
| 334 | eor v4.16b, v4.16b, v21.16b // QS0 = Q0 ^ 0x80 | 334 | eor v4.16b, v4.16b, v21.16b // QS0 = Q0 ^ 0x80 |
| 335 | 335 | ||
| 336 | movi v20.8h, #3 | 336 | movi v20.8h, #3 |
| 337 | ssubl v18.8h, v4.8b, v3.8b // QS0 - PS0 | 337 | ssubl v18.8h, v4.8b, v3.8b // QS0 - PS0 |
| 338 | ssubl2 v19.8h, v4.16b, v3.16b // (widened to 16bit) | 338 | ssubl2 v19.8h, v4.16b, v3.16b // (widened to 16bit) |
| 339 | eor v2.16b, v2.16b, v21.16b // PS1 = P1 ^ 0x80 | 339 | eor v2.16b, v2.16b, v21.16b // PS1 = P1 ^ 0x80 |
| 340 | eor v5.16b, v5.16b, v21.16b // QS1 = Q1 ^ 0x80 | 340 | eor v5.16b, v5.16b, v21.16b // QS1 = Q1 ^ 0x80 |
| 341 | mul v18.8h, v18.8h, v20.8h // w = 3 * (QS0 - PS0) | 341 | mul v18.8h, v18.8h, v20.8h // w = 3 * (QS0 - PS0) |
| 342 | mul v19.8h, v19.8h, v20.8h | 342 | mul v19.8h, v19.8h, v20.8h |
| 343 | 343 | ||
| 344 | sqsub v20.16b, v2.16b, v5.16b // clamp(PS1-QS1) | 344 | sqsub v20.16b, v2.16b, v5.16b // clamp(PS1-QS1) |
| 345 | movi v22.16b, #4 | 345 | movi v22.16b, #4 |
| 346 | movi v23.16b, #3 | 346 | movi v23.16b, #3 |
| 347 | .if \inner | 347 | .if \inner |
| 348 | and v20.16b, v20.16b, v17.16b // if(hev) w += clamp(PS1-QS1) | 348 | and v20.16b, v20.16b, v17.16b // if(hev) w += clamp(PS1-QS1) |
| 349 | .endif | 349 | .endif |
| 350 | saddw v18.8h, v18.8h, v20.8b // w += clamp(PS1-QS1) | 350 | saddw v18.8h, v18.8h, v20.8b // w += clamp(PS1-QS1) |
| 351 | saddw2 v19.8h, v19.8h, v20.16b | 351 | saddw2 v19.8h, v19.8h, v20.16b |
| 352 | sqxtn v18.8b, v18.8h // narrow result back into v18 | 352 | sqxtn v18.8b, v18.8h // narrow result back into v18 |
| 353 | sqxtn2 v18.16b, v19.8h | 353 | sqxtn2 v18.16b, v19.8h |
| 354 | .if !\inner && !\simple | 354 | .if !\inner && !\simple |
| 355 | eor v1.16b, v1.16b, v21.16b // PS2 = P2 ^ 0x80 | 355 | eor v1.16b, v1.16b, v21.16b // PS2 = P2 ^ 0x80 |
| 356 | eor v6.16b, v6.16b, v21.16b // QS2 = Q2 ^ 0x80 | 356 | eor v6.16b, v6.16b, v21.16b // QS2 = Q2 ^ 0x80 |
| 357 | .endif | 357 | .endif |
| 358 | and v18.16b, v18.16b, v16.16b // w &= normal_limit | 358 | and v18.16b, v18.16b, v16.16b // w &= normal_limit |
| 359 | 359 | ||
| 360 | // registers used at this point.. | 360 | // registers used at this point.. |
| 361 | // v0 -> P3 (don't corrupt) | 361 | // v0 -> P3 (don't corrupt) |
| @@ -375,44 +375,44 @@ endfunc · 13 unmodified lines | |||
| 375 | // P0 = s2u(PS0 + c2); | 375 | // P0 = s2u(PS0 + c2); |
| 376 | 376 | ||
| 377 | .if \simple | 377 | .if \simple |
| 378 | sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4) | 378 | sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4) |
| 379 | sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3) | 379 | sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3) |
| 380 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 | 380 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 |
| 381 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 | 381 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 |
| 382 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) | 382 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) |
| 383 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) | 383 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) |
| 384 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 | 384 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 |
| 385 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 | 385 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 |
| 386 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 | 386 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 |
| 387 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 | 387 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 |
| 388 | .elseif \inner | 388 | .elseif \inner |
| 389 | // the !is4tap case of filter_common, only used for inner blocks | 389 | // the !is4tap case of filter_common, only used for inner blocks |
| 390 | // c3 = ((c1&~hev) + 1) >> 1; | 390 | // c3 = ((c1&~hev) + 1) >> 1; |
| 391 | // Q1 = s2u(QS1 - c3); | 391 | // Q1 = s2u(QS1 - c3); |
| 392 | // P1 = s2u(PS1 + c3); | 392 | // P1 = s2u(PS1 + c3); |
| 393 | sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4) | 393 | sqadd v19.16b, v18.16b, v22.16b // c1 = clamp((w&hev)+4) |
| 394 | sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3) | 394 | sqadd v20.16b, v18.16b, v23.16b // c2 = clamp((w&hev)+3) |
| 395 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 | 395 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 |
| 396 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 | 396 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 |
| 397 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) | 397 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) |
| 398 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) | 398 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) |
| 399 | bic v19.16b, v19.16b, v17.16b // c1 & ~hev | 399 | bic v19.16b, v19.16b, v17.16b // c1 & ~hev |
| 400 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 | 400 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 |
| 401 | srshr v19.16b, v19.16b, #1 // c3 >>= 1 | 401 | srshr v19.16b, v19.16b, #1 // c3 >>= 1 |
| 402 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 | 402 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 |
| 403 | sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-c3) | 403 | sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-c3) |
| 404 | sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+c3) | 404 | sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+c3) |
| 405 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 | 405 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 |
| 406 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 | 406 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 |
| 407 | .else | 407 | .else |
| 408 | and v20.16b, v18.16b, v17.16b // w & hev | 408 | and v20.16b, v18.16b, v17.16b // w & hev |
| 409 | sqadd v19.16b, v20.16b, v22.16b // c1 = clamp((w&hev)+4) | 409 | sqadd v19.16b, v20.16b, v22.16b // c1 = clamp((w&hev)+4) |
| 410 | sqadd v20.16b, v20.16b, v23.16b // c2 = clamp((w&hev)+3) | 410 | sqadd v20.16b, v20.16b, v23.16b // c2 = clamp((w&hev)+3) |
| 411 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 | 411 | sshr v19.16b, v19.16b, #3 // c1 >>= 3 |
| 412 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 | 412 | sshr v20.16b, v20.16b, #3 // c2 >>= 3 |
| 413 | bic v18.16b, v18.16b, v17.16b // w &= ~hev | 413 | bic v18.16b, v18.16b, v17.16b // w &= ~hev |
| 414 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) | 414 | sqsub v4.16b, v4.16b, v19.16b // QS0 = clamp(QS0-c1) |
| 415 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) | 415 | sqadd v3.16b, v3.16b, v20.16b // PS0 = clamp(PS0+c2) |
| 416 | 416 | ||
| 417 | // filter_mbedge: | 417 | // filter_mbedge: |
| 418 | // a = clamp((27*w + 63) >> 7); | 418 | // a = clamp((27*w + 63) >> 7); |
| @@ -424,35 +424,35 @@ endfunc · 5 unmodified lines | |||
| 424 | // a = clamp((9*w + 63) >> 7); | 424 | // a = clamp((9*w + 63) >> 7); |
| 425 | // Q2 = s2u(QS2 - a); | 425 | // Q2 = s2u(QS2 - a); |
| 426 | // P2 = s2u(PS2 + a); | 426 | // P2 = s2u(PS2 + a); |
| 427 | movi v17.8h, #63 | 427 | movi v17.8h, #63 |
| 428 | sshll v22.8h, v18.8b, #3 | 428 | sshll v22.8h, v18.8b, #3 |
| 429 | sshll2 v23.8h, v18.16b, #3 | 429 | sshll2 v23.8h, v18.16b, #3 |
| 430 | saddw v22.8h, v22.8h, v18.8b | 430 | saddw v22.8h, v22.8h, v18.8b |
| 431 | saddw2 v23.8h, v23.8h, v18.16b | 431 | saddw2 v23.8h, v23.8h, v18.16b |
| 432 | add v16.8h, v17.8h, v22.8h | 432 | add v16.8h, v17.8h, v22.8h |
| 433 | add v17.8h, v17.8h, v23.8h // 9*w + 63 | 433 | add v17.8h, v17.8h, v23.8h // 9*w + 63 |
| 434 | add v19.8h, v16.8h, v22.8h | 434 | add v19.8h, v16.8h, v22.8h |
| 435 | add v20.8h, v17.8h, v23.8h // 18*w + 63 | 435 | add v20.8h, v17.8h, v23.8h // 18*w + 63 |
| 436 | add v22.8h, v19.8h, v22.8h | 436 | add v22.8h, v19.8h, v22.8h |
| 437 | add v23.8h, v20.8h, v23.8h // 27*w + 63 | 437 | add v23.8h, v20.8h, v23.8h // 27*w + 63 |
| 438 | sqshrn v16.8b, v16.8h, #7 | 438 | sqshrn v16.8b, v16.8h, #7 |
| 439 | sqshrn2 v16.16b, v17.8h, #7 // clamp(( 9*w + 63)>>7) | 439 | sqshrn2 v16.16b, v17.8h, #7 // clamp(( 9*w + 63)>>7) |
| 440 | sqshrn v19.8b, v19.8h, #7 | 440 | sqshrn v19.8b, v19.8h, #7 |
| 441 | sqshrn2 v19.16b, v20.8h, #7 // clamp((18*w + 63)>>7) | 441 | sqshrn2 v19.16b, v20.8h, #7 // clamp((18*w + 63)>>7) |
| 442 | sqshrn v22.8b, v22.8h, #7 | 442 | sqshrn v22.8b, v22.8h, #7 |
| 443 | sqshrn2 v22.16b, v23.8h, #7 // clamp((27*w + 63)>>7) | 443 | sqshrn2 v22.16b, v23.8h, #7 // clamp((27*w + 63)>>7) |
| 444 | sqadd v1.16b, v1.16b, v16.16b // PS2 = clamp(PS2+a) | 444 | sqadd v1.16b, v1.16b, v16.16b // PS2 = clamp(PS2+a) |
| 445 | sqsub v6.16b, v6.16b, v16.16b // QS2 = clamp(QS2-a) | 445 | sqsub v6.16b, v6.16b, v16.16b // QS2 = clamp(QS2-a) |
| 446 | sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+a) | 446 | sqadd v2.16b, v2.16b, v19.16b // PS1 = clamp(PS1+a) |
| 447 | sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-a) | 447 | sqsub v5.16b, v5.16b, v19.16b // QS1 = clamp(QS1-a) |
| 448 | sqadd v3.16b, v3.16b, v22.16b // PS0 = clamp(PS0+a) | 448 | sqadd v3.16b, v3.16b, v22.16b // PS0 = clamp(PS0+a) |
| 449 | sqsub v4.16b, v4.16b, v22.16b // QS0 = clamp(QS0-a) | 449 | sqsub v4.16b, v4.16b, v22.16b // QS0 = clamp(QS0-a) |
| 450 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 | 450 | eor v3.16b, v3.16b, v21.16b // P0 = PS0 ^ 0x80 |
| 451 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 | 451 | eor v4.16b, v4.16b, v21.16b // Q0 = QS0 ^ 0x80 |
| 452 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 | 452 | eor v2.16b, v2.16b, v21.16b // P1 = PS1 ^ 0x80 |
| 453 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 | 453 | eor v5.16b, v5.16b, v21.16b // Q1 = QS1 ^ 0x80 |
| 454 | eor v1.16b, v1.16b, v21.16b // P2 = PS2 ^ 0x80 | 454 | eor v1.16b, v1.16b, v21.16b // P2 = PS2 ^ 0x80 |
| 455 | eor v6.16b, v6.16b, v21.16b // Q2 = QS2 ^ 0x80 | 455 | eor v6.16b, v6.16b, v21.16b // Q2 = QS2 ^ 0x80 |
| 456 | .endif | 456 | .endif |
| 457 | .endm | 457 | .endm |
| 458 | 458 | ||
| @@ -507,48 +507,48 @@ function ff_vp8_v_loop_filter8uv\name\()_neon, export=1 · 48 unmodified lines | |||
| 507 | sub x0, x0, x2, lsl #2 | 507 | sub x0, x0, x2, lsl #2 |
| 508 | sub x1, x1, x2, lsl #2 | 508 | sub x1, x1, x2, lsl #2 |
| 509 | // Load pixels: | 509 | // Load pixels: |
| 510 | ld1 {v0.d}[0], [x0], x2 // P3 | 510 | ld1 {v0.d}[0], [x0], x2 // P3 |
| 511 | ld1 {v0.d}[1], [x1], x2 // P3 | 511 | ld1 {v0.d}[1], [x1], x2 // P3 |
| 512 | ld1 {v1.d}[0], [x0], x2 // P2 | 512 | ld1 {v1.d}[0], [x0], x2 // P2 |
| 513 | ld1 {v1.d}[1], [x1], x2 // P2 | 513 | ld1 {v1.d}[1], [x1], x2 // P2 |
| 514 | ld1 {v2.d}[0], [x0], x2 // P1 | 514 | ld1 {v2.d}[0], [x0], x2 // P1 |
| 515 | ld1 {v2.d}[1], [x1], x2 // P1 | 515 | ld1 {v2.d}[1], [x1], x2 // P1 |
| 516 | ld1 {v3.d}[0], [x0], x2 // P0 | 516 | ld1 {v3.d}[0], [x0], x2 // P0 |
| 517 | ld1 {v3.d}[1], [x1], x2 // P0 | 517 | ld1 {v3.d}[1], [x1], x2 // P0 |
| 518 | ld1 {v4.d}[0], [x0], x2 // Q0 | 518 | ld1 {v4.d}[0], [x0], x2 // Q0 |
| 519 | ld1 {v4.d}[1], [x1], x2 // Q0 | 519 | ld1 {v4.d}[1], [x1], x2 // Q0 |
| 520 | ld1 {v5.d}[0], [x0], x2 // Q1 | 520 | ld1 {v5.d}[0], [x0], x2 // Q1 |
| 521 | ld1 {v5.d}[1], [x1], x2 // Q1 | 521 | ld1 {v5.d}[1], [x1], x2 // Q1 |
| 522 | ld1 {v6.d}[0], [x0], x2 // Q2 | 522 | ld1 {v6.d}[0], [x0], x2 // Q2 |
| 523 | ld1 {v6.d}[1], [x1], x2 // Q2 | 523 | ld1 {v6.d}[1], [x1], x2 // Q2 |
| 524 | ld1 {v7.d}[0], [x0] // Q3 | 524 | ld1 {v7.d}[0], [x0] // Q3 |
| 525 | ld1 {v7.d}[1], [x1] // Q3 | 525 | ld1 {v7.d}[1], [x1] // Q3 |
| 526 | 526 | ||
| 527 | dup v22.16b, w3 // flim_E | 527 | dup v22.16b, w3 // flim_E |
| 528 | dup v23.16b, w4 // flim_I | 528 | dup v23.16b, w4 // flim_I |
| 529 | 529 | ||
| 530 | vp8_loop_filter inner=\inner, hev_thresh=w5 | 530 | vp8_loop_filter inner=\inner, hev_thresh=w5 |
| 531 | 531 | ||
| 532 | // back up to P2: u,v -= stride * 6 | 532 | // back up to P2: u,v -= stride * 6 |
| 533 | sub x0, x0, x2, lsl #2 | 533 | sub x0, x0, x2, lsl #2 |
| 534 | sub x1, x1, x2, lsl #2 | 534 | sub x1, x1, x2, lsl #2 |
| 535 | sub x0, x0, x2, lsl #1 | 535 | sub x0, x0, x2, lsl #1 |
| 536 | sub x1, x1, x2, lsl #1 | 536 | sub x1, x1, x2, lsl #1 |
| 537 | 537 | ||
| 538 | // Store pixels: | 538 | // Store pixels: |
| 539 | 539 | ||
| 540 | st1 {v1.d}[0], [x0], x2 // P2 | 540 | st1 {v1.d}[0], [x0], x2 // P2 |
| 541 | st1 {v1.d}[1], [x1], x2 // P2 | 541 | st1 {v1.d}[1], [x1], x2 // P2 |
| 542 | st1 {v2.d}[0], [x0], x2 // P1 | 542 | st1 {v2.d}[0], [x0], x2 // P1 |
| 543 | st1 {v2.d}[1], [x1], x2 // P1 | 543 | st1 {v2.d}[1], [x1], x2 // P1 |
| 544 | st1 {v3.d}[0], [x0], x2 // P0 | 544 | st1 {v3.d}[0], [x0], x2 // P0 |
| 545 | st1 {v3.d}[1], [x1], x2 // P0 | 545 | st1 {v3.d}[1], [x1], x2 // P0 |
| 546 | st1 {v4.d}[0], [x0], x2 // Q0 | 546 | st1 {v4.d}[0], [x0], x2 // Q0 |
| 547 | st1 {v4.d}[1], [x1], x2 // Q0 | 547 | st1 {v4.d}[1], [x1], x2 // Q0 |
| 548 | st1 {v5.d}[0], [x0], x2 // Q1 | 548 | st1 {v5.d}[0], [x0], x2 // Q1 |
| 549 | st1 {v5.d}[1], [x1], x2 // Q1 | 549 | st1 {v5.d}[1], [x1], x2 // Q1 |
| 550 | st1 {v6.d}[0], [x0] // Q2 | 550 | st1 {v6.d}[0], [x0] // Q2 |
| 551 | st1 {v6.d}[1], [x1] // Q2 | 551 | st1 {v6.d}[1], [x1] // Q2 |
| 552 | 552 | ||
| 553 | ret | 553 | ret |
| 554 | endfunc | 554 | endfunc |
| @@ -579,7 +579,7 @@ function ff_vp8_h_loop_filter16\name\()_neon, export=1 · 24 unmodified lines | |||
| 579 | ld1 {v6.d}[1], [x0], x1 | 579 | ld1 {v6.d}[1], [x0], x1 |
| 580 | ld1 {v7.d}[1], [x0], x1 | 580 | ld1 {v7.d}[1], [x0], x1 |
| 581 | 581 | ||
| 582 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 | 582 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 |
| 583 | 583 | ||
| 584 | dup v22.16b, w2 // flim_E | 584 | dup v22.16b, w2 // flim_E |
| 585 | .if !\simple | 585 | .if !\simple |
| @@ -590,7 +590,7 @@ function ff_vp8_h_loop_filter16\name\()_neon, export=1 · 4 unmodified lines | |||
| 590 | 590 | ||
| 591 | sub x0, x0, x1, lsl #4 // backup 16 rows | 591 | sub x0, x0, x1, lsl #4 // backup 16 rows |
| 592 | 592 | ||
| 593 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 | 593 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 |
| 594 | 594 | ||
| 595 | // Store pixels: | 595 | // Store pixels: |
| 596 | st1 {v0.d}[0], [x0], x1 | 596 | st1 {v0.d}[0], [x0], x1 |
| @@ -624,24 +624,24 @@ function ff_vp8_h_loop_filter8uv\name\()_neon, export=1 · 27 unmodified lines | |||
| 624 | sub x1, x1, #4 | 624 | sub x1, x1, #4 |
| 625 | 625 | ||
| 626 | // Load pixels: | 626 | // Load pixels: |
| 627 | ld1 {v0.d}[0], [x0], x2 // load u | 627 | ld1 {v0.d}[0], [x0], x2 // load u |
| 628 | ld1 {v0.d}[1], [x1], x2 // load v | 628 | ld1 {v0.d}[1], [x1], x2 // load v |
| 629 | ld1 {v1.d}[0], [x0], x2 | 629 | ld1 {v1.d}[0], [x0], x2 |
| 630 | ld1 {v1.d}[1], [x1], x2 | 630 | ld1 {v1.d}[1], [x1], x2 |
| 631 | ld1 {v2.d}[0], [x0], x2 | 631 | ld1 {v2.d}[0], [x0], x2 |
| 632 | ld1 {v2.d}[1], [x1], x2 | 632 | ld1 {v2.d}[1], [x1], x2 |
| 633 | ld1 {v3.d}[0], [x0], x2 | 633 | ld1 {v3.d}[0], [x0], x2 |
| 634 | ld1 {v3.d}[1], [x1], x2 | 634 | ld1 {v3.d}[1], [x1], x2 |
| 635 | ld1 {v4.d}[0], [x0], x2 | 635 | ld1 {v4.d}[0], [x0], x2 |
| 636 | ld1 {v4.d}[1], [x1], x2 | 636 | ld1 {v4.d}[1], [x1], x2 |
| 637 | ld1 {v5.d}[0], [x0], x2 | 637 | ld1 {v5.d}[0], [x0], x2 |
| 638 | ld1 {v5.d}[1], [x1], x2 | 638 | ld1 {v5.d}[1], [x1], x2 |
| 639 | ld1 {v6.d}[0], [x0], x2 | 639 | ld1 {v6.d}[0], [x0], x2 |
| 640 | ld1 {v6.d}[1], [x1], x2 | 640 | ld1 {v6.d}[1], [x1], x2 |
| 641 | ld1 {v7.d}[0], [x0], x2 | 641 | ld1 {v7.d}[0], [x0], x2 |
| 642 | ld1 {v7.d}[1], [x1], x2 | 642 | ld1 {v7.d}[1], [x1], x2 |
| 643 | 643 | ||
| 644 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 | 644 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 |
| 645 | 645 | ||
| 646 | dup v22.16b, w3 // flim_E | 646 | dup v22.16b, w3 // flim_E |
| 647 | dup v23.16b, w4 // flim_I | 647 | dup v23.16b, w4 // flim_I |
| @@ -651,25 +651,25 @@ function ff_vp8_h_loop_filter8uv\name\()_neon, export=1 · 3 unmodified lines | |||
| 651 | sub x0, x0, x2, lsl #3 // backup u 8 rows | 651 | sub x0, x0, x2, lsl #3 // backup u 8 rows |
| 652 | sub x1, x1, x2, lsl #3 // backup v 8 rows | 652 | sub x1, x1, x2, lsl #3 // backup v 8 rows |
| 653 | 653 | ||
| 654 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 | 654 | transpose_8x16B v0, v1, v2, v3, v4, v5, v6, v7, v30, v31 |
| 655 | 655 | ||
| 656 | // Store pixels: | 656 | // Store pixels: |
| 657 | st1 {v0.d}[0], [x0], x2 // load u | 657 | st1 {v0.d}[0], [x0], x2 // load u |
| 658 | st1 {v0.d}[1], [x1], x2 // load v | 658 | st1 {v0.d}[1], [x1], x2 // load v |
| 659 | st1 {v1.d}[0], [x0], x2 | 659 | st1 {v1.d}[0], [x0], x2 |
| 660 | st1 {v1.d}[1], [x1], x2 | 660 | st1 {v1.d}[1], [x1], x2 |
| 661 | st1 {v2.d}[0], [x0], x2 | 661 | st1 {v2.d}[0], [x0], x2 |
| 662 | st1 {v2.d}[1], [x1], x2 | 662 | st1 {v2.d}[1], [x1], x2 |
| 663 | st1 {v3.d}[0], [x0], x2 | 663 | st1 {v3.d}[0], [x0], x2 |
| 664 | st1 {v3.d}[1], [x1], x2 | 664 | st1 {v3.d}[1], [x1], x2 |
| 665 | st1 {v4.d}[0], [x0], x2 | 665 | st1 {v4.d}[0], [x0], x2 |
| 666 | st1 {v4.d}[1], [x1], x2 | 666 | st1 {v4.d}[1], [x1], x2 |
| 667 | st1 {v5.d}[0], [x0], x2 | 667 | st1 {v5.d}[0], [x0], x2 |
| 668 | st1 {v5.d}[1], [x1], x2 | 668 | st1 {v5.d}[1], [x1], x2 |
| 669 | st1 {v6.d}[0], [x0], x2 | 669 | st1 {v6.d}[0], [x0], x2 |
| 670 | st1 {v6.d}[1], [x1], x2 | 670 | st1 {v6.d}[1], [x1], x2 |
| 671 | st1 {v7.d}[0], [x0] | 671 | st1 {v7.d}[0], [x0] |
| 672 | st1 {v7.d}[1], [x1] | 672 | st1 {v7.d}[1], [x1] |
| 673 | 673 | ||
| 674 | ret | 674 | ret |
| 675 | 675 | ||
| @@ -729,9 +729,9 @@ FFT16_FN ns_float, 1 · 728 unmodified lines | |||
| 729 | .endm | 729 | .endm |
| 730 | 730 | ||
| 731 | .macro SR_COMBINE_4 len, part, off | 731 | .macro SR_COMBINE_4 len, part, off |
| 732 | add x10, x1, x21 | 732 | add x10, x1, x21 |
| 733 | add x11, x1, x21, lsl #1 | 733 | add x11, x1, x21, lsl #1 |
| 734 | add x12, x1, x22 | 734 | add x12, x1, x22 |
| 735 | 735 | ||
| 736 | ldp q0, q1, [x1, #((0 + \part)*32 + \off)] | 736 | ldp q0, q1, [x1, #((0 + \part)*32 + \off)] |
| 737 | ldp q4, q5, [x1, #((2 + \part)*32 + \off)] | 737 | ldp q4, q5, [x1, #((2 + \part)*32 + \off)] |
| @@ -759,9 +759,9 @@ FFT16_FN ns_float, 1 · 21 unmodified lines | |||
| 759 | .endm | 759 | .endm |
| 760 | 760 | ||
| 761 | .macro SR_COMBINE_FULL len, off=0 | 761 | .macro SR_COMBINE_FULL len, off=0 |
| 762 | add x10, x1, x21 | 762 | add x10, x1, x21 |
| 763 | add x11, x1, x21, lsl #1 | 763 | add x11, x1, x21, lsl #1 |
| 764 | add x12, x1, x22 | 764 | add x12, x1, x22 |
| 765 | 765 | ||
| 766 | SR_COMBINE_4 \len, 0, \off | 766 | SR_COMBINE_4 \len, 0, \off |
| 767 | SR_COMBINE_4 \len, 1, \off | 767 | SR_COMBINE_4 \len, 1, \off |