10c1bc742181ded4930842b46e9507372f0b1b963James Dong/* 278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Copyright (C) 2007-2008 ARM Limited 378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Licensed under the Apache License, Version 2.0 (the "License"); 578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * you may not use this file except in compliance with the License. 678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * You may obtain a copy of the License at 778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * http://www.apache.org/licenses/LICENSE-2.0 978e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 1078e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * Unless required by applicable law or agreed to in writing, software 1178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * distributed under the License is distributed on an "AS IS" BASIS, 1278e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 1378e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * See the License for the specific language governing permissions and 1478e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * limitations under the License. 1578e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar * 1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar */ 1778e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar/* 180c1bc742181ded4930842b46e9507372f0b1b963James Dong * 190c1bc742181ded4930842b46e9507372f0b1b963James Dong */ 200c1bc742181ded4930842b46e9507372f0b1b963James Dong 210c1bc742181ded4930842b46e9507372f0b1b963James Dong .eabi_attribute 24, 1 220c1bc742181ded4930842b46e9507372f0b1b963James Dong .eabi_attribute 25, 1 230c1bc742181ded4930842b46e9507372f0b1b963James Dong 240c1bc742181ded4930842b46e9507372f0b1b963James Dong .arm 250c1bc742181ded4930842b46e9507372f0b1b963James Dong .fpu neon 260c1bc742181ded4930842b46e9507372f0b1b963James Dong .text 270c1bc742181ded4930842b46e9507372f0b1b963James Dong 280c1bc742181ded4930842b46e9507372f0b1b963James Dong .global omxVCM4P10_DequantTransformResidualFromPairAndAdd 290c1bc742181ded4930842b46e9507372f0b1b963James Dong .func omxVCM4P10_DequantTransformResidualFromPairAndAdd 300c1bc742181ded4930842b46e9507372f0b1b963James DongomxVCM4P10_DequantTransformResidualFromPairAndAdd: 310c1bc742181ded4930842b46e9507372f0b1b963James Dong PUSH {r4-r12,lr} 320c1bc742181ded4930842b46e9507372f0b1b963James Dong VPUSH {d8-d9} 330c1bc742181ded4930842b46e9507372f0b1b963James Dong SUB sp,sp,#0x20 340c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD r4,sp,#0 350c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r5,[sp,#0x64] 360c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r7,r1 370c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r8,r2 380c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r9,r3 390c1bc742181ded4930842b46e9507372f0b1b963James Dong CMP r5,#0 400c1bc742181ded4930842b46e9507372f0b1b963James Dong BEQ L0x114 410c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r1,r4 420c1bc742181ded4930842b46e9507372f0b1b963James Dong BL armVCM4P10_UnpackBlock4x4 ;// 430c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r1,[sp,#0x60] 4422e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel LDR r11, .LarmVCM4P10_QPModuloTable 4522e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP0: ADD r11, pc 4622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel LDR r10, .LarmVCM4P10_QPDivTable 4722e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP1: ADD r10, pc 4822e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel LDR r2, .LarmVCM4P10_VMatrixU16 4922e06318d04074d1a7c90caa173857abdcfd153eArd BiesheuvelP2: ADD r2, pc 500c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRSB r12,[r11,r1] 510c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRSB lr,[r10,r1] 520c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r10, =0x3020504 530c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r1, =0x5040100 540c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD r2,r2,r12 550c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.32 d7,r1 560c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.32 d9,r10 570c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.16 d5,lr 580c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1.8 {d6},[r2] 590c1bc742181ded4930842b46e9507372f0b1b963James Dong VTBL.8 d8,{d6},d7 600c1bc742181ded4930842b46e9507372f0b1b963James Dong VTBL.8 d4,{d6},d9 610c1bc742181ded4930842b46e9507372f0b1b963James Dong CMP r8,#0 620c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1.16 {d0,d1,d2,d3},[r4] 630c1bc742181ded4930842b46e9507372f0b1b963James Dong VSHL.U16 d8,d8,d5 640c1bc742181ded4930842b46e9507372f0b1b963James Dong VSHL.U16 d4,d4,d5 650c1bc742181ded4930842b46e9507372f0b1b963James Dong BEQ L1 660c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRSH r10,[r8,#0] 670c1bc742181ded4930842b46e9507372f0b1b963James DongL1: 680c1bc742181ded4930842b46e9507372f0b1b963James Dong VMUL.I16 d0,d0,d8 690c1bc742181ded4930842b46e9507372f0b1b963James Dong VMUL.I16 d1,d1,d4 700c1bc742181ded4930842b46e9507372f0b1b963James Dong VMUL.I16 d2,d2,d8 710c1bc742181ded4930842b46e9507372f0b1b963James Dong VMUL.I16 d3,d3,d4 720c1bc742181ded4930842b46e9507372f0b1b963James Dong VMOVNE.16 d0[0],r10 730c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.16 d0,d1 740c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.16 d2,d3 750c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.32 q0,q1 760c1bc742181ded4930842b46e9507372f0b1b963James Dong VMOV.I16 d4,#0 770c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d5,d0,d2 780c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d6,d0,d2 790c1bc742181ded4930842b46e9507372f0b1b963James Dong VHADD.S16 d7,d1,d4 800c1bc742181ded4930842b46e9507372f0b1b963James Dong VHADD.S16 d8,d3,d4 810c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d7,d7,d3 820c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d8,d1,d8 830c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d0,d5,d8 840c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d1,d6,d7 850c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d2,d6,d7 860c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d3,d5,d8 870c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.16 d0,d1 880c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.16 d2,d3 890c1bc742181ded4930842b46e9507372f0b1b963James Dong VTRN.32 q0,q1 900c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d5,d0,d2 910c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d6,d0,d2 920c1bc742181ded4930842b46e9507372f0b1b963James Dong VHADD.S16 d7,d1,d4 930c1bc742181ded4930842b46e9507372f0b1b963James Dong VHADD.S16 d8,d3,d4 940c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d7,d7,d3 950c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d8,d1,d8 960c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d0,d5,d8 970c1bc742181ded4930842b46e9507372f0b1b963James Dong VADD.I16 d1,d6,d7 980c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d2,d6,d7 990c1bc742181ded4930842b46e9507372f0b1b963James Dong VSUB.I16 d3,d5,d8 1000c1bc742181ded4930842b46e9507372f0b1b963James Dong VRSHR.S16 d0,d0,#6 1010c1bc742181ded4930842b46e9507372f0b1b963James Dong VRSHR.S16 d1,d1,#6 1020c1bc742181ded4930842b46e9507372f0b1b963James Dong VRSHR.S16 d2,d2,#6 1030c1bc742181ded4930842b46e9507372f0b1b963James Dong VRSHR.S16 d3,d3,#6 1040c1bc742181ded4930842b46e9507372f0b1b963James Dong B L0x130 1050c1bc742181ded4930842b46e9507372f0b1b963James DongL0x114: 1060c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRSH r10,[r8,#0] 1070c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD r10,r10,#0x20 1080c1bc742181ded4930842b46e9507372f0b1b963James Dong ASR r10,r10,#6 1090c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.16 d0,r10 1100c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.16 d1,r10 1110c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.16 d2,r10 1120c1bc742181ded4930842b46e9507372f0b1b963James Dong VDUP.16 d3,r10 1130c1bc742181ded4930842b46e9507372f0b1b963James DongL0x130: 1140c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r1,[sp,#0x58] 1150c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r10,[sp,#0x5c] 1160c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r3,[r7],r1 1170c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r5,[r7],r1 1180c1bc742181ded4930842b46e9507372f0b1b963James Dong VMOV d4,r3,r5 1190c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r3,[r7],r1 1200c1bc742181ded4930842b46e9507372f0b1b963James Dong LDR r5,[r7,#0] 1210c1bc742181ded4930842b46e9507372f0b1b963James Dong VMOV d5,r3,r5 1220c1bc742181ded4930842b46e9507372f0b1b963James Dong VADDW.U8 q3,q0,d4 1230c1bc742181ded4930842b46e9507372f0b1b963James Dong VADDW.U8 q4,q1,d5 1240c1bc742181ded4930842b46e9507372f0b1b963James Dong VQMOVUN.S16 d0,q3 1250c1bc742181ded4930842b46e9507372f0b1b963James Dong VQMOVUN.S16 d1,q4 1260c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1.32 {d0[0]},[r9],r10 1270c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1.32 {d0[1]},[r9],r10 1280c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1.32 {d1[0]},[r9],r10 1290c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1.32 {d1[1]},[r9] 1300c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV r0,#0 1310c1bc742181ded4930842b46e9507372f0b1b963James Dong ADD sp,sp,#0x20 1320c1bc742181ded4930842b46e9507372f0b1b963James Dong VPOP {d8-d9} 1330c1bc742181ded4930842b46e9507372f0b1b963James Dong POP {r4-r12,pc} 1340c1bc742181ded4930842b46e9507372f0b1b963James Dong .endfunc 1350c1bc742181ded4930842b46e9507372f0b1b963James Dong 13622e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_QPModuloTable: 13722e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel .word armVCM4P10_QPModuloTable-(P0+8) 13822e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_QPDivTable: 13922e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel .word armVCM4P10_QPDivTable-(P1+8) 14022e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel.LarmVCM4P10_VMatrixU16: 14122e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel .word armVCM4P10_VMatrixU16-(P2+8) 14222e06318d04074d1a7c90caa173857abdcfd153eArd Biesheuvel 1430c1bc742181ded4930842b46e9507372f0b1b963James Dong .end 1440c1bc742181ded4930842b46e9507372f0b1b963James Dong 145