armVCM4P2_Clip8_s.s revision 0c1bc742181ded4930842b46e9507372f0b1b963
10c1bc742181ded4930842b46e9507372f0b1b963James Dong; /**
20c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
30c1bc742181ded4930842b46e9507372f0b1b963James Dong; * File Name:  armVCM4P2_Clip8_s.s
40c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OpenMAX DL: v1.0.2
50c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Revision:   12290
60c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Date:       Wednesday, April 9, 2008
70c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
80c1bc742181ded4930842b46e9507372f0b1b963James Dong; * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
90c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
100c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
110c1bc742181ded4930842b46e9507372f0b1b963James Dong; *
120c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Description:
130c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Contains module for Clipping 16 bit value to [0,255] Range
140c1bc742181ded4930842b46e9507372f0b1b963James Dong; */
150c1bc742181ded4930842b46e9507372f0b1b963James Dong
160c1bc742181ded4930842b46e9507372f0b1b963James Dong      INCLUDE omxtypes_s.h
170c1bc742181ded4930842b46e9507372f0b1b963James Dong      INCLUDE armCOMM_s.h
180c1bc742181ded4930842b46e9507372f0b1b963James Dong
190c1bc742181ded4930842b46e9507372f0b1b963James Dong
200c1bc742181ded4930842b46e9507372f0b1b963James Dong      M_VARIANTS CortexA8
210c1bc742181ded4930842b46e9507372f0b1b963James Dong
220c1bc742181ded4930842b46e9507372f0b1b963James Dong      IF CortexA8
230c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Input Arguments
240c1bc742181ded4930842b46e9507372f0b1b963James Dong
250c1bc742181ded4930842b46e9507372f0b1b963James DongpSrc                 RN 0
260c1bc742181ded4930842b46e9507372f0b1b963James DongpDst                 RN 1
270c1bc742181ded4930842b46e9507372f0b1b963James Dongstep                 RN 2
280c1bc742181ded4930842b46e9507372f0b1b963James Dong
290c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Neon Registers
300c1bc742181ded4930842b46e9507372f0b1b963James Dong
310c1bc742181ded4930842b46e9507372f0b1b963James Dongqx0                  QN  Q0.S16
320c1bc742181ded4930842b46e9507372f0b1b963James Dongdx00                 DN  D0.S16
330c1bc742181ded4930842b46e9507372f0b1b963James Dongdx01                 DN  D1.S16
340c1bc742181ded4930842b46e9507372f0b1b963James Dongqx1                  QN  Q1.S16
350c1bc742181ded4930842b46e9507372f0b1b963James Dongdx10                 DN  D2.S16
360c1bc742181ded4930842b46e9507372f0b1b963James Dongdx11                 DN  D3.S16
370c1bc742181ded4930842b46e9507372f0b1b963James Dong
380c1bc742181ded4930842b46e9507372f0b1b963James Dongqx2                  QN  Q2.S16
390c1bc742181ded4930842b46e9507372f0b1b963James Dongdx20                 DN  D4.S16
400c1bc742181ded4930842b46e9507372f0b1b963James Dongdx21                 DN  D5.S16
410c1bc742181ded4930842b46e9507372f0b1b963James Dongqx3                  QN  Q3.S16
420c1bc742181ded4930842b46e9507372f0b1b963James Dongdx30                 DN  D6.S16
430c1bc742181ded4930842b46e9507372f0b1b963James Dongdx31                 DN  D7.S16
440c1bc742181ded4930842b46e9507372f0b1b963James Dong
450c1bc742181ded4930842b46e9507372f0b1b963James Dong
460c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip0               DN  D0.U8
470c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip1               DN  D2.U8
480c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip2               DN  D4.U8
490c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip3               DN  D6.U8
500c1bc742181ded4930842b46e9507372f0b1b963James Dong
510c1bc742181ded4930842b46e9507372f0b1b963James Dong       M_START armVCM4P2_Clip8
520c1bc742181ded4930842b46e9507372f0b1b963James Dong
530c1bc742181ded4930842b46e9507372f0b1b963James Dong       VLD1          {dx00,dx01,dx10,dx11},[pSrc]!          ;// Load 16 entries from pSrc
540c1bc742181ded4930842b46e9507372f0b1b963James Dong       VLD1          {dx20,dx21,dx30,dx31},[pSrc]!          ;// Load next 16 entries from pSrc
550c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip0,qx0,#0                          ;// dclip0[i]=clip qx0[i] to [0,255]
560c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip1,qx1,#0                          ;// dclip1[i]=clip qx1[i] to [0,255]
570c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip0},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
580c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip1},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
590c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip2,qx2,#0
600c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip3,qx3,#0
610c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip2},[pDst],step
620c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip3},[pDst],step
630c1bc742181ded4930842b46e9507372f0b1b963James Dong
640c1bc742181ded4930842b46e9507372f0b1b963James Dong       VLD1          {dx00,dx01,dx10,dx11},[pSrc]!          ;// Load 16 entries from pSrc
650c1bc742181ded4930842b46e9507372f0b1b963James Dong       VLD1          {dx20,dx21,dx30,dx31},[pSrc]!          ;// Load next 16 entries from pSrc
660c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip0,qx0,#0                          ;// dclip0[i]=clip qx0[i] to [0,255]
670c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip1,qx1,#0                          ;// dclip1[i]=clip qx1[i] to [0,255]
680c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip0},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
690c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip1},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
700c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip2,qx2,#0
710c1bc742181ded4930842b46e9507372f0b1b963James Dong       VQSHRUN       dclip3,qx3,#0
720c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip2},[pDst],step
730c1bc742181ded4930842b46e9507372f0b1b963James Dong       VST1          {dclip3},[pDst],step
740c1bc742181ded4930842b46e9507372f0b1b963James Dong
750c1bc742181ded4930842b46e9507372f0b1b963James Dong
760c1bc742181ded4930842b46e9507372f0b1b963James Dong
770c1bc742181ded4930842b46e9507372f0b1b963James Dong        M_END
780c1bc742181ded4930842b46e9507372f0b1b963James Dong        ENDIF
790c1bc742181ded4930842b46e9507372f0b1b963James Dong
800c1bc742181ded4930842b46e9507372f0b1b963James Dong
810c1bc742181ded4930842b46e9507372f0b1b963James Dong
820c1bc742181ded4930842b46e9507372f0b1b963James Dong        END
83