Home | History | Annotate | Download | only in src
      1 ;//
      2 ;// Copyright (C) 2007-2008 ARM Limited
      3 ;//
      4 ;// Licensed under the Apache License, Version 2.0 (the "License");
      5 ;// you may not use this file except in compliance with the License.
      6 ;// You may obtain a copy of the License at
      7 ;//
      8 ;//      http://www.apache.org/licenses/LICENSE-2.0
      9 ;//
     10 ;// Unless required by applicable law or agreed to in writing, software
     11 ;// distributed under the License is distributed on an "AS IS" BASIS,
     12 ;// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
     13 ;// See the License for the specific language governing permissions and
     14 ;// limitations under the License.
     15 ;//
     16 ;//
     17 ;//
     18 ;// File Name:  armVCM4P2_SetPredDir_s.s
     19 ;// OpenMAX DL: v1.0.2
     20 ;// Revision:   9641
     21 ;// Date:       Thursday, February 7, 2008
     22 ;//
     23 ;//
     24 ;//
     25 ;//
     26 
     27 ; **
     28 ; * Function: armVCM4P2_SetPredDir
     29 ; *
     30 ; * Description:
     31 ; * Performs detecting the prediction direction
     32 ; *
     33 ; * Remarks:
     34 ; *
     35 ; * Parameters:
     36 ; * [in] blockIndex  block index indicating the component type and
     37 ; *                          position as defined in subclause 6.1.3.8, of ISO/IEC
     38 ; *                          14496-2. Furthermore, indexes 6 to 9 indicate the
     39 ; *                          alpha blocks spatially corresponding to luminance
     40 ; *                          blocks 0 to 3 in the same macroblock.
     41 ; * [in] pCoefBufRow pointer to the coefficient row buffer
     42 ; * [in] pQpBuf      pointer to the quantization parameter buffer
     43 ; * [out]predQP      quantization parameter of the predictor block
     44 ; * [out]predDir     indicates the prediction direction which takes one
     45 ; *                  of the following values:
     46 ; *                  OMX_VC_HORIZONTAL    predict horizontally
     47 ; *                  OMX_VC_VERTICAL      predict vertically
     48 ; *
     49 ; * Return Value:
     50 ; * Standard OMXResult result. See enumeration for possible result codes.
     51 ; *
     52 ; */
     53 
     54        INCLUDE omxtypes_s.h
     55        INCLUDE armCOMM_s.h
     56        INCLUDE omxVC_s.h
     57 
     58 
     59        M_VARIANTS ARM1136JS
     60 
     61 
     62        IF ARM1136JS
     63 
     64 ;// Input Arguments
     65 BlockIndex         RN 0
     66 pCoefBufRow        RN 1
     67 pCoefBufCol        RN 2
     68 predDir            RN 3
     69 predQP             RN 4
     70 pQpBuf             RN 5
     71 
     72 ;// Local Variables
     73 
     74 Return             RN 0
     75 blockDCLeft        RN 6
     76 blockDCTop         RN 7
     77 blockDCTopLeft     RN 8
     78 temp1              RN 9
     79 temp2              RN 14
     80 
     81        M_START    armVCM4P2_SetPredDir,r9
     82 
     83        M_ARG       ppredQP,4
     84        M_ARG       ppQpBuf,4
     85 
     86        LDRH        blockDCTopLeft,[pCoefBufRow,#-16]
     87        LDRH        blockDCLeft,[pCoefBufCol]
     88 
     89        TEQ         BlockIndex,#3
     90        LDREQH      blockDCTop,[pCoefBufCol,#-16]
     91        LDRNEH      blockDCTop,[pCoefBufRow]
     92 
     93        SUBS        temp1,blockDCLeft,blockDCTopLeft
     94        RSBLT       temp1,temp1,#0
     95        SUBS        temp2,blockDCTopLeft,blockDCTop
     96        RSBLT       temp2,temp2,#0
     97 
     98        M_LDR       pQpBuf,ppQpBuf
     99        M_LDR       predQP,ppredQP
    100        CMP         temp1,temp2
    101        MOV         temp2,#OMX_VC_VERTICAL
    102        LDRLTB      temp1,[pQpBuf,#1]
    103        STRLT       temp2,[predDir]
    104        STRLT       temp1,[predQP]
    105        MOV         temp2,#OMX_VC_HORIZONTAL
    106        LDRGEB      temp1,[pQpBuf]
    107        STRGE       temp2,[predDir]
    108        MOV         Return,#OMX_Sts_NoErr
    109        STRGE       temp1,[predQP]
    110 
    111 
    112 
    113        M_END
    114 
    115        ENDIF
    116 
    117        END
    118 
    119