omxVCCOMM_Copy8x8_s.s revision 0c1bc742181ded4930842b46e9507372f0b1b963
1 ;/**
2 ; * Function: omxVCCOMM_Copy8x8
3 ; *
4 ; * Description:
5 ; * Copies the reference 8x8 block to the current block.
6 ; * Parameters:
7 ; * [in] pSrc         - pointer to the reference block in the source frame; must be aligned on an 8-byte boundary.
8 ; * [in] step         - distance between the starts of consecutive lines in the reference frame, in bytes;
9 ; *                     must be a multiple of 8 and must be larger than or equal to 8.
10 ; * [out] pDst        - pointer to the destination block; must be aligned on an 8-byte boundary.
11 ; * Return Value:
12 ; * OMX_Sts_NoErr     - no error
13 ; * OMX_Sts_BadArgErr - bad arguments; returned under any of the following conditions:
14 ; *                   - one or more of the following pointers is NULL:  pSrc, pDst
15 ; *                   - one or more of the following pointers is not aligned on an 8-byte boundary:  pSrc, pDst
16 ; *                   - step <8 or step is not a multiple of 8.
17 ; */
18
19   INCLUDE omxtypes_s.h
20
21
22     M_VARIANTS CortexA8
23
24     IF CortexA8
25
26
27 ;//Input Arguments
28pSrc    RN 0
29pDst    RN 1
30step    RN 2
31
32;//Local Variables
33Count   RN 3
34Return  RN 0
35;// Neon Registers
36
37X0      DN D0.S8
38X1      DN D1.S8
39X2      DN D2.S8
40X3      DN D3.S8
41     M_START omxVCCOMM_Copy8x8
42
43
44
45        VLD1  {X0},[pSrc],step            ;// Load 8 bytes from 8 byte aligned pSrc, pSrc=pSrc+step after load
46        VLD1  {X1},[pSrc],step
47        VLD1  {X2},[pSrc],step
48        VLD1  {X3},[pSrc],step
49
50        VST1  {X0,X1},[pDst]!            ;// Store 16 bytes to 8 byte aligned pDst
51        VST1  {X2,X3},[pDst]!
52
53        VLD1  {X0},[pSrc],step
54        VLD1  {X1},[pSrc],step
55        VLD1  {X2},[pSrc],step
56        VLD1  {X3},[pSrc],step
57
58        VST1  {X0,X1},[pDst]!
59        VST1  {X2,X3},[pDst]!
60
61        MOV   Return,#OMX_Sts_NoErr
62
63        M_END
64        ENDIF
65
66
67
68
69        END
70