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_TransformDequantLumaDCFromPair_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;// Description:
270c1bc742181ded4930842b46e9507372f0b1b963James Dong;// H.264 inverse quantize and transform module
280c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
290c1bc742181ded4930842b46e9507372f0b1b963James Dong;//
300c1bc742181ded4930842b46e9507372f0b1b963James Dong
310c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Include standard headers
320c1bc742181ded4930842b46e9507372f0b1b963James Dong
330c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE omxtypes_s.h
340c1bc742181ded4930842b46e9507372f0b1b963James Dong        INCLUDE armCOMM_s.h
350c1bc742181ded4930842b46e9507372f0b1b963James Dong
360c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Import/Export symbols required from/to other files
370c1bc742181ded4930842b46e9507372f0b1b963James Dong;// (For example tables)
380c1bc742181ded4930842b46e9507372f0b1b963James Dong
390c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT armVCM4P10_UnpackBlock4x4
400c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT armVCM4P10_QPDivTable
410c1bc742181ded4930842b46e9507372f0b1b963James Dong        IMPORT armVCM4P10_VMatrixQPModTable
420c1bc742181ded4930842b46e9507372f0b1b963James Dong
430c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_VARIANTS CortexA8
440c1bc742181ded4930842b46e9507372f0b1b963James Dong
450c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Set debugging level
460c1bc742181ded4930842b46e9507372f0b1b963James Dong;//DEBUG_ON    SETL {TRUE}
470c1bc742181ded4930842b46e9507372f0b1b963James Dong
480c1bc742181ded4930842b46e9507372f0b1b963James Dong
490c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Static Function: armVCM4P10_InvTransformDequantLumaDC4x4
500c1bc742181ded4930842b46e9507372f0b1b963James Dong
510c1bc742181ded4930842b46e9507372f0b1b963James Dong
520c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Guarding implementation by the processor name
530c1bc742181ded4930842b46e9507372f0b1b963James Dong
540c1bc742181ded4930842b46e9507372f0b1b963James Dong
550c1bc742181ded4930842b46e9507372f0b1b963James Dong
560c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Static Function: armVCM4P10_InvTransformDequantLumaDC4x4
570c1bc742181ded4930842b46e9507372f0b1b963James Dong
580c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Guarding implementation by the processor name
590c1bc742181ded4930842b46e9507372f0b1b963James Dong
600c1bc742181ded4930842b46e9507372f0b1b963James Dong    IF  CortexA8
610c1bc742181ded4930842b46e9507372f0b1b963James Dong
620c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Input Registers
630c1bc742181ded4930842b46e9507372f0b1b963James DongpData               RN  0
640c1bc742181ded4930842b46e9507372f0b1b963James DongQP                  RN  1
650c1bc742181ded4930842b46e9507372f0b1b963James Dong
660c1bc742181ded4930842b46e9507372f0b1b963James Dong
670c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Local Scratch Registers
680c1bc742181ded4930842b46e9507372f0b1b963James Dong
690c1bc742181ded4930842b46e9507372f0b1b963James Dong;// ARM Registers
700c1bc742181ded4930842b46e9507372f0b1b963James Dong
710c1bc742181ded4930842b46e9507372f0b1b963James DongpQPDivTable         RN  2
720c1bc742181ded4930842b46e9507372f0b1b963James DongpQPModTable         RN  3
730c1bc742181ded4930842b46e9507372f0b1b963James DongShift               RN  4
740c1bc742181ded4930842b46e9507372f0b1b963James DongScale               RN  5
750c1bc742181ded4930842b46e9507372f0b1b963James Dong
760c1bc742181ded4930842b46e9507372f0b1b963James Dong;// NEON Registers
770c1bc742181ded4930842b46e9507372f0b1b963James Dong
780c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Packed Input pixels
790c1bc742181ded4930842b46e9507372f0b1b963James DongdIn0                DN  D0.S16
800c1bc742181ded4930842b46e9507372f0b1b963James DongdIn1                DN  D1.S16
810c1bc742181ded4930842b46e9507372f0b1b963James DongdIn2                DN  D2.S16
820c1bc742181ded4930842b46e9507372f0b1b963James DongdIn3                DN  D3.S16
830c1bc742181ded4930842b46e9507372f0b1b963James Dong
840c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Intermediate calculations
850c1bc742181ded4930842b46e9507372f0b1b963James DongdRowSum1            DN  D4.S16
860c1bc742181ded4930842b46e9507372f0b1b963James DongdRowSum2            DN  D5.S16
870c1bc742181ded4930842b46e9507372f0b1b963James DongdRowDiff1           DN  D6.S16
880c1bc742181ded4930842b46e9507372f0b1b963James DongdRowDiff2           DN  D7.S16
890c1bc742181ded4930842b46e9507372f0b1b963James Dong
900c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Row operated pixels
910c1bc742181ded4930842b46e9507372f0b1b963James DongdRowOp0             DN  D0.S16
920c1bc742181ded4930842b46e9507372f0b1b963James DongdRowOp1                DN  D1.S16
930c1bc742181ded4930842b46e9507372f0b1b963James DongdRowOp2                DN  D2.S16
940c1bc742181ded4930842b46e9507372f0b1b963James DongdRowOp3                DN  D3.S16
950c1bc742181ded4930842b46e9507372f0b1b963James DongqRowOp01            QN  Q0.32
960c1bc742181ded4930842b46e9507372f0b1b963James DongqRowOp23            QN  Q1.32
970c1bc742181ded4930842b46e9507372f0b1b963James Dong
980c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Intermediate calculations
990c1bc742181ded4930842b46e9507372f0b1b963James DongdColSum1            DN  D4.S16
1000c1bc742181ded4930842b46e9507372f0b1b963James DongdColSum2            DN  D5.S16
1010c1bc742181ded4930842b46e9507372f0b1b963James DongdColDiff1           DN  D6.S16
1020c1bc742181ded4930842b46e9507372f0b1b963James DongdColDiff2           DN  D7.S16
1030c1bc742181ded4930842b46e9507372f0b1b963James Dong
1040c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Coloumn operated pixels
1050c1bc742181ded4930842b46e9507372f0b1b963James DongdColOp0             DN  D0.S16
1060c1bc742181ded4930842b46e9507372f0b1b963James DongdColOp1                DN  D1.S16
1070c1bc742181ded4930842b46e9507372f0b1b963James DongdColOp2                DN  D2.S16
1080c1bc742181ded4930842b46e9507372f0b1b963James DongdColOp3                DN  D3.S16
1090c1bc742181ded4930842b46e9507372f0b1b963James Dong
1100c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Temporary scratch varaibles
1110c1bc742181ded4930842b46e9507372f0b1b963James Dong
1120c1bc742181ded4930842b46e9507372f0b1b963James DongdScale              DN  D5.S16
1130c1bc742181ded4930842b46e9507372f0b1b963James DongqRound0             QN  Q3.S32
1140c1bc742181ded4930842b46e9507372f0b1b963James DongqRound1             QN  Q4.S32
1150c1bc742181ded4930842b46e9507372f0b1b963James DongqRound2             QN  Q5.S32
1160c1bc742181ded4930842b46e9507372f0b1b963James DongqRound3             QN  Q6.S32
1170c1bc742181ded4930842b46e9507372f0b1b963James Dong
1180c1bc742181ded4930842b46e9507372f0b1b963James Dong;// InvTransformed and Dequantized pixels
1190c1bc742181ded4930842b46e9507372f0b1b963James DongdOut0               DN  D0.S16
1200c1bc742181ded4930842b46e9507372f0b1b963James DongdOut1                DN  D1.S16
1210c1bc742181ded4930842b46e9507372f0b1b963James DongdOut2                DN  D2.S16
1220c1bc742181ded4930842b46e9507372f0b1b963James DongdOut3                DN  D3.S16
1230c1bc742181ded4930842b46e9507372f0b1b963James Dong
1240c1bc742181ded4930842b46e9507372f0b1b963James Dong
1250c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Allocate stack memory required by the function
1260c1bc742181ded4930842b46e9507372f0b1b963James Dong
1270c1bc742181ded4930842b46e9507372f0b1b963James Dong
1280c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Write function header
1290c1bc742181ded4930842b46e9507372f0b1b963James Dong    M_START armVCM4P10_InvTransformDequantLumaDC4x4,r5,d13
1300c1bc742181ded4930842b46e9507372f0b1b963James Dong
1310c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;******************************************************************
1320c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// The strategy used in implementing the transform is as follows:*
1330c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Load the 4x4 block into 4 D-registers                         *
1340c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Transpose the 4x4 matrix                                      *
1350c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Perform the row operations (on columns) using SIMD            *
1360c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Transpose the 4x4 result matrix                               *
1370c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Perform the coloumn operations                                *
1380c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;******************************************************************
1390c1bc742181ded4930842b46e9507372f0b1b963James Dong
1400c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Load all the 4x4 pixels in Transposed form
1410c1bc742181ded4930842b46e9507372f0b1b963James Dong
1420c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD4    {dIn0,dIn1,dIn2,dIn3},[pData]
1430c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     pQPDivTable, =armVCM4P10_QPDivTable        ;// QP Division look-up-table base pointer
1440c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDR     pQPModTable, =armVCM4P10_VMatrixQPModTable ;// QP Modulo look-up-table base pointer
1450c1bc742181ded4930842b46e9507372f0b1b963James Dong
1460c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1470c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Row Operations (Performed on columns)
1480c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1490c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Scale factor calculation is done using ARM instructions
1500c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Interleaved with NEON instructions inorder to Dual issue
1510c1bc742181ded4930842b46e9507372f0b1b963James Dong
1520c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dRowSum1,dIn0,dIn1
1530c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dRowSum2,dIn2,dIn3
1540c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dRowDiff1,dIn0,dIn1
1550c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDRSB   Shift, [pQPDivTable, QP]               ;// ARM CODE: Shift = pQPDivTable[QP]
1560c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dRowDiff2,dIn2,dIn3
1570c1bc742181ded4930842b46e9507372f0b1b963James Dong        LDRSB   Scale, [pQPModTable, QP]               ;// ARM CODE: Scale = pQPModTable[QP]
1580c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dRowOp0,dRowSum1,dRowSum2
1590c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dRowOp1,dRowSum1,dRowSum2
1600c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dRowOp2,dRowDiff1,dRowDiff2
1610c1bc742181ded4930842b46e9507372f0b1b963James Dong        LSL     Scale, Scale, Shift                    ;// ARM CODE: Scale = Scale << Shift
1620c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dRowOp3,dRowDiff1,dRowDiff2
1630c1bc742181ded4930842b46e9507372f0b1b963James Dong
1640c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1650c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Transpose the resultant matrix
1660c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1670c1bc742181ded4930842b46e9507372f0b1b963James Dong
1680c1bc742181ded4930842b46e9507372f0b1b963James Dong        VTRN    dRowOp0,dRowOp1
1690c1bc742181ded4930842b46e9507372f0b1b963James Dong        VTRN    dRowOp2,dRowOp3
1700c1bc742181ded4930842b46e9507372f0b1b963James Dong        VTRN    qRowOp01,qRowOp23
1710c1bc742181ded4930842b46e9507372f0b1b963James Dong
1720c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1730c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Coloumn Operations
1740c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;****************************************
1750c1bc742181ded4930842b46e9507372f0b1b963James Dong
1760c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dColSum1,dRowOp0,dRowOp1
1770c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dColSum2,dRowOp2,dRowOp3
1780c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dColDiff1,dRowOp0,dRowOp1
1790c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dColDiff2,dRowOp2,dRowOp3
1800c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dColOp0,dColSum1,dColSum2
1810c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dColOp1,dColSum1,dColSum2
1820c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSUB    dColOp2,dColDiff1,dColDiff2
1830c1bc742181ded4930842b46e9507372f0b1b963James Dong        VADD    dColOp3,dColDiff1,dColDiff2
1840c1bc742181ded4930842b46e9507372f0b1b963James Dong
1850c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;//----------------------------------------------------------------------
1860c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;//
1870c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// <Dequantize> improves on the c-reference code
1880c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Both the  cases i.e., Shift>=0 and Shift<0 cases are covered together
1890c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// We do not subtract 2 from Shift as in C reference, instead perform a
1900c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Scale << Shift once in the beginning and do a right shift by a
1910c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// constant 2 after the Multiplication. The value of Round would be 2
1920c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;//
1930c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// By doing this we aviod the Branches required and also
1940c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// reduce the code size substantially
1950c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;//
1960c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;//----------------------------------------------------------------------
1970c1bc742181ded4930842b46e9507372f0b1b963James Dong
1980c1bc742181ded4930842b46e9507372f0b1b963James Dong
1990c1bc742181ded4930842b46e9507372f0b1b963James Dong        VDUP    dScale, Scale                            ;// ARM -> NEON  copy 'scale' to vector
2000c1bc742181ded4930842b46e9507372f0b1b963James Dong
2010c1bc742181ded4930842b46e9507372f0b1b963James Dong
2020c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMOV    qRound0,#2                               ;// Set the Round Value
2030c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMOV    qRound1,#2
2040c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMOV    qRound2,#2
2050c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMOV    qRound3,#2
2060c1bc742181ded4930842b46e9507372f0b1b963James Dong
2070c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMLAL   qRound0,dColOp0,dScale                   ;// pDst[i] * Scale + Round
2080c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMLAL   qRound1,dColOp1,dScale
2090c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMLAL   qRound2,dColOp2,dScale
2100c1bc742181ded4930842b46e9507372f0b1b963James Dong        VMLAL   qRound3,dColOp3,dScale
2110c1bc742181ded4930842b46e9507372f0b1b963James Dong
2120c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHRN   dOut0,qRound0,#2                          ;// Right shift by 2 & (OMX_S16)Value
2130c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHRN   dOut1,qRound1,#2
2140c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHRN   dOut2,qRound2,#2
2150c1bc742181ded4930842b46e9507372f0b1b963James Dong        VSHRN   dOut3,qRound3,#2
2160c1bc742181ded4930842b46e9507372f0b1b963James Dong
2170c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;***************************
2180c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Store all the 4x4 pixels
2190c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;***************************
2200c1bc742181ded4930842b46e9507372f0b1b963James Dong
2210c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1  {dOut0,dOut1,dOut2,dOut3}, [pData]
2220c1bc742181ded4930842b46e9507372f0b1b963James Dong
2230c1bc742181ded4930842b46e9507372f0b1b963James Dong
2240c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Set return value
2250c1bc742181ded4930842b46e9507372f0b1b963James Dong
2260c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Write function tail
2270c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
2280c1bc742181ded4930842b46e9507372f0b1b963James Dong
2290c1bc742181ded4930842b46e9507372f0b1b963James Dong    ENDIF                                                           ;//CORTEXA8
2300c1bc742181ded4930842b46e9507372f0b1b963James Dong
2310c1bc742181ded4930842b46e9507372f0b1b963James Dong
2320c1bc742181ded4930842b46e9507372f0b1b963James Dong
2330c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Function: omxVCM4P10_TransformDequantLumaDCFromPair
2340c1bc742181ded4930842b46e9507372f0b1b963James Dong
2350c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Input Registers
2360c1bc742181ded4930842b46e9507372f0b1b963James DongppSrc               RN  0
2370c1bc742181ded4930842b46e9507372f0b1b963James DongpDst                RN  1
2380c1bc742181ded4930842b46e9507372f0b1b963James DongQPR2                RN  2
2390c1bc742181ded4930842b46e9507372f0b1b963James Dong
2400c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Output Registers
2410c1bc742181ded4930842b46e9507372f0b1b963James Dongresult              RN  0
2420c1bc742181ded4930842b46e9507372f0b1b963James Dong
2430c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Local Scratch Registers
2440c1bc742181ded4930842b46e9507372f0b1b963James DongpDstR4              RN  4
2450c1bc742181ded4930842b46e9507372f0b1b963James DongpDstR0              RN  0
2460c1bc742181ded4930842b46e9507372f0b1b963James DongQPR1                RN  1
2470c1bc742181ded4930842b46e9507372f0b1b963James DongQPR5                RN  5
2480c1bc742181ded4930842b46e9507372f0b1b963James Dong
2490c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Guarding implementation by the processor name
2500c1bc742181ded4930842b46e9507372f0b1b963James Dong
2510c1bc742181ded4930842b46e9507372f0b1b963James Dong    IF CortexA8
2520c1bc742181ded4930842b46e9507372f0b1b963James Dong
2530c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Allocate stack memory required by the function
2540c1bc742181ded4930842b46e9507372f0b1b963James Dong
2550c1bc742181ded4930842b46e9507372f0b1b963James Dong
2560c1bc742181ded4930842b46e9507372f0b1b963James Dong    ;// Write function header
2570c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_START omxVCM4P10_TransformDequantLumaDCFromPair,r5
2580c1bc742181ded4930842b46e9507372f0b1b963James Dong
2590c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     pDstR4,pDst                         ;// Saving register r1
2600c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     QPR5,QPR2                           ;// Saving register r2
2610c1bc742181ded4930842b46e9507372f0b1b963James Dong        BL      armVCM4P10_UnpackBlock4x4
2620c1bc742181ded4930842b46e9507372f0b1b963James Dong
2630c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     pDstR0,pDstR4                       ;// Setting up register r0
2640c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     QPR1,QPR5                           ;// Setting up register r1
2650c1bc742181ded4930842b46e9507372f0b1b963James Dong        BL      armVCM4P10_InvTransformDequantLumaDC4x4
2660c1bc742181ded4930842b46e9507372f0b1b963James Dong
2670c1bc742181ded4930842b46e9507372f0b1b963James Dong
2680c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Set return value
2690c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV     result,#OMX_Sts_NoErr
2700c1bc742181ded4930842b46e9507372f0b1b963James Dong
2710c1bc742181ded4930842b46e9507372f0b1b963James Dong        ;// Write function tail
2720c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
2730c1bc742181ded4930842b46e9507372f0b1b963James Dong
2740c1bc742181ded4930842b46e9507372f0b1b963James Dong
2750c1bc742181ded4930842b46e9507372f0b1b963James Dong    ENDIF                                                           ;//ARM1136JS
2760c1bc742181ded4930842b46e9507372f0b1b963James Dong
2770c1bc742181ded4930842b46e9507372f0b1b963James Dong
27878e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar    END
279