1;//
2;//
3;// File Name:  armVCM4P2_SetPredDir_s.s
4;// OpenMAX DL: v1.0.2
5;// Revision:   9641
6;// Date:       Thursday, February 7, 2008
7;//
8;// (c) Copyright 2007-2008 ARM Limited. All Rights Reserved.
9;//
10;//
11;//
12
13; **
14; * Function: armVCM4P2_SetPredDir
15; *
16; * Description:
17; * Performs detecting the prediction direction
18; *
19; * Remarks:
20; *
21; * Parameters:
22; * [in] blockIndex  block index indicating the component type and
23; *                          position as defined in subclause 6.1.3.8, of ISO/IEC
24; *                          14496-2. Furthermore, indexes 6 to 9 indicate the
25; *                          alpha blocks spatially corresponding to luminance
26; *                          blocks 0 to 3 in the same macroblock.
27; * [in] pCoefBufRow pointer to the coefficient row buffer
28; * [in] pQpBuf      pointer to the quantization parameter buffer
29; * [out]predQP      quantization parameter of the predictor block
30; * [out]predDir     indicates the prediction direction which takes one
31; *                  of the following values:
32; *                  OMX_VC_HORIZONTAL    predict horizontally
33; *                  OMX_VC_VERTICAL      predict vertically
34; *
35; * Return Value:
36; * Standard OMXResult result. See enumeration for possible result codes.
37; *
38; */
39
40       INCLUDE omxtypes_s.h
41       INCLUDE armCOMM_s.h
42       INCLUDE omxVC_s.h
43
44
45       M_VARIANTS ARM1136JS
46
47
48       IF ARM1136JS
49
50;// Input Arguments
51BlockIndex         RN 0
52pCoefBufRow        RN 1
53pCoefBufCol        RN 2
54predDir            RN 3
55predQP             RN 4
56pQpBuf             RN 5
57
58;// Local Variables
59
60Return             RN 0
61blockDCLeft        RN 6
62blockDCTop         RN 7
63blockDCTopLeft     RN 8
64temp1              RN 9
65temp2              RN 14
66
67       M_START    armVCM4P2_SetPredDir,r9
68
69       M_ARG       ppredQP,4
70       M_ARG       ppQpBuf,4
71
72       LDRH        blockDCTopLeft,[pCoefBufRow,#-16]
73       LDRH        blockDCLeft,[pCoefBufCol]
74
75       TEQ         BlockIndex,#3
76       LDREQH      blockDCTop,[pCoefBufCol,#-16]
77       LDRNEH      blockDCTop,[pCoefBufRow]
78
79       SUBS        temp1,blockDCLeft,blockDCTopLeft
80       RSBLT       temp1,temp1,#0
81       SUBS        temp2,blockDCTopLeft,blockDCTop
82       RSBLT       temp2,temp2,#0
83
84       M_LDR       pQpBuf,ppQpBuf
85       M_LDR       predQP,ppredQP
86       CMP         temp1,temp2
87       MOV         temp2,#OMX_VC_VERTICAL
88       LDRLTB      temp1,[pQpBuf,#1]
89       STRLT       temp2,[predDir]
90       STRLT       temp1,[predQP]
91       MOV         temp2,#OMX_VC_HORIZONTAL
92       LDRGEB      temp1,[pQpBuf]
93       STRGE       temp2,[predDir]
94       MOV         Return,#OMX_Sts_NoErr
95       STRGE       temp1,[predQP]
96
97
98
99       M_END
100
101       ENDIF
102
103       END
104
105