10c1bc742181ded4930842b46e9507372f0b1b963James Dong ;/**
20c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * Function: omxVCCOMM_Copy8x8
30c1bc742181ded4930842b46e9507372f0b1b963James Dong ; *
40c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * Description:
50c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * Copies the reference 8x8 block to the current block.
60c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * Parameters:
70c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * [in] pSrc         - pointer to the reference block in the source frame; must be aligned on an 8-byte boundary.
80c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * [in] step         - distance between the starts of consecutive lines in the reference frame, in bytes;
90c1bc742181ded4930842b46e9507372f0b1b963James Dong ; *                     must be a multiple of 8 and must be larger than or equal to 8.
100c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * [out] pDst        - pointer to the destination block; must be aligned on an 8-byte boundary.
110c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * Return Value:
120c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * OMX_Sts_NoErr     - no error
130c1bc742181ded4930842b46e9507372f0b1b963James Dong ; * OMX_Sts_BadArgErr - bad arguments; returned under any of the following conditions:
140c1bc742181ded4930842b46e9507372f0b1b963James Dong ; *                   - one or more of the following pointers is NULL:  pSrc, pDst
150c1bc742181ded4930842b46e9507372f0b1b963James Dong ; *                   - one or more of the following pointers is not aligned on an 8-byte boundary:  pSrc, pDst
160c1bc742181ded4930842b46e9507372f0b1b963James Dong ; *                   - step <8 or step is not a multiple of 8.
170c1bc742181ded4930842b46e9507372f0b1b963James Dong ; */
180c1bc742181ded4930842b46e9507372f0b1b963James Dong
190c1bc742181ded4930842b46e9507372f0b1b963James Dong   INCLUDE omxtypes_s.h
200c1bc742181ded4930842b46e9507372f0b1b963James Dong
210c1bc742181ded4930842b46e9507372f0b1b963James Dong
220c1bc742181ded4930842b46e9507372f0b1b963James Dong     M_VARIANTS CortexA8
230c1bc742181ded4930842b46e9507372f0b1b963James Dong
240c1bc742181ded4930842b46e9507372f0b1b963James Dong     IF CortexA8
250c1bc742181ded4930842b46e9507372f0b1b963James Dong
260c1bc742181ded4930842b46e9507372f0b1b963James Dong
270c1bc742181ded4930842b46e9507372f0b1b963James Dong ;//Input Arguments
280c1bc742181ded4930842b46e9507372f0b1b963James DongpSrc    RN 0
290c1bc742181ded4930842b46e9507372f0b1b963James DongpDst    RN 1
300c1bc742181ded4930842b46e9507372f0b1b963James Dongstep    RN 2
310c1bc742181ded4930842b46e9507372f0b1b963James Dong
320c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Local Variables
330c1bc742181ded4930842b46e9507372f0b1b963James DongCount   RN 3
340c1bc742181ded4930842b46e9507372f0b1b963James DongReturn  RN 0
350c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Neon Registers
360c1bc742181ded4930842b46e9507372f0b1b963James Dong
370c1bc742181ded4930842b46e9507372f0b1b963James DongX0      DN D0.S8
380c1bc742181ded4930842b46e9507372f0b1b963James DongX1      DN D1.S8
390c1bc742181ded4930842b46e9507372f0b1b963James DongX2      DN D2.S8
400c1bc742181ded4930842b46e9507372f0b1b963James DongX3      DN D3.S8
410c1bc742181ded4930842b46e9507372f0b1b963James Dong     M_START omxVCCOMM_Copy8x8
420c1bc742181ded4930842b46e9507372f0b1b963James Dong
430c1bc742181ded4930842b46e9507372f0b1b963James Dong
440c1bc742181ded4930842b46e9507372f0b1b963James Dong
450c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X0},[pSrc],step            ;// Load 8 bytes from 8 byte aligned pSrc, pSrc=pSrc+step after load
460c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X1},[pSrc],step
470c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X2},[pSrc],step
480c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X3},[pSrc],step
490c1bc742181ded4930842b46e9507372f0b1b963James Dong
500c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1  {X0,X1},[pDst]!            ;// Store 16 bytes to 8 byte aligned pDst
510c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1  {X2,X3},[pDst]!
520c1bc742181ded4930842b46e9507372f0b1b963James Dong
530c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X0},[pSrc],step
540c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X1},[pSrc],step
550c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X2},[pSrc],step
560c1bc742181ded4930842b46e9507372f0b1b963James Dong        VLD1  {X3},[pSrc],step
570c1bc742181ded4930842b46e9507372f0b1b963James Dong
580c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1  {X0,X1},[pDst]!
590c1bc742181ded4930842b46e9507372f0b1b963James Dong        VST1  {X2,X3},[pDst]!
600c1bc742181ded4930842b46e9507372f0b1b963James Dong
610c1bc742181ded4930842b46e9507372f0b1b963James Dong        MOV   Return,#OMX_Sts_NoErr
620c1bc742181ded4930842b46e9507372f0b1b963James Dong
630c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
640c1bc742181ded4930842b46e9507372f0b1b963James Dong        ENDIF
650c1bc742181ded4930842b46e9507372f0b1b963James Dong
660c1bc742181ded4930842b46e9507372f0b1b963James Dong
670c1bc742181ded4930842b46e9507372f0b1b963James Dong
680c1bc742181ded4930842b46e9507372f0b1b963James Dong
690c1bc742181ded4930842b46e9507372f0b1b963James Dong        END
700c1bc742181ded4930842b46e9507372f0b1b963James Dong