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
512.ifc \type, qpel512.ifc \type, qpel
513 mov dststride, #(MAX_PB_SIZE << 1)513 mov dststride, #(MAX_PB_SIZE << 1)
514 lsl x13, srcstride, #1 // srcstridel514 lsl x13, srcstride, #1 // srcstridel
515 mov x14, #((MAX_PB_SIZE << 2) - 16)515 mov x14, #(MAX_PB_SIZE << 2)
516.else516.else
517 lsl x14, dststride, #1 // dststridel517 lsl x14, dststride, #1 // dststridel
518 lsl x13, srcstride, #1 // srcstridel518 lsl x13, srcstride, #1 // srcstridel
519 sub x14, x14, #8
520.endif519.endif
521 add x10, dst, dststride // dstb520 add x10, dst, dststride // dstb
522 add x12, src, srcstride // srcb521 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_neon526 bl ff_hevc_put_hevc_h16_8_neon
528 527
529.ifc \type, qpel528.ifc \type, qpel
530 st1 {v26.8h}, [dst], #16529 st1 {v26.8h, v27.8h}, [dst], x14
531 st1 {v28.8h}, [x10], #16530 st1 {v28.8h, v29.8h}, [x10], x14
532 st1 {v27.8h}, [dst], x14
533 st1 {v29.8h}, [x10], x14
534.else531.else
535.ifc \type, qpel_bi532.ifc \type, qpel_bi
536 ld1 {v16.8h, v17.8h}, [ x4], x16533 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, #6546 sqrshrun v28.8b, v28.8h, #6
550 sqrshrun v29.8b, v29.8h, #6547 sqrshrun v29.8b, v29.8h, #6
551.endif548.endif
552 st1 {v26.8b}, [dst], #8549 st1 {v26.8b, v27.8b}, [dst], x14
553 st1 {v28.8b}, [x10], #8550 st1 {v28.8b, v29.8b}, [x10], x14
554 st1 {v27.8b}, [dst], x14
555 st1 {v29.8b}, [x10], x14
556.endif551.endif
557 b.gt 1b // double line552 b.gt 1b // double line
558 subs width, width, #16553 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