This gets rid of a couple instructions, but the actual performance is almost identical on Cortex A72/A73. On Cortex A53, it is a handful of cycles faster.
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -512,11 +512,10 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 511 unmodified lines | |||
| 512 | .ifc \type, qpel | 512 | .ifc \type, qpel |
| 513 | mov dststride, #(MAX_PB_SIZE << 1) | 513 | mov dststride, #(MAX_PB_SIZE << 1) |
| 514 | lsl x13, srcstride, #1 // srcstridel | 514 | lsl x13, srcstride, #1 // srcstridel |
| 515 | mov x14, #((MAX_PB_SIZE << 2) - 16) | 515 | mov x14, #(MAX_PB_SIZE << 2) |
| 516 | .else | 516 | .else |
| 517 | lsl x14, dststride, #1 // dststridel | 517 | lsl x14, dststride, #1 // dststridel |
| 518 | lsl x13, srcstride, #1 // srcstridel | 518 | lsl x13, srcstride, #1 // srcstridel |
| 519 | sub x14, x14, #8 | ||
| 520 | .endif | 519 | .endif |
| 521 | add x10, dst, dststride // dstb | 520 | add x10, dst, dststride // dstb |
| 522 | add x12, src, srcstride // srcb | 521 | add x12, src, srcstride // srcb |
| @@ -527,10 +526,8 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 4 unmodified lines | |||
| 527 | bl ff_hevc_put_hevc_h16_8_neon | 526 | bl ff_hevc_put_hevc_h16_8_neon |
| 528 | 527 | ||
| 529 | .ifc \type, qpel | 528 | .ifc \type, qpel |
| 530 | st1 {v26.8h}, [dst], #16 | 529 | st1 {v26.8h, v27.8h}, [dst], x14 |
| 531 | st1 {v28.8h}, [x10], #16 | 530 | st1 {v28.8h, v29.8h}, [x10], x14 |
| 532 | st1 {v27.8h}, [dst], x14 | ||
| 533 | st1 {v29.8h}, [x10], x14 | ||
| 534 | .else | 531 | .else |
| 535 | .ifc \type, qpel_bi | 532 | .ifc \type, qpel_bi |
| 536 | ld1 {v16.8h, v17.8h}, [ x4], x16 | 533 | ld1 {v16.8h, v17.8h}, [ x4], x16 |
| @@ -549,10 +546,8 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 12 unmodified lines | |||
| 549 | sqrshrun v28.8b, v28.8h, #6 | 546 | sqrshrun v28.8b, v28.8h, #6 |
| 550 | sqrshrun v29.8b, v29.8h, #6 | 547 | sqrshrun v29.8b, v29.8h, #6 |
| 551 | .endif | 548 | .endif |
| 552 | st1 {v26.8b}, [dst], #8 | 549 | st1 {v26.8b, v27.8b}, [dst], x14 |
| 553 | st1 {v28.8b}, [x10], #8 | 550 | st1 {v28.8b, v29.8b}, [x10], x14 |
| 554 | st1 {v27.8b}, [dst], x14 | ||
| 555 | st1 {v29.8b}, [x10], x14 | ||
| 556 | .endif | 551 | .endif |
| 557 | b.gt 1b // double line | 552 | b.gt 1b // double line |
| 558 | subs width, width, #16 | 553 | subs width, width, #16 |