History

aarch64: vp9itxfm: Move the load_add_store macro out from the itxfm16 pass2 function

This allows reusing the macro for a separate implementation of the pass2 function.

Martin Storsjö committed 9 years ago

Commit 79d332e1 parent 47b3c2c1 file · +45 −45Browse files

Unified · Split

libavcodec/aarch64/vp9itxfm_neon.S+45−45
@@ -598,6 +598,51 @@ endfunc · 597 unmodified lines
598598 st1 {v2.8h}, [\src], \inc
599599 .endm
600600
601+.macro load_add_store coef0, coef1, coef2, coef3, coef4, coef5, coef6, coef7, tmp1, tmp2
602+ srshr \coef0, \coef0, #6
603+ ld1 {v2.8b}, [x0], x1
604+ srshr \coef1, \coef1, #6
605+ ld1 {v3.8b}, [x3], x1
606+ srshr \coef2, \coef2, #6
607+ ld1 {v4.8b}, [x0], x1
608+ srshr \coef3, \coef3, #6
609+ uaddw \coef0, \coef0, v2.8b
610+ ld1 {v5.8b}, [x3], x1
611+ uaddw \coef1, \coef1, v3.8b
612+ srshr \coef4, \coef4, #6
613+ ld1 {v6.8b}, [x0], x1
614+ srshr \coef5, \coef5, #6
615+ ld1 {v7.8b}, [x3], x1
616+ sqxtun v2.8b, \coef0
617+ srshr \coef6, \coef6, #6
618+ sqxtun v3.8b, \coef1
619+ srshr \coef7, \coef7, #6
620+ uaddw \coef2, \coef2, v4.8b
621+ ld1 {\tmp1}, [x0], x1
622+ uaddw \coef3, \coef3, v5.8b
623+ ld1 {\tmp2}, [x3], x1
624+ sqxtun v4.8b, \coef2
625+ sub x0, x0, x1, lsl #2
626+ sub x3, x3, x1, lsl #2
627+ sqxtun v5.8b, \coef3
628+ uaddw \coef4, \coef4, v6.8b
629+ st1 {v2.8b}, [x0], x1
630+ uaddw \coef5, \coef5, v7.8b
631+ st1 {v3.8b}, [x3], x1
632+ sqxtun v6.8b, \coef4
633+ st1 {v4.8b}, [x0], x1
634+ sqxtun v7.8b, \coef5
635+ st1 {v5.8b}, [x3], x1
636+ uaddw \coef6, \coef6, \tmp1
637+ st1 {v6.8b}, [x0], x1
638+ uaddw \coef7, \coef7, \tmp2
639+ st1 {v7.8b}, [x3], x1
640+ sqxtun \tmp1, \coef6
641+ sqxtun \tmp2, \coef7
642+ st1 {\tmp1}, [x0], x1
643+ st1 {\tmp2}, [x3], x1
644+.endm
645+
601646 // Read a vertical 8x16 slice out of a 16x16 matrix, do a transform on it,
602647 // transpose into a horizontal 16x8 slice and store.
603648 // x0 = dst (temp buffer)
@@ -671,53 +716,8 @@ function \txfm\()16_1d_8x16_pass2_neon · 67 unmodified lines
671716 lsl x1, x1, #1
672717 bl \txfm\()16
673718
674−.macro load_add_store coef0, coef1, coef2, coef3, coef4, coef5, coef6, coef7, tmp1, tmp2
675− srshr \coef0, \coef0, #6
676− ld1 {v2.8b}, [x0], x1
677− srshr \coef1, \coef1, #6
678− ld1 {v3.8b}, [x3], x1
679− srshr \coef2, \coef2, #6
680− ld1 {v4.8b}, [x0], x1
681− srshr \coef3, \coef3, #6
682− uaddw \coef0, \coef0, v2.8b
683− ld1 {v5.8b}, [x3], x1
684− uaddw \coef1, \coef1, v3.8b
685− srshr \coef4, \coef4, #6
686− ld1 {v6.8b}, [x0], x1
687− srshr \coef5, \coef5, #6
688− ld1 {v7.8b}, [x3], x1
689− sqxtun v2.8b, \coef0
690− srshr \coef6, \coef6, #6
691− sqxtun v3.8b, \coef1
692− srshr \coef7, \coef7, #6
693− uaddw \coef2, \coef2, v4.8b
694− ld1 {\tmp1}, [x0], x1
695− uaddw \coef3, \coef3, v5.8b
696− ld1 {\tmp2}, [x3], x1
697− sqxtun v4.8b, \coef2
698− sub x0, x0, x1, lsl #2
699− sub x3, x3, x1, lsl #2
700− sqxtun v5.8b, \coef3
701− uaddw \coef4, \coef4, v6.8b
702− st1 {v2.8b}, [x0], x1
703− uaddw \coef5, \coef5, v7.8b
704− st1 {v3.8b}, [x3], x1
705− sqxtun v6.8b, \coef4
706− st1 {v4.8b}, [x0], x1
707− sqxtun v7.8b, \coef5
708− st1 {v5.8b}, [x3], x1
709− uaddw \coef6, \coef6, \tmp1
710− st1 {v6.8b}, [x0], x1
711− uaddw \coef7, \coef7, \tmp2
712− st1 {v7.8b}, [x3], x1
713− sqxtun \tmp1, \coef6
714− sqxtun \tmp2, \coef7
715− st1 {\tmp1}, [x0], x1
716− st1 {\tmp2}, [x3], x1
717−.endm
718719 load_add_store v16.8h, v17.8h, v18.8h, v19.8h, v20.8h, v21.8h, v22.8h, v23.8h, v16.8b, v17.8b
719720 load_add_store v24.8h, v25.8h, v26.8h, v27.8h, v28.8h, v29.8h, v30.8h, v31.8h, v16.8b, v17.8b
720−.purgem load_add_store
721721
722722 br x14
723723 endfunc

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