Home | History | Annotate | Download | only in src
      1 ; /**
      2 ; *
      3 ; * File Name:  armVCM4P2_Clip8_s.s
      4 ; * OpenMAX DL: v1.0.2
      5 ; * Revision:   12290
      6 ; * Date:       Wednesday, April 9, 2008
      7 ; *
      8 ; * (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
      9 ; *
     10 ; *
     11 ; *
     12 ; * Description:
     13 ; * Contains module for Clipping 16 bit value to [0,255] Range
     14 ; */
     15 
     16       INCLUDE omxtypes_s.h
     17       INCLUDE armCOMM_s.h
     18 
     19 
     20       M_VARIANTS CortexA8
     21 
     22       IF CortexA8
     23 ;//Input Arguments
     24 
     25 pSrc                 RN 0
     26 pDst                 RN 1
     27 step                 RN 2
     28 
     29 ;// Neon Registers
     30 
     31 qx0                  QN  Q0.S16
     32 dx00                 DN  D0.S16
     33 dx01                 DN  D1.S16
     34 qx1                  QN  Q1.S16
     35 dx10                 DN  D2.S16
     36 dx11                 DN  D3.S16
     37 
     38 qx2                  QN  Q2.S16
     39 dx20                 DN  D4.S16
     40 dx21                 DN  D5.S16
     41 qx3                  QN  Q3.S16
     42 dx30                 DN  D6.S16
     43 dx31                 DN  D7.S16
     44 
     45 
     46 dclip0               DN  D0.U8
     47 dclip1               DN  D2.U8
     48 dclip2               DN  D4.U8
     49 dclip3               DN  D6.U8
     50 
     51        M_START armVCM4P2_Clip8
     52 
     53        VLD1          {dx00,dx01,dx10,dx11},[pSrc]!          ;// Load 16 entries from pSrc
     54        VLD1          {dx20,dx21,dx30,dx31},[pSrc]!          ;// Load next 16 entries from pSrc
     55        VQSHRUN       dclip0,qx0,#0                          ;// dclip0[i]=clip qx0[i] to [0,255]
     56        VQSHRUN       dclip1,qx1,#0                          ;// dclip1[i]=clip qx1[i] to [0,255]
     57        VST1          {dclip0},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
     58        VST1          {dclip1},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
     59        VQSHRUN       dclip2,qx2,#0
     60        VQSHRUN       dclip3,qx3,#0
     61        VST1          {dclip2},[pDst],step
     62        VST1          {dclip3},[pDst],step
     63 
     64        VLD1          {dx00,dx01,dx10,dx11},[pSrc]!          ;// Load 16 entries from pSrc
     65        VLD1          {dx20,dx21,dx30,dx31},[pSrc]!          ;// Load next 16 entries from pSrc
     66        VQSHRUN       dclip0,qx0,#0                          ;// dclip0[i]=clip qx0[i] to [0,255]
     67        VQSHRUN       dclip1,qx1,#0                          ;// dclip1[i]=clip qx1[i] to [0,255]
     68        VST1          {dclip0},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
     69        VST1          {dclip1},[pDst],step                   ;// store 8 bytes and pDst=pDst+step
     70        VQSHRUN       dclip2,qx2,#0
     71        VQSHRUN       dclip3,qx3,#0
     72        VST1          {dclip2},[pDst],step
     73        VST1          {dclip3},[pDst],step
     74 
     75 
     76 
     77         M_END
     78         ENDIF
     79 
     80 
     81 
     82         END
     83