mc.h
2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
/* These MVs are passed in as arguments */
/* Chroma MVs are calculated and don't need to be sent in */
/* LBASE and OBASE are Relative to the base registers passed in */
#define ROffset (MB_YREF_SIZE/2)
#define CrOffset (MB_YREF_SIZE)
#define RCrOffset (MB_UVREF_SIZE/2)
#define OCrOffset CrOffset
.name dum, $7
.name dum2, $8
.name mc4, $9
.name Lbasep1, $15
.name Rbasep1, $16
.name xh, $17
.name yh, $18
.name mvx, $19
.name mvy, $20
.name xRbase, $21
.name xLbase, $22
.name xObase, $23
.name rtn2, $24
.name v0, $v4
.name v1, $v5
.name v2, $v6
.name v3, $v7
.name v0h, $v8
.name v1h, $v9
.name v2h, $v10
.name v3h, $v11
#define t0 t1p1
#define t3 t2p1
#define t4 t0h
.name t1, $v12
.name t1p1, $v13
.name t2, $v14
.name t2p1, $v15
.name t0h, $v16
.name t1h, $v17
.name t2h, $v18
.name t3h, $v19
.name vdum, $v20
.name vdum2, $v21
.name vdum3, $v22
.name vdum4, $v23
.name lo_res, $v24
.name hi_res, $v25
.name vconsts, $v31
#define HI_BYTE 0
#define LO_BYTE 1
#define DIV2 2
#define DIV4 3
#define HI_MASK 4
#define RSHFT 5
#define HI4_MASK 6
#define R4SHFT 7
/*
define(vaddb2,
`vmudl vdum, $2, vconsts[HI_BYTE]
vmadl vdum, $3, vconsts[HI_BYTE]
vand vdum2, $2, vconsts[LO_BYTE]
vand vdum3, $3, vconsts[LO_BYTE]
vmulf hi_res, vdum, vconsts[DIV2]
vadd vdum, vdum2, vdum3
vmudn $1, hi_res, vconsts[HI_BYTE]
vmulf lo_res, vdum, vconsts[DIV2]
vadd $1, $1, lo_res')
define(vaddb2,
`vand vdum, $2, vconsts[HI_MASK]
vand vdum2, $3, vconsts[HI_MASK]
vmudl $1, vdum, vconsts[RSHFT]
vmadl $1, vdum2, vconsts[RSHFT]')
define(vaddb4,
`vmudl vdum, $2, vconsts[HI_BYTE]
vmadl vdum, $3, vconsts[HI_BYTE]
vmadl vdum, $4, vconsts[HI_BYTE]
vmadl vdum, $5, vconsts[HI_BYTE]
vand vdum2, $3, vconsts[LO_BYTE]
vand vdum3, $4, vconsts[LO_BYTE]
vand vdum4, $5, vconsts[LO_BYTE]
vmulf hi_res, vdum, vconsts[DIV4]
vand vdum, $2, vconsts[LO_BYTE]
vmulf vdum2, vdum2, vconsts[DIV4]
vmacf vdum2, vdum3, vconsts[DIV4]
vmacf vdum2, vdum4, vconsts[DIV4]
vmacf lo_res, vdum, vconsts[DIV4]
vmudn $1, hi_res, vconsts[HI_BYTE]
vadd $1, $1, lo_res')
*/