10c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 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;// 1678e52bfac041d71ce53b5b13c2abf78af742b09dLajos Molnar;// 170c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 180c1bc742181ded4930842b46e9507372f0b1b963James Dong;// File Name: armVCM4P2_SetPredDir_s.s 190c1bc742181ded4930842b46e9507372f0b1b963James Dong;// OpenMAX DL: v1.0.2 200c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Revision: 9641 210c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Date: Thursday, February 7, 2008 220c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 230c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 240c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 250c1bc742181ded4930842b46e9507372f0b1b963James Dong;// 260c1bc742181ded4930842b46e9507372f0b1b963James Dong 270c1bc742181ded4930842b46e9507372f0b1b963James Dong; ** 280c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Function: armVCM4P2_SetPredDir 290c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 300c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Description: 310c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Performs detecting the prediction direction 320c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 330c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Remarks: 340c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 350c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Parameters: 360c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in] blockIndex block index indicating the component type and 370c1bc742181ded4930842b46e9507372f0b1b963James Dong; * position as defined in subclause 6.1.3.8, of ISO/IEC 380c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 14496-2. Furthermore, indexes 6 to 9 indicate the 390c1bc742181ded4930842b46e9507372f0b1b963James Dong; * alpha blocks spatially corresponding to luminance 400c1bc742181ded4930842b46e9507372f0b1b963James Dong; * blocks 0 to 3 in the same macroblock. 410c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in] pCoefBufRow pointer to the coefficient row buffer 420c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [in] pQpBuf pointer to the quantization parameter buffer 430c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [out]predQP quantization parameter of the predictor block 440c1bc742181ded4930842b46e9507372f0b1b963James Dong; * [out]predDir indicates the prediction direction which takes one 450c1bc742181ded4930842b46e9507372f0b1b963James Dong; * of the following values: 460c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OMX_VC_HORIZONTAL predict horizontally 470c1bc742181ded4930842b46e9507372f0b1b963James Dong; * OMX_VC_VERTICAL predict vertically 480c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 490c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Return Value: 500c1bc742181ded4930842b46e9507372f0b1b963James Dong; * Standard OMXResult result. See enumeration for possible result codes. 510c1bc742181ded4930842b46e9507372f0b1b963James Dong; * 520c1bc742181ded4930842b46e9507372f0b1b963James Dong; */ 530c1bc742181ded4930842b46e9507372f0b1b963James Dong 540c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE omxtypes_s.h 550c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE armCOMM_s.h 560c1bc742181ded4930842b46e9507372f0b1b963James Dong INCLUDE omxVC_s.h 570c1bc742181ded4930842b46e9507372f0b1b963James Dong 580c1bc742181ded4930842b46e9507372f0b1b963James Dong 590c1bc742181ded4930842b46e9507372f0b1b963James Dong M_VARIANTS ARM1136JS 600c1bc742181ded4930842b46e9507372f0b1b963James Dong 610c1bc742181ded4930842b46e9507372f0b1b963James Dong 620c1bc742181ded4930842b46e9507372f0b1b963James Dong IF ARM1136JS 630c1bc742181ded4930842b46e9507372f0b1b963James Dong 640c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Input Arguments 650c1bc742181ded4930842b46e9507372f0b1b963James DongBlockIndex RN 0 660c1bc742181ded4930842b46e9507372f0b1b963James DongpCoefBufRow RN 1 670c1bc742181ded4930842b46e9507372f0b1b963James DongpCoefBufCol RN 2 680c1bc742181ded4930842b46e9507372f0b1b963James DongpredDir RN 3 690c1bc742181ded4930842b46e9507372f0b1b963James DongpredQP RN 4 700c1bc742181ded4930842b46e9507372f0b1b963James DongpQpBuf RN 5 710c1bc742181ded4930842b46e9507372f0b1b963James Dong 720c1bc742181ded4930842b46e9507372f0b1b963James Dong;// Local Variables 730c1bc742181ded4930842b46e9507372f0b1b963James Dong 740c1bc742181ded4930842b46e9507372f0b1b963James DongReturn RN 0 750c1bc742181ded4930842b46e9507372f0b1b963James DongblockDCLeft RN 6 760c1bc742181ded4930842b46e9507372f0b1b963James DongblockDCTop RN 7 770c1bc742181ded4930842b46e9507372f0b1b963James DongblockDCTopLeft RN 8 780c1bc742181ded4930842b46e9507372f0b1b963James Dongtemp1 RN 9 790c1bc742181ded4930842b46e9507372f0b1b963James Dongtemp2 RN 14 800c1bc742181ded4930842b46e9507372f0b1b963James Dong 810c1bc742181ded4930842b46e9507372f0b1b963James Dong M_START armVCM4P2_SetPredDir,r9 820c1bc742181ded4930842b46e9507372f0b1b963James Dong 830c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ppredQP,4 840c1bc742181ded4930842b46e9507372f0b1b963James Dong M_ARG ppQpBuf,4 850c1bc742181ded4930842b46e9507372f0b1b963James Dong 860c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRH blockDCTopLeft,[pCoefBufRow,#-16] 870c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRH blockDCLeft,[pCoefBufCol] 880c1bc742181ded4930842b46e9507372f0b1b963James Dong 890c1bc742181ded4930842b46e9507372f0b1b963James Dong TEQ BlockIndex,#3 900c1bc742181ded4930842b46e9507372f0b1b963James Dong LDREQH blockDCTop,[pCoefBufCol,#-16] 910c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRNEH blockDCTop,[pCoefBufRow] 920c1bc742181ded4930842b46e9507372f0b1b963James Dong 930c1bc742181ded4930842b46e9507372f0b1b963James Dong SUBS temp1,blockDCLeft,blockDCTopLeft 940c1bc742181ded4930842b46e9507372f0b1b963James Dong RSBLT temp1,temp1,#0 950c1bc742181ded4930842b46e9507372f0b1b963James Dong SUBS temp2,blockDCTopLeft,blockDCTop 960c1bc742181ded4930842b46e9507372f0b1b963James Dong RSBLT temp2,temp2,#0 970c1bc742181ded4930842b46e9507372f0b1b963James Dong 980c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR pQpBuf,ppQpBuf 990c1bc742181ded4930842b46e9507372f0b1b963James Dong M_LDR predQP,ppredQP 1000c1bc742181ded4930842b46e9507372f0b1b963James Dong CMP temp1,temp2 1010c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV temp2,#OMX_VC_VERTICAL 1020c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRLTB temp1,[pQpBuf,#1] 1030c1bc742181ded4930842b46e9507372f0b1b963James Dong STRLT temp2,[predDir] 1040c1bc742181ded4930842b46e9507372f0b1b963James Dong STRLT temp1,[predQP] 1050c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV temp2,#OMX_VC_HORIZONTAL 1060c1bc742181ded4930842b46e9507372f0b1b963James Dong LDRGEB temp1,[pQpBuf] 1070c1bc742181ded4930842b46e9507372f0b1b963James Dong STRGE temp2,[predDir] 1080c1bc742181ded4930842b46e9507372f0b1b963James Dong MOV Return,#OMX_Sts_NoErr 1090c1bc742181ded4930842b46e9507372f0b1b963James Dong STRGE temp1,[predQP] 1100c1bc742181ded4930842b46e9507372f0b1b963James Dong 1110c1bc742181ded4930842b46e9507372f0b1b963James Dong 1120c1bc742181ded4930842b46e9507372f0b1b963James Dong 1130c1bc742181ded4930842b46e9507372f0b1b963James Dong M_END 1140c1bc742181ded4930842b46e9507372f0b1b963James Dong 1150c1bc742181ded4930842b46e9507372f0b1b963James Dong ENDIF 1160c1bc742181ded4930842b46e9507372f0b1b963James Dong 1170c1bc742181ded4930842b46e9507372f0b1b963James Dong END 1180c1bc742181ded4930842b46e9507372f0b1b963James Dong 119