178e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// 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;// 160c1bc742181ded4930842b46e9507372f0b1b963James Dong; /** 170c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 180c1bc742181ded4930842b46e9507372f0b1b963James Dong; * File Name: armVCM4P2_Clip8_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; * Contains module for Clipping 16 bit value to [0,255] Range 280c1bc742181ded4930842b46e9507372f0b1b963James Dong; */ 290c1bc742181ded4930842b46e9507372f0b1b963James Dong 300c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE omxtypes_s.h 310c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE armCOMM_s.h 320c1bc742181ded4930842b46e9507372f0b1b963James Dong 330c1bc742181ded4930842b46e9507372f0b1b963James Dong 340c1bc742181ded4930842b46e9507372f0b1b963James Dong M_VARIANTS CortexA8 350c1bc742181ded4930842b46e9507372f0b1b963James Dong 360c1bc742181ded4930842b46e9507372f0b1b963James Dong IF CortexA8 370c1bc742181ded4930842b46e9507372f0b1b963James Dong;//Input Arguments 380c1bc742181ded4930842b46e9507372f0b1b963James Dong 390c1bc742181ded4930842b46e9507372f0b1b963James DongpSrc RN 0 400c1bc742181ded4930842b46e9507372f0b1b963James DongpDst RN 1 410c1bc742181ded4930842b46e9507372f0b1b963James Dongstep RN 2 420c1bc742181ded4930842b46e9507372f0b1b963James Dong 430c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Neon Registers 440c1bc742181ded4930842b46e9507372f0b1b963James Dong 450c1bc742181ded4930842b46e9507372f0b1b963James Dongqx0 QN Q0.S16 460c1bc742181ded4930842b46e9507372f0b1b963James Dongdx00 DN D0.S16 470c1bc742181ded4930842b46e9507372f0b1b963James Dongdx01 DN D1.S16 480c1bc742181ded4930842b46e9507372f0b1b963James Dongqx1 QN Q1.S16 490c1bc742181ded4930842b46e9507372f0b1b963James Dongdx10 DN D2.S16 500c1bc742181ded4930842b46e9507372f0b1b963James Dongdx11 DN D3.S16 510c1bc742181ded4930842b46e9507372f0b1b963James Dong 520c1bc742181ded4930842b46e9507372f0b1b963James Dongqx2 QN Q2.S16 530c1bc742181ded4930842b46e9507372f0b1b963James Dongdx20 DN D4.S16 540c1bc742181ded4930842b46e9507372f0b1b963James Dongdx21 DN D5.S16 550c1bc742181ded4930842b46e9507372f0b1b963James Dongqx3 QN Q3.S16 560c1bc742181ded4930842b46e9507372f0b1b963James Dongdx30 DN D6.S16 570c1bc742181ded4930842b46e9507372f0b1b963James Dongdx31 DN D7.S16 580c1bc742181ded4930842b46e9507372f0b1b963James Dong 590c1bc742181ded4930842b46e9507372f0b1b963James Dong 600c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip0 DN D0.U8 610c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip1 DN D2.U8 620c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip2 DN D4.U8 630c1bc742181ded4930842b46e9507372f0b1b963James Dongdclip3 DN D6.U8 640c1bc742181ded4930842b46e9507372f0b1b963James Dong 650c1bc742181ded4930842b46e9507372f0b1b963James Dong M_START armVCM4P2_Clip8 660c1bc742181ded4930842b46e9507372f0b1b963James Dong 670c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1 {dx00,dx01,dx10,dx11},[pSrc]! ;// Load 16 entries from pSrc 680c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1 {dx20,dx21,dx30,dx31},[pSrc]! ;// Load next 16 entries from pSrc 690c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip0,qx0,#0 ;// dclip0[i]=clip qx0[i] to [0,255] 700c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip1,qx1,#0 ;// dclip1[i]=clip qx1[i] to [0,255] 710c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip0},[pDst],step ;// store 8 bytes and pDst=pDst+step 720c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip1},[pDst],step ;// store 8 bytes and pDst=pDst+step 730c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip2,qx2,#0 740c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip3,qx3,#0 750c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip2},[pDst],step 760c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip3},[pDst],step 770c1bc742181ded4930842b46e9507372f0b1b963James Dong 780c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1 {dx00,dx01,dx10,dx11},[pSrc]! ;// Load 16 entries from pSrc 790c1bc742181ded4930842b46e9507372f0b1b963James Dong VLD1 {dx20,dx21,dx30,dx31},[pSrc]! ;// Load next 16 entries from pSrc 800c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip0,qx0,#0 ;// dclip0[i]=clip qx0[i] to [0,255] 810c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip1,qx1,#0 ;// dclip1[i]=clip qx1[i] to [0,255] 820c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip0},[pDst],step ;// store 8 bytes and pDst=pDst+step 830c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip1},[pDst],step ;// store 8 bytes and pDst=pDst+step 840c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip2,qx2,#0 850c1bc742181ded4930842b46e9507372f0b1b963James Dong VQSHRUN dclip3,qx3,#0 860c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip2},[pDst],step 870c1bc742181ded4930842b46e9507372f0b1b963James Dong VST1 {dclip3},[pDst],step 880c1bc742181ded4930842b46e9507372f0b1b963James Dong 890c1bc742181ded4930842b46e9507372f0b1b963James Dong 900c1bc742181ded4930842b46e9507372f0b1b963James Dong 910c1bc742181ded4930842b46e9507372f0b1b963James Dong M_END 920c1bc742181ded4930842b46e9507372f0b1b963James Dong ENDIF 930c1bc742181ded4930842b46e9507372f0b1b963James Dong 940c1bc742181ded4930842b46e9507372f0b1b963James Dong 950c1bc742181ded4930842b46e9507372f0b1b963James Dong 960c1bc742181ded4930842b46e9507372f0b1b963James Dong END 97