omxVCM4P10_PredictIntra_4x4_s.s revision 78e52bfac041d71ce53b5b13c2abf78af742b09d
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;//
170c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
180c1bc742181ded4930842b46e9507372f0b1b963James Dong;// File Name:  omxVCM4P10_PredictIntra_4x4_s.s
190c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OpenMAX DL: v1.0.2
200c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Revision:   12290
210c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Date:       Wednesday, April 9, 2008
220c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
230c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
240c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
250c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
260c1bc742181ded4930842b46e9507372f0b1b963James Dong
270c1bc742181ded4930842b46e9507372f0b1b963James Dong
280c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE omxtypes_s.h
290c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE armCOMM_s.h
300c1bc742181ded4930842b46e9507372f0b1b963James Dong
310c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Define the processor variants supported by this file
320c1bc742181ded4930842b46e9507372f0b1b963James Dong
330c1bc742181ded4930842b46e9507372f0b1b963James Dong         M_VARIANTS CortexA8
340c1bc742181ded4930842b46e9507372f0b1b963James Dong
350c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-------------------------------------------------------
360c1bc742181ded4930842b46e9507372f0b1b963James Dong;// This table for implementing switch case of C in asm by
370c1bc742181ded4930842b46e9507372f0b1b963James Dong;// the mehtod of two levels of indexing.
380c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-------------------------------------------------------
390c1bc742181ded4930842b46e9507372f0b1b963James Dong
400c1bc742181ded4930842b46e9507372f0b1b963James Dong    M_TABLE armVCM4P10_pSwitchTable4x4
410c1bc742181ded4930842b46e9507372f0b1b963James Dong    DCD  OMX_VC_4x4_VERT,     OMX_VC_4x4_HOR
420c1bc742181ded4930842b46e9507372f0b1b963James Dong    DCD  OMX_VC_4x4_DC,       OMX_VC_4x4_DIAG_DL
430c1bc742181ded4930842b46e9507372f0b1b963James Dong    DCD  OMX_VC_4x4_DIAG_DR,  OMX_VC_4x4_VR
440c1bc742181ded4930842b46e9507372f0b1b963James Dong    DCD  OMX_VC_4x4_HD,       OMX_VC_4x4_VL
450c1bc742181ded4930842b46e9507372f0b1b963James Dong    DCD  OMX_VC_4x4_HU
460c1bc742181ded4930842b46e9507372f0b1b963James Dong
470c1bc742181ded4930842b46e9507372f0b1b963James Dong
480c1bc742181ded4930842b46e9507372f0b1b963James Dong        IF CortexA8
490c1bc742181ded4930842b46e9507372f0b1b963James Dong
500c1bc742181ded4930842b46e9507372f0b1b963James Dong;//--------------------------------------------
510c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Scratch variable
520c1bc742181ded4930842b46e9507372f0b1b963James Dong;//--------------------------------------------
530c1bc742181ded4930842b46e9507372f0b1b963James Dongreturn          RN 0
540c1bc742181ded4930842b46e9507372f0b1b963James DongpTable          RN 8
550c1bc742181ded4930842b46e9507372f0b1b963James Dongpc              RN 15
560c1bc742181ded4930842b46e9507372f0b1b963James Dong
570c1bc742181ded4930842b46e9507372f0b1b963James Dong;//--------------------------------------------
580c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Declare input registers
590c1bc742181ded4930842b46e9507372f0b1b963James Dong;//--------------------------------------------
600c1bc742181ded4930842b46e9507372f0b1b963James DongpSrcLeft        RN 0    ;// input pointer
610c1bc742181ded4930842b46e9507372f0b1b963James DongpSrcAbove       RN 1    ;// input pointer
620c1bc742181ded4930842b46e9507372f0b1b963James DongpSrcAboveLeft   RN 2    ;// input pointer
630c1bc742181ded4930842b46e9507372f0b1b963James DongpDst            RN 3    ;// output pointer
640c1bc742181ded4930842b46e9507372f0b1b963James DongleftStep        RN 4    ;// input variable
650c1bc742181ded4930842b46e9507372f0b1b963James DongdstStep         RN 5    ;// input variable
660c1bc742181ded4930842b46e9507372f0b1b963James DongpredMode        RN 6    ;// input variable
670c1bc742181ded4930842b46e9507372f0b1b963James Dongavailability    RN 7    ;// input variable
680c1bc742181ded4930842b46e9507372f0b1b963James DongpDst1           RN 1
690c1bc742181ded4930842b46e9507372f0b1b963James DongpDst2           RN 4
700c1bc742181ded4930842b46e9507372f0b1b963James DongpDst3           RN 6
710c1bc742181ded4930842b46e9507372f0b1b963James Dong
720c1bc742181ded4930842b46e9507372f0b1b963James DongpSrcTmp         RN 9
730c1bc742181ded4930842b46e9507372f0b1b963James DongsrcStep         RN 10
740c1bc742181ded4930842b46e9507372f0b1b963James DongpDstTmp         RN 11
750c1bc742181ded4930842b46e9507372f0b1b963James Dongdstep           RN 12
760c1bc742181ded4930842b46e9507372f0b1b963James Dong
770c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-------------------
780c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Neon registers
790c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-------------------
800c1bc742181ded4930842b46e9507372f0b1b963James Dong
810c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OMX_VC_CHROMA_VERT
820c1bc742181ded4930842b46e9507372f0b1b963James DongdAboveU32       DN  D0.U32
830c1bc742181ded4930842b46e9507372f0b1b963James Dong
840c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OMX_VC_CHROMA_HOR
850c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal0       DN  D0.8
860c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal1       DN  D1.8
870c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal2       DN  D2.8
880c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal3       DN  D3.8
890c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal0U32    DN  D0.U32
900c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal1U32    DN  D1.U32
910c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal2U32    DN  D2.U32
920c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal3U32    DN  D3.U32
930c1bc742181ded4930842b46e9507372f0b1b963James Dong
940c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OMX_VC_4x4_DC
950c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftVal        DN  D0.U8
960c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftValU32     DN  D0.U32
970c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveLeftU16  DN  D1.U16
980c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveLeftU32  DN  D1.U32
990c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveLeftU64  DN  D1.U64
1000c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveLeftU8 DN  D1.U8
1010c1bc742181ded4930842b46e9507372f0b1b963James DongdSum            DN  D0.U8
1020c1bc742181ded4930842b46e9507372f0b1b963James Dong
1030c1bc742181ded4930842b46e9507372f0b1b963James DongdSumLeftValU16  DN  D1.U16
1040c1bc742181ded4930842b46e9507372f0b1b963James DongdSumLeftValU32  DN  D1.U32
1050c1bc742181ded4930842b46e9507372f0b1b963James DongdSumLeftValU64  DN  D1.U64
1060c1bc742181ded4930842b46e9507372f0b1b963James DongdSumLeftValU8   DN  D1.U8
1070c1bc742181ded4930842b46e9507372f0b1b963James Dong
1080c1bc742181ded4930842b46e9507372f0b1b963James DongdAboveVal       DN  D0.U8
1090c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveValU16  DN  D1.U16
1100c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveValU32  DN  D1.U32
1110c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveValU64  DN  D1.U64
1120c1bc742181ded4930842b46e9507372f0b1b963James DongdSumAboveValU8   DN  D1.U8
1130c1bc742181ded4930842b46e9507372f0b1b963James DongdConst128U8     DN  D0.U8
1140c1bc742181ded4930842b46e9507372f0b1b963James Dong
1150c1bc742181ded4930842b46e9507372f0b1b963James Dong
1160c1bc742181ded4930842b46e9507372f0b1b963James Dong;//OMX_VC_4x4_DIAG_DL
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong
1180c1bc742181ded4930842b46e9507372f0b1b963James DongdAbove          DN  D0.U8
1190c1bc742181ded4930842b46e9507372f0b1b963James DongdU7             DN  D2.U8
1200c1bc742181ded4930842b46e9507372f0b1b963James DongdU3             DN  D2.U8
1210c1bc742181ded4930842b46e9507372f0b1b963James DongdAbove0         DN  D3.U8
1220c1bc742181ded4930842b46e9507372f0b1b963James DongdAbove1         DN  D4.U8
1230c1bc742181ded4930842b46e9507372f0b1b963James DongdAbove2         DN  D5.U8
1240c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp            DN  D6.U8
1250c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp0           DN  D7.U8
1260c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp1           DN  D8.U8
1270c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp2            DN  D9.U8
1280c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp3            DN  D10.U8
1290c1bc742181ded4930842b46e9507372f0b1b963James DongdTmpU32         DN  D6.U32
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong;//OMX_VC_4x4_DIAG_DR
1330c1bc742181ded4930842b46e9507372f0b1b963James DongdLeft           DN  D1.U8
1340c1bc742181ded4930842b46e9507372f0b1b963James DongdUL             DN  D2.U8
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong;//OMX_VC_4x4_VR
1370c1bc742181ded4930842b46e9507372f0b1b963James DongdLeft0          DN  D1.U8
1380c1bc742181ded4930842b46e9507372f0b1b963James DongdLeft1          DN  D2.U8
1390c1bc742181ded4930842b46e9507372f0b1b963James DongdEven0          DN  D3.U8
1400c1bc742181ded4930842b46e9507372f0b1b963James DongdEven1          DN  D4.U8
1410c1bc742181ded4930842b46e9507372f0b1b963James DongdEven2          DN  D5.U8
1420c1bc742181ded4930842b46e9507372f0b1b963James DongdOdd0           DN  D6.U8
1430c1bc742181ded4930842b46e9507372f0b1b963James DongdOdd1           DN  D11.U8
1440c1bc742181ded4930842b46e9507372f0b1b963James DongdOdd2           DN  D12.U8
1450c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp3U32        DN  D10.U32
1460c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp2U32        DN  D9.U32
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong;//OMX_VC_4x4_HD
1500c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp1U64        DN  D8.U64
1510c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp0U64        DN  D7.U64
1520c1bc742181ded4930842b46e9507372f0b1b963James DongdTmpU64         DN  D6.U64
1530c1bc742181ded4930842b46e9507372f0b1b963James DongdTmpU32         DN  D6.U32
1540c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp1U32        DN  D8.U32
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong;//OMX_VC_4x4_HU
1570c1bc742181ded4930842b46e9507372f0b1b963James DongdL3             DN  D2.U8
1580c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftHU0        DN  D3.U8
1590c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftHU1        DN  D4.U8
1600c1bc742181ded4930842b46e9507372f0b1b963James DongdLeftHU2        DN  D5.U8
1610c1bc742181ded4930842b46e9507372f0b1b963James DongdTmp0U32        DN  D7.U32
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-----------------------------------------------------------------------------------------------
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong;// omxVCM4P10_PredictIntra_4x4 starts
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-----------------------------------------------------------------------------------------------
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Write function header
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_START omxVCM4P10_PredictIntra_4x4, r12,d12
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Define stack arguments
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG    LeftStep,     4
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG    DstStep,      4
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG    PredMode,     4
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_ARG    Availability, 4
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR      pTable,=armVCM4P10_pSwitchTable4x4  ;// Load index table for switch case
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load argument from the stack
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDRD   predMode,availability,PredMode     ;// Arg predMode & availability loaded from stack to reg
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_LDRD   leftStep,dstStep,LeftStep          ;// Arg leftStep & dstStep loaded from stack to reg
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong
1860c1bc742181ded4930842b46e9507372f0b1b963James Dong
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR      pc, [pTable, predMode, LSL #2]      ;// Branch to the case based on preMode
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong
1900c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_HOR
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pSrcTmp, pSrcLeft, leftStep
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     srcStep, leftStep, leftStep
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Left Edge
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal0[]},[pSrcLeft],srcStep           ;// pSrcLeft[0*leftStep]
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal1[]},[pSrcTmp],srcStep            ;//    pSrcLeft[1*leftStep]
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal2[]},[pSrcLeft]                   ;//    pSrcLeft[2*leftStep]
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal3[]},[pSrcTmp]                    ;//    pSrcLeft[3*leftStep]
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong
2000c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dLeftVal0U32[0],[pDst],dstep                ;// pDst[0*dstStep+x] :0<= x <= 7
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dLeftVal1U32[0],[pDstTmp],dstep             ;// pDst[1*dstStep+x] :0<= x <= 7
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dLeftVal2U32[0],[pDst]                      ;// pDst[2*dstStep+x] :0<= x <= 7
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dLeftVal3U32[0],[pDstTmp]                   ;// pDst[3*dstStep+x] :0<= x <= 7
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                             ;// Branch to exit code
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong
2100c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_VERT
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong
2120c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Upper Edge
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1     dAboveU32[0],[pSrcAbove]
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong
2170c1bc742181ded4930842b46e9507372f0b1b963James DongDCPredict4x4VertStore
2180c1bc742181ded4930842b46e9507372f0b1b963James Dong
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1     dAboveU32[0],[pDst],dstep
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1     dAboveU32[0],[pDstTmp],dstep
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1     dAboveU32[0],[pDst]
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1     dAboveU32[0],[pDstTmp]
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong
2240c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                             ;// Branch to exit code
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong
2260c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_DC
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong
2290c1bc742181ded4930842b46e9507372f0b1b963James Dong        TST     availability, #OMX_VC_LEFT
2300c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ     DCPredict4x4LeftNotAvailable
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pSrcTmp, pSrcLeft, leftStep
2330c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     srcStep, leftStep, leftStep
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Left Edge
2350c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal[0]},[pSrcLeft],srcStep            ;// pSrcLeft[0*leftStep]
2360c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal[1]},[pSrcTmp],srcStep             ;//    pSrcLeft[1*leftStep]
2370c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal[2]},[pSrcLeft]                    ;//    pSrcLeft[2*leftStep]
2380c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeftVal[3]},[pSrcTmp]                     ;//    pSrcLeft[3*leftStep]
2390c1bc742181ded4930842b46e9507372f0b1b963James Dong
2400c1bc742181ded4930842b46e9507372f0b1b963James Dong        TST     availability, #OMX_VC_UPPER
2410c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ     DCPredict4x4LeftOnlyAvailable
2420c1bc742181ded4930842b46e9507372f0b1b963James Dong
2430c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Upper Edge also
2440c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1     dLeftValU32[1],[pSrcAbove]                 ;// pSrcAbove[0 to 3]
2450c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV      return, #OMX_Sts_NoErr
2460c1bc742181ded4930842b46e9507372f0b1b963James Dong
2470c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumAboveLeftU16, dLeftVal                 ;// [pSrcAbove[2+3 | 0+1] | pSrcLeft[2+3 | 0+1]]
2480c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumAboveLeftU32, dSumAboveLeftU16         ;// [pSrcAbove[2+3+0+1] | pSrcLeft[2+3+0+1]]
2490c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumAboveLeftU64, dSumAboveLeftU32         ;// [pSrcAbove[2+3+0+1] + pSrcLeft[2+3+0+1]]
2500c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRSHR    dSumAboveLeftU64,dSumAboveLeftU64,#3       ;// Sum = (Sum + 4) >> 3
2510c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2520c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2530c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP     dSum,dSumAboveLeftU8[0]
2540c1bc742181ded4930842b46e9507372f0b1b963James Dong
2550c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        DCPredict4x4VertStore
2560c1bc742181ded4930842b46e9507372f0b1b963James Dong
2570c1bc742181ded4930842b46e9507372f0b1b963James DongDCPredict4x4LeftOnlyAvailable
2580c1bc742181ded4930842b46e9507372f0b1b963James Dong
2590c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV      return, #OMX_Sts_NoErr                     ;// returnNoError
2600c1bc742181ded4930842b46e9507372f0b1b963James Dong
2610c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumLeftValU16, dLeftVal                   ;// [ XX | pSrcLeft[2+3 | 0+1]]
2620c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumLeftValU32, dSumLeftValU16             ;// [ XXXX | pSrcLeft[2+3+0+1]]
2630c1bc742181ded4930842b46e9507372f0b1b963James Dong
2640c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRSHR    dSumLeftValU32,dSumLeftValU32,#2           ;// Sum = (Sum + 2) >> 2
2650c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2660c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2670c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP     dSum,dSumLeftValU8[0]
2680c1bc742181ded4930842b46e9507372f0b1b963James Dong
2690c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        DCPredict4x4VertStore
2700c1bc742181ded4930842b46e9507372f0b1b963James Dong
2710c1bc742181ded4930842b46e9507372f0b1b963James DongDCPredict4x4LeftNotAvailable
2720c1bc742181ded4930842b46e9507372f0b1b963James Dong
2730c1bc742181ded4930842b46e9507372f0b1b963James Dong        TST     availability, #OMX_VC_UPPER
2740c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ     DCPredict4x4NoneAvailable
2750c1bc742181ded4930842b46e9507372f0b1b963James Dong
2760c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Upper Edge
2770c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1     dAboveU32[0],[pSrcAbove]                   ;// pSrcAbove[0 to 3]
2780c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV      return, #OMX_Sts_NoErr
2790c1bc742181ded4930842b46e9507372f0b1b963James Dong
2800c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumAboveValU16, dAboveVal                 ;// [ XX | pSrcAbove[2+3 | 0+1]]
2810c1bc742181ded4930842b46e9507372f0b1b963James Dong        VPADDL   dSumAboveValU32, dSumAboveValU16           ;// [ XXXX | pSrcAbove[2+3+0+1]]
2820c1bc742181ded4930842b46e9507372f0b1b963James Dong
2830c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRSHR    dSumAboveValU32,dSumAboveValU32,#2         ;// Sum = (Sum + 2) >> 2
2840c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2850c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2860c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP     dSum,dSumAboveValU8[0]
2870c1bc742181ded4930842b46e9507372f0b1b963James Dong
2880c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        DCPredict4x4VertStore
2890c1bc742181ded4930842b46e9507372f0b1b963James Dong
2900c1bc742181ded4930842b46e9507372f0b1b963James DongDCPredict4x4NoneAvailable
2910c1bc742181ded4930842b46e9507372f0b1b963James Dong
2920c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMOV     dConst128U8,#0x80                          ;// 0x8080808080808080 if(count == 0)
2930c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV      return, #OMX_Sts_NoErr
2940c1bc742181ded4930842b46e9507372f0b1b963James Dong
2950c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
2960c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
2970c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        DCPredict4x4VertStore
2980c1bc742181ded4930842b46e9507372f0b1b963James Dong
2990c1bc742181ded4930842b46e9507372f0b1b963James Dong
3000c1bc742181ded4930842b46e9507372f0b1b963James Dong
3010c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_DIAG_DL
3020c1bc742181ded4930842b46e9507372f0b1b963James Dong
3030c1bc742181ded4930842b46e9507372f0b1b963James Dong        TST     availability, #OMX_VC_UPPER_RIGHT
3040c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ     DiagDLUpperRightNotAvailable
3050c1bc742181ded4930842b46e9507372f0b1b963James Dong
3060c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAbove0,[pSrcAbove]                     ;// [U7|U6|U5|U4|U3|U2|U1|U0]
3070c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP    dU7, dAbove0[7]                         ;// [U7|U7|U7|U7|U7|U7|U7|U7]
3080c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1, dAbove0, dU7, #1               ;// [U7|U7|U6|U5|U4|U3|U2|U1]
3090c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2, dAbove0, dU7, #2               ;// [U7|U7|U7|U6|U5|U4|U3|U2]
3100c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       DiagDLPredict4x4Store
3110c1bc742181ded4930842b46e9507372f0b1b963James Dong
3120c1bc742181ded4930842b46e9507372f0b1b963James DongDiagDLUpperRightNotAvailable
3130c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAboveU32[1],[pSrcAbove]                ;// [U3|U2|U1|U0|-|-|-|-]
3140c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP    dU3, dAbove[7]                          ;// [U3 U3 U3 U3 U3 U3 U3 U3]
3150c1bc742181ded4930842b46e9507372f0b1b963James Dong
3160c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove0, dAbove, dU3, #4                ;// [U3 U3 U3 U3 U3 U2 U1 U0]
3170c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1, dAbove, dU3, #5                ;// [U3 U3 U3 U3 U3 U3 U2 U1]
3180c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2, dAbove, dU3, #6                ;// [U3 U3 U3 U3 U3 U3 U3 U2]
3190c1bc742181ded4930842b46e9507372f0b1b963James Dong
3200c1bc742181ded4930842b46e9507372f0b1b963James DongDiagDLPredict4x4Store
3210c1bc742181ded4930842b46e9507372f0b1b963James Dong
3220c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp, dAbove0, dAbove2
3230c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp, dTmp, dAbove1                     ;// (a+2*b+c+2)>>2
3240c1bc742181ded4930842b46e9507372f0b1b963James Dong
3250c1bc742181ded4930842b46e9507372f0b1b963James Dong
3260c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst],dstStep
3270c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3280c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst],dstStep
3290c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3300c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst],dstStep
3310c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3320c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst]
3330c1bc742181ded4930842b46e9507372f0b1b963James Dong
3340c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                         ;// Branch to exit code
3350c1bc742181ded4930842b46e9507372f0b1b963James Dong
3360c1bc742181ded4930842b46e9507372f0b1b963James Dong
3370c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_DIAG_DR
3380c1bc742181ded4930842b46e9507372f0b1b963James Dong
3390c1bc742181ded4930842b46e9507372f0b1b963James Dong
3400c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load U0,U1,U2,U3
3410c1bc742181ded4930842b46e9507372f0b1b963James Dong
3420c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAboveU32[0],[pSrcAbove]                ;// [X|X|X|X|U3|U2|U1|U0]
3430c1bc742181ded4930842b46e9507372f0b1b963James Dong
3440c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load UL,L0,L1,L2,L3                         ;// dLeft = [UL|L0|L1|L2|L3|X|X|X]
3450c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[7]},[pSrcAboveLeft]
3460c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pSrcTmp, pSrcLeft, leftStep
3470c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     srcStep, leftStep, leftStep
3480c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDst1,pDst,dstStep
3490c1bc742181ded4930842b46e9507372f0b1b963James Dong
3500c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[6]},[pSrcLeft],srcStep           ;// pSrcLeft[0*leftStep]
3510c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[5]},[pSrcTmp],srcStep            ;// pSrcLeft[1*leftStep]
3520c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[4]},[pSrcLeft]                   ;// pSrcLeft[2*leftStep]
3530c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[3]},[pSrcTmp]                    ;// pSrcLeft[3*leftStep]
3540c1bc742181ded4930842b46e9507372f0b1b963James Dong
3550c1bc742181ded4930842b46e9507372f0b1b963James Dong
3560c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove0,dLeft,dAbove,#3                 ;// [U2|U1|U0|UL|L0|L1|L2|L3]
3570c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDst2,pDst1,dstStep
3580c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1,dLeft,dAbove,#4                 ;// [U3|U2|U1|U0|UL|L0|L1|L2]
3590c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDst3,pDst2,dstStep
3600c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2,dLeft,dAbove,#5                 ;// [ X|U3|U2|U1|U0|UL|L0|L1]
3610c1bc742181ded4930842b46e9507372f0b1b963James Dong
3620c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp, dAbove0, dAbove2
3630c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp, dTmp, dAbove1                     ;// (a+2*b+c+2)>>2
3640c1bc742181ded4930842b46e9507372f0b1b963James Dong
3650c1bc742181ded4930842b46e9507372f0b1b963James Dong
3660c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst3]                      ;// Store pTmp[0],[1],[2],[3] @ pDst3
3670c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3680c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst2]                      ;// Store pTmp[1],[2],[3],[4] @ pDst2
3690c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3700c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst1]                      ;// Store pTmp[2],[3],[4],[5] @ pDst1
3710c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp,dTmp,dTmp,#1
3720c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDst]                       ;// Store pTmp[3],[4],[5],[6] @ pDst
3730c1bc742181ded4930842b46e9507372f0b1b963James Dong
3740c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                         ;// Branch to exit code
3750c1bc742181ded4930842b46e9507372f0b1b963James Dong
3760c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_VR
3770c1bc742181ded4930842b46e9507372f0b1b963James Dong
3780c1bc742181ded4930842b46e9507372f0b1b963James Dong
3790c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load UL,U0,U1,U2,U3
3800c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAboveU32[0],[pSrcAbove]
3810c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAbove[7],[pSrcAboveLeft]               ;// [UL|X|X|X|U3|U2|U1|U0]
3820c1bc742181ded4930842b46e9507372f0b1b963James Dong
3830c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load L0,L1,L2                               ;// dLeft0 = [L0|L2|X|X|X|X|X|X]
3840c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                        ;// dLeft1 = [L1| X|X|X|X|X|X|X]
3850c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft0[7]},[pSrcLeft],leftStep         ;// pSrcLeft[0*leftStep]
3860c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft1[7]},[pSrcLeft],leftStep         ;// pSrcLeft[1*leftStep]
3870c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft0[6]},[pSrcLeft]                  ;// pSrcLeft[2*leftStep]
3880c1bc742181ded4930842b46e9507372f0b1b963James Dong
3890c1bc742181ded4930842b46e9507372f0b1b963James Dong
3900c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dOdd2,dAbove,dAbove,#7                  ;// [ x x x U3 U2 U1 U0 UL ]
3910c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dEven0,dLeft0,dOdd2,#6                  ;// [ x x x U1 U0 UL L0 L2 ]
3920c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dEven1,dLeft1,dOdd2,#7                  ;// [ x x x U2 U1 U0 UL L1 ]
3930c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dEven2,dLeft0,dAbove,#7                 ;// [ x x x U3 U2 U1 U0 L0 ]
3940c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dOdd0,dLeft1,dAbove,#7                  ;// [ x x x U3 U2 U1 U0 L1 ]
3950c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dOdd1,dLeft0,dOdd2,#7                   ;// [ x x x U2 U1 U0 UL L0 ]
3960c1bc742181ded4930842b46e9507372f0b1b963James Dong
3970c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp1, dOdd0, dOdd2
3980c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp1, dTmp1, dOdd1                     ;// Tmp[ x x x 9 7 5 3 1 ]
3990c1bc742181ded4930842b46e9507372f0b1b963James Dong
4000c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp0, dEven0, dEven2
4010c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp0, dTmp0, dEven1                    ;// Tmp[ x x x 8 6 4 2 0 ]
4020c1bc742181ded4930842b46e9507372f0b1b963James Dong
4030c1bc742181ded4930842b46e9507372f0b1b963James Dong
4040c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp3,dTmp1,dTmp1,#1                    ;// Tmp[ x x x x 9 7 5 3 ]
4050c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
4060c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
4070c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp2,dTmp0,dTmp0,#1                    ;// Tmp[ x x x x 8 6 4 2 ]
4080c1bc742181ded4930842b46e9507372f0b1b963James Dong
4090c1bc742181ded4930842b46e9507372f0b1b963James Dong
4100c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp3U32[0],[pDst],dstep                ;// Tmp[9],[7],[5],[3]
4110c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp2U32[0],[pDstTmp],dstep             ;// Tmp[8],[6],[4],[2]
4120c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst],dstep                ;// Tmp[7],[5],[3],[1]
4130c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp0U32[0],[pDstTmp]                   ;// Tmp[6],[4],[2],[0]
4140c1bc742181ded4930842b46e9507372f0b1b963James Dong
4150c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                         ;// Branch to exit code
4160c1bc742181ded4930842b46e9507372f0b1b963James Dong
4170c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_HD
4180c1bc742181ded4930842b46e9507372f0b1b963James Dong
4190c1bc742181ded4930842b46e9507372f0b1b963James Dong
4200c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load U0,U1,U2,U3
4210c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAbove,[pSrcAbove]                      ;//dAboveLeftVal = [U7|U6|U5|U4|U3|U2|U1|U0]
4220c1bc742181ded4930842b46e9507372f0b1b963James Dong
4230c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load UL,L0,L1,L2,L3                         ;// dLeft = [UL|L0|L1|L2|L3|X|X|X]
4240c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[7]},[pSrcAboveLeft]
4250c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pSrcTmp, pSrcLeft, leftStep
4260c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     srcStep, leftStep, leftStep
4270c1bc742181ded4930842b46e9507372f0b1b963James Dong
4280c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[6]},[pSrcLeft],srcStep           ;// pSrcLeft[0*leftStep]
4290c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[5]},[pSrcTmp],srcStep            ;// pSrcLeft[1*leftStep]
4300c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[4]},[pSrcLeft]                   ;// pSrcLeft[2*leftStep]
4310c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[3]},[pSrcTmp]                    ;// pSrcLeft[3*leftStep]
4320c1bc742181ded4930842b46e9507372f0b1b963James Dong
4330c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove0,dLeft,dAbove,#3                 ;// [ U2|U1|U0|UL|L0|L1|L2|L3 ]
4340c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1,dLeft,dAbove,#2                 ;// [ U1|U0|UL|L0|L1|L2|L3|X ]
4350c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2,dLeft,dAbove,#1                 ;// [ U0|UL|L0|L1|L2|L3|X|X ]
4360c1bc742181ded4930842b46e9507372f0b1b963James Dong
4370c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp0, dAbove0, dAbove2
4380c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp0, dTmp0, dAbove1                   ;// Tmp[ 0 | 1 | 2 | 4 | 6 | 8 | X | X ]
4390c1bc742181ded4930842b46e9507372f0b1b963James Dong
4400c1bc742181ded4930842b46e9507372f0b1b963James Dong
4410c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp1, dAbove1, dAbove0                 ;// (a+b+1)>>1
4420c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHL    dTmp1U64,dTmp1U64,#24                   ;// Tmp[ 3|5| 7 |9 | X | X | X | X ]
4430c1bc742181ded4930842b46e9507372f0b1b963James Dong
4440c1bc742181ded4930842b46e9507372f0b1b963James Dong
4450c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHL    dTmpU64,dTmp0U64,#16                    ;// Tmp[ 2|4|6|8| X | X | X | X ]
4460c1bc742181ded4930842b46e9507372f0b1b963James Dong        VZIP    dTmp1,dTmp                              ;// dTmp = [ 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 ]
4470c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp0,dTmp0,dTmp0,#6                    ;// Tmp[  X| X| X| X| X| X| 0 | 1 ]
4480c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp1,dTmp,dTmp0,#2                     ;// Tmp[ 0 | 1 | 2 | 3 | 4 | 5 | 6 |7 ]
4490c1bc742181ded4930842b46e9507372f0b1b963James Dong
4500c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
4510c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
4520c1bc742181ded4930842b46e9507372f0b1b963James Dong
4530c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[1],[pDst],dstep                ;// Store pTmp[0|1|2|3]
4540c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[1],[pDstTmp],dstep              ;// Store pTmp[2|3|4|5]
4550c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst]                      ;// Store pTmp[4|5|6|7]
4560c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmpU32[0],[pDstTmp]                    ;// Store pTmp[6|7|8|9]
4570c1bc742181ded4930842b46e9507372f0b1b963James Dong
4580c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                         ;// Branch to exit code
4590c1bc742181ded4930842b46e9507372f0b1b963James Dong
4600c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_VL
4610c1bc742181ded4930842b46e9507372f0b1b963James Dong
4620c1bc742181ded4930842b46e9507372f0b1b963James Dong
4630c1bc742181ded4930842b46e9507372f0b1b963James Dong        TST     availability, #OMX_VC_UPPER_RIGHT
4640c1bc742181ded4930842b46e9507372f0b1b963James Dong        BEQ     DiagVLUpperRightNotAvailable
4650c1bc742181ded4930842b46e9507372f0b1b963James Dong
4660c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAbove0,[pSrcAbove]                      ;// [U7|U6|U5|U4|U3|U2|U1|U0]
4670c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1,dAbove0,dAbove0,#1               ;// [ X|U7|U6|U5|U4|U3|U2|U1]
4680c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2,dAbove1,dAbove1,#1               ;// [ X| X|U7|U6|U5|U4|U3|U2]
4690c1bc742181ded4930842b46e9507372f0b1b963James Dong
4700c1bc742181ded4930842b46e9507372f0b1b963James Dong        B       DiagVLPredict4x4Store
4710c1bc742181ded4930842b46e9507372f0b1b963James Dong
4720c1bc742181ded4930842b46e9507372f0b1b963James DongDiagVLUpperRightNotAvailable
4730c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    dAboveU32[1],[pSrcAbove]                 ;// [U3|U2|U1|U0|-|-|-|-]
4740c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP    dU3, dAbove[7]                           ;// [U3 U3 U3 U3 U3 U3 U3 U3]
4750c1bc742181ded4930842b46e9507372f0b1b963James Dong
4760c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove0, dAbove, dU3, #4                 ;// [U3 U3 U3 U3 U3 U2 U1 U0]
4770c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove1, dAbove, dU3, #5                 ;// [U3 U3 U3 U3 U3 U3 U2 U1]
4780c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dAbove2, dAbove, dU3, #6                 ;// [U3 U3 U3 U3 U3 U3 U3 U2]
4790c1bc742181ded4930842b46e9507372f0b1b963James Dong
4800c1bc742181ded4930842b46e9507372f0b1b963James DongDiagVLPredict4x4Store
4810c1bc742181ded4930842b46e9507372f0b1b963James Dong
4820c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp0, dAbove1, dAbove0                 ;// (a+b+1)>>1
4830c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                        ;// Tmp[ X| X| X| 8| 6| 4| 2| 0 ]
4840c1bc742181ded4930842b46e9507372f0b1b963James Dong
4850c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp3, dAbove0, dAbove2
4860c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp3, dTmp3, dAbove1                   ;// (a+2*b+c+2)>>2
4870c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                        ;// Tmp[ X| X| X| 9| 7| 5| 3| 1 ]
4880c1bc742181ded4930842b46e9507372f0b1b963James Dong
4890c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp1,dTmp0,dTmp0,#1                    ;// Tmp[ X| X| X| X| 8| 6| 4| 2 ]
4900c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pDstTmp, pDst, dstStep
4910c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     dstep, dstStep, dstStep
4920c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp2,dTmp3,dTmp1,#1                    ;// Tmp[ X| X| X| X| 9| 7| 5| 3 ]
4930c1bc742181ded4930842b46e9507372f0b1b963James Dong
4940c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp0U32[0],[pDst],dstep                ;// Tmp[6],[4],[2],[0]
4950c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp3U32[0],[pDstTmp],dstep             ;// Tmp[7],[5],[3],[1]
4960c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst]                      ;// Tmp[8],[6],[4],[2]
4970c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp2U32[0],[pDstTmp]                   ;// Tmp[9],[7],[5],[3]
4980c1bc742181ded4930842b46e9507372f0b1b963James Dong
4990c1bc742181ded4930842b46e9507372f0b1b963James Dong        B        ExitPredict4x4                         ;// Branch to exit code
5000c1bc742181ded4930842b46e9507372f0b1b963James Dong
5010c1bc742181ded4930842b46e9507372f0b1b963James DongOMX_VC_4x4_HU
5020c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     pSrcTmp, pSrcLeft, leftStep
5030c1bc742181ded4930842b46e9507372f0b1b963James Dong        ADD     srcStep, leftStep, leftStep
5040c1bc742181ded4930842b46e9507372f0b1b963James Dong
5050c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load Left Edge                              ;// [L3|L2|L1|L0|X|X|X|X]
5060c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[4]},[pSrcLeft],srcStep           ;// pSrcLeft[0*leftStep]
5070c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[5]},[pSrcTmp],srcStep            ;// pSrcLeft[1*leftStep]
5080c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[6]},[pSrcLeft]                   ;// pSrcLeft[2*leftStep]
5090c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1    {dLeft[7]},[pSrcTmp]                    ;// pSrcLeft[3*leftStep]
5100c1bc742181ded4930842b46e9507372f0b1b963James Dong
5110c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP    dL3,dLeft[7]                            ;// [L3|L3|L3|L3|L3|L3|L3|L3]
5120c1bc742181ded4930842b46e9507372f0b1b963James Dong
5130c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dLeftHU0,dLeft,dL3,#4                   ;// [L3|L3|L3|L3|L3|L2|L1|L0]
5140c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dLeftHU1,dLeft,dL3,#5                   ;// [L3|L3|L3|L3|L3|L3|L2|L1]
5150c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dLeftHU2,dLeft,dL3,#6                   ;// [L3|L3|L3|L3|L3|L3|L3|L2]
5160c1bc742181ded4930842b46e9507372f0b1b963James Dong
5170c1bc742181ded4930842b46e9507372f0b1b963James Dong        VHADD   dTmp0, dLeftHU0, dLeftHU2
5180c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp0, dTmp0, dLeftHU1                  ;// Tmp[ L3 | L3 | L3 | L3 | L3 | 5 | 3 | 1 ]
5190c1bc742181ded4930842b46e9507372f0b1b963James Dong
5200c1bc742181ded4930842b46e9507372f0b1b963James Dong        VRHADD  dTmp1, dLeftHU1, dLeftHU0               ;// (a+b+1)>>1
5210c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                        ;//  Tmp[ L3 | L3 | L3 | L3 | L3 | 4 | 2 | 0 ]
5220c1bc742181ded4930842b46e9507372f0b1b963James Dong
5230c1bc742181ded4930842b46e9507372f0b1b963James Dong        VZIP    dTmp1,dTmp0                             ;// dTmp1 = Tmp[7| 6| 5| 4| 3| 2| 1| 0]
5240c1bc742181ded4930842b46e9507372f0b1b963James Dong                                                        ;// dTmp0 = [L3|L3|L3|L3|L3|L3|L3|L3]
5250c1bc742181ded4930842b46e9507372f0b1b963James Dong
5260c1bc742181ded4930842b46e9507372f0b1b963James Dong
5270c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst],dstStep              ;// [3|2|1|0]
5280c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp1,dTmp1,dTmp1,#2
5290c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst],dstStep              ;// [5|4|3|2]
5300c1bc742181ded4930842b46e9507372f0b1b963James Dong        VEXT    dTmp1,dTmp1,dTmp1,#2
5310c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp1U32[0],[pDst],dstStep              ;// [7|6|5|4]
5320c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1    dTmp0U32[0],[pDst]                      ;// [9|8|7|6]
5330c1bc742181ded4930842b46e9507372f0b1b963James Dong
5340c1bc742181ded4930842b46e9507372f0b1b963James Dong
5350c1bc742181ded4930842b46e9507372f0b1b963James DongExitPredict4x4
5360c1bc742181ded4930842b46e9507372f0b1b963James Dong
5370c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV      return,  #OMX_Sts_NoErr
5380c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
5390c1bc742181ded4930842b46e9507372f0b1b963James Dong
5400c1bc742181ded4930842b46e9507372f0b1b963James Dong        ENDIF ;// CortexA8
5410c1bc742181ded4930842b46e9507372f0b1b963James Dong
5420c1bc742181ded4930842b46e9507372f0b1b963James Dong        END
5430c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-----------------------------------------------------------------------------------------------
5440c1bc742181ded4930842b46e9507372f0b1b963James Dong;// omxVCM4P10_PredictIntra_4x4 ends
5450c1bc742181ded4930842b46e9507372f0b1b963James Dong;//-----------------------------------------------------------------------------------------------
546