10c1bc742181ded4930842b46e9507372f0b1b963James Dong/*
20c1bc742181ded4930842b46e9507372f0b1b963James Dong * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
30c1bc742181ded4930842b46e9507372f0b1b963James Dong *
40c1bc742181ded4930842b46e9507372f0b1b963James Dong */
50c1bc742181ded4930842b46e9507372f0b1b963James Dong
60c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 24, 1
70c1bc742181ded4930842b46e9507372f0b1b963James Dong    .eabi_attribute 25, 1
80c1bc742181ded4930842b46e9507372f0b1b963James Dong
90c1bc742181ded4930842b46e9507372f0b1b963James Dong    .arm
100c1bc742181ded4930842b46e9507372f0b1b963James Dong    .fpu neon
1122e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .text
120c1bc742181ded4930842b46e9507372f0b1b963James Dong    .align 4
130c1bc742181ded4930842b46e9507372f0b1b963James Dong
140c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_pIndexTable8x8:
1522e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word  OMX_VC_CHROMA_DC-(P0+8),    OMX_VC_CHROMA_HOR-(P0+8)
1622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    .word  OMX_VC_CHROMA_VERT-(P0+8),  OMX_VC_CHROMA_PLANE-(P0+8)
170c1bc742181ded4930842b46e9507372f0b1b963James Dong
180c1bc742181ded4930842b46e9507372f0b1b963James DongarmVCM4P10_MultiplierTableChroma8x8:
190c1bc742181ded4930842b46e9507372f0b1b963James Dong    .hword   3, 2, 1,4
200c1bc742181ded4930842b46e9507372f0b1b963James Dong    .hword  -3,-2,-1,0
210c1bc742181ded4930842b46e9507372f0b1b963James Dong    .hword   1, 2, 3,4
220c1bc742181ded4930842b46e9507372f0b1b963James Dong
230c1bc742181ded4930842b46e9507372f0b1b963James Dong    .global omxVCM4P10_PredictIntraChroma_8x8
240c1bc742181ded4930842b46e9507372f0b1b963James Dong    .func   omxVCM4P10_PredictIntraChroma_8x8
250c1bc742181ded4930842b46e9507372f0b1b963James DongomxVCM4P10_PredictIntraChroma_8x8:
260c1bc742181ded4930842b46e9507372f0b1b963James Dong    PUSH     {r4-r10,lr}
270c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPUSH    {d8-d15}
2822e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    ADR      r8, armVCM4P10_pIndexTable8x8
290c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r6,[sp,#0x68]
300c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r4,[sp,#0x60]
310c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r5,[sp,#0x64]
320c1bc742181ded4930842b46e9507372f0b1b963James Dong    LDR      r7,[sp,#0x6c]
3322e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    LDR      r8,[r8,r6,LSL #2]
3422e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP0: ADD      pc,r8
3522e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel
360c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_CHROMA_DC:
370c1bc742181ded4930842b46e9507372f0b1b963James Dong    TST      r7,#2
380c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0xe8
390c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r0,r4
400c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r4,r4
410c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[0]},[r0],r10
420c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[1]},[r9],r10
430c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[2]},[r0],r10
440c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[3]},[r9],r10
450c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[4]},[r0],r10
460c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[5]},[r9],r10
470c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[6]},[r0],r10
480c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[7]},[r9]
490c1bc742181ded4930842b46e9507372f0b1b963James Dong    TST      r7,#1
500c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0xcc
510c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d0},[r1]
520c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
530c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U8 d2,d0
540c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U16 d3,d2
550c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U8 d2,d1
560c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U16 d1,d2
570c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I32 d2,d3,d1
580c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.U32 d2,d2,#3
590c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.U32 d3,d3,#2
600c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.U32 d1,d1,#2
610c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMOV.I8  d5,#0xc
620c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMOV.I8  d6,#0x4
630c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I64 d5,d5,#32
640c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHR.U64 d6,d6,#32
650c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I8  d6,d6,d5
660c1bc742181ded4930842b46e9507372f0b1b963James Dong    VTBL.8   d0,{d2-d3},d5
670c1bc742181ded4930842b46e9507372f0b1b963James Dong    VTBL.8   d4,{d1-d2},d6
680c1bc742181ded4930842b46e9507372f0b1b963James DongL0x9c:
690c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r3,r5
700c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r5,r5
710c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
720c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9],r10
730c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
740c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9],r10
750c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d4},[r3],r10
760c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d4},[r9],r10
770c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d4},[r3],r10
780c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d4},[r9]
790c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPOP     {d8-d15}
800c1bc742181ded4930842b46e9507372f0b1b963James Dong    POP      {r4-r10,pc}
810c1bc742181ded4930842b46e9507372f0b1b963James DongL0xcc:
820c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
830c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U8 d2,d1
840c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U16 d1,d2
850c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.U32 d1,d1,#2
860c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.8   d0,d1[0]
870c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.8   d4,d1[4]
880c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x9c
890c1bc742181ded4930842b46e9507372f0b1b963James DongL0xe8:
900c1bc742181ded4930842b46e9507372f0b1b963James Dong    TST      r7,#1
910c1bc742181ded4930842b46e9507372f0b1b963James Dong    BEQ      L0x114
920c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d0},[r1]
930c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
940c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U8 d2,d0
950c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.U16 d3,d2
960c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.U32 d3,d3,#2
970c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMOV.I8  d5,#0x4
980c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I64 d5,d5,#32
990c1bc742181ded4930842b46e9507372f0b1b963James Dong    VTBL.8   d0,{d3},d5
1000c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x11c
1010c1bc742181ded4930842b46e9507372f0b1b963James DongL0x114:
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMOV.I8  d0,#0x80
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
1040c1bc742181ded4930842b46e9507372f0b1b963James DongL0x11c:
1050c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r3,r5
1060c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r5,r5
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
1080c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9],r10
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9],r10
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
1120c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9],r10
1130c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r9]
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPOP     {d8-d15}
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong    POP      {r4-r10,pc}
1170c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_CHROMA_VERT:
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d0},[r1]
1190c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
1200c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x11c
1210c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_CHROMA_HOR:
1220c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r0,r4
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r4,r4
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d0[]},[r0],r10
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[]},[r9],r10
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d2[]},[r0],r10
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d3[]},[r9],r10
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d4[]},[r0],r10
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d5[]},[r9],r10
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d6[]},[r0],r10
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d7[]},[r9]
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    B        L0x28c
1330c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_CHROMA_PLANE:
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r0,r4
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r4,r4
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d0},[r1]
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d2[0]},[r2]
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[0]},[r0],r10
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[1]},[r9],r10
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[2]},[r0],r10
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[3]},[r9],r10
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[4]},[r0],r10
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[5]},[r9],r10
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[6]},[r0],r10
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.8   {d1[7]},[r9]
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong    VREV64.8 d3,d0
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSUBL.U8 q3,d3,d2
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHR.U64 d3,d3,#8
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSUBL.U8 q2,d3,d0
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong    VREV64.8 d3,d1
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSUBL.U8 q7,d3,d2
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHR.U64 d3,d3,#8
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSUBL.U8 q6,d3,d1
15422e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel    ADR      r2, armVCM4P10_MultiplierTableChroma8x8
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I64 d4,d4,#16
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong    VEXT.8   d9,d4,d6,#2
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.16  {d10},[r2]!
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I64 d12,d12,#16
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong    VEXT.8   d16,d12,d14,#2
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMUL.I16 d11,d9,d10
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMUL.I16 d3,d16,d10
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADD.I16 d3,d11,d3
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPADDL.S16 d3,d3
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I32 d2,d3,#4
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I32 d3,d3,d2
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong    VLD1.16  {d10,d11},[r2]
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong    VRSHR.S32 d3,d3,#5
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADDL.U8 q0,d0,d1
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q0,d1[3]
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong    VSHL.I16 q0,q0,#4
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q2,d3[0]
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q3,d3[2]
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMUL.I16 q2,q2,q5
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong    VMUL.I16 q3,q3,q5
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q2,q2,q0
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q0,d6[0]
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q1,d6[1]
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q4,d6[2]
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q5,d6[3]
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q6,d7[0]
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q7,d7[1]
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q8,d7[2]
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong    VDUP.16  q9,d7[3]
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q0,q2,q0
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q1,q2,q1
1860c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q4,q2,q4
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q5,q2,q5
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q6,q2,q6
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q7,q2,q7
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q8,q2,q8
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong    VADD.I16 q9,q2,q9
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d0,q0,#5
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d1,q1,#5
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d2,q4,#5
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d3,q5,#5
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d4,q6,#5
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d5,q7,#5
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d6,q8,#5
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong    VQRSHRUN.S16 d7,q9,#5
2000c1bc742181ded4930842b46e9507372f0b1b963James DongL0x28c:
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r9,r3,r5
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong    ADD      r10,r5,r5
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d0},[r3],r10
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d1},[r9],r10
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d2},[r3],r10
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d3},[r9],r10
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d4},[r3],r10
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d5},[r9],r10
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d6},[r3],r10
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong    VST1.8   {d7},[r9]
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong    MOV      r0,#0
2120c1bc742181ded4930842b46e9507372f0b1b963James Dong    VPOP     {d8-d15}
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong    POP      {r4-r10,pc}
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong    .endfunc
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong    .end
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong
218