History

aarch64: hevc: Merge consecutive stores in put_hevc_\type\()_h16_8_neon

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.

Martin Storsjö committed 2 years ago

Commit e3a54ca1 parent 78db8401 file · +5 −10Browse files

Showing the changes to libavcodec (1 of 1 file). Show all

Unified · Split

libavcodec/aarch64/hevcdsp_qpel_neon.S+5−10
@@ -512,11 +512,10 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 511 unmodified lines
512512 .ifc \type, qpel
513513 mov dststride, #(MAX_PB_SIZE << 1)
514514 lsl x13, srcstride, #1 // srcstridel
515− mov x14, #((MAX_PB_SIZE << 2) - 16)
515+ mov x14, #(MAX_PB_SIZE << 2)
516516 .else
517517 lsl x14, dststride, #1 // dststridel
518518 lsl x13, srcstride, #1 // srcstridel
519− sub x14, x14, #8
520519 .endif
521520 add x10, dst, dststride // dstb
522521 add x12, src, srcstride // srcb
@@ -527,10 +526,8 @@ function ff_hevc_put_hevc_\type\()_h16_8_neon, export=1 · 4 unmodified lines
527526 bl ff_hevc_put_hevc_h16_8_neon
528527
529528 .ifc \type, qpel
530− st1 {v26.8h}, [dst], #16
531− st1 {v28.8h}, [x10], #16
532− st1 {v27.8h}, [dst], x14
533− st1 {v29.8h}, [x10], x14
529+ st1 {v26.8h, v27.8h}, [dst], x14
530+ st1 {v28.8h, v29.8h}, [x10], x14
534531 .else
535532 .ifc \type, qpel_bi
536533 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
549546 sqrshrun v28.8b, v28.8h, #6
550547 sqrshrun v29.8b, v29.8h, #6
551548 .endif
552− st1 {v26.8b}, [dst], #8
553− st1 {v28.8b}, [x10], #8
554− st1 {v27.8b}, [dst], x14
555− st1 {v29.8b}, [x10], x14
549+ st1 {v26.8b, v27.8b}, [dst], x14
550+ st1 {v28.8b, v29.8b}, [x10], x14
556551 .endif
557552 b.gt 1b // double line
558553 subs width, width, #16

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