Mercurial > libavcodec.hg
annotate alpha/motion_est_mvi_asm.S @ 5784:af2dab646def libavcodec
Augment mmcodecoding process to work properly with fields. Part of PAFF implementation.
patch by Jeff Downs, heydowns a borg d com
original thread:
Subject: [FFmpeg-devel] [PATCH] Implement PAFF in H.264
Date: 18/09/07 20:30
author | andoma |
---|---|
date | Sat, 06 Oct 2007 15:49:13 +0000 |
parents | 12fc192bc2bd |
children | 7a463923ecd1 |
rev | line source |
---|---|
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
1 /* |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
2 * Alpha optimized DSP utils |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
3 * Copyright (c) 2002 Falk Hueffner <falk@debian.org> |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
4 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
5 * This file is part of FFmpeg. |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
6 * |
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
7 * FFmpeg is free software; you can redistribute it and/or |
3130 | 8 * modify it under the terms of the GNU Lesser General Public |
9 * License as published by the Free Software Foundation; either | |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
10 * version 2.1 of the License, or (at your option) any later version. |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
11 * |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
12 * FFmpeg is distributed in the hope that it will be useful, |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of |
3130 | 14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU |
15 * Lesser General Public License for more details. | |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
16 * |
3130 | 17 * You should have received a copy of the GNU Lesser General Public |
3947
c8c591fe26f8
Change license headers to say 'FFmpeg' instead of 'this program/this library'
diego
parents:
3130
diff
changeset
|
18 * License along with FFmpeg; if not, write to the Free Software |
3130 | 19 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
20 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
21 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
22 #include "regdef.h" |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
23 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
24 /* Some nicer register names. */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
25 #define ta t10 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
26 #define tb t11 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
27 #define tc t12 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
28 #define td AT |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
29 /* Danger: these overlap with the argument list and the return value */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
30 #define te a5 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
31 #define tf a4 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
32 #define tg a3 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
33 #define th v0 |
2967 | 34 |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
35 .set noat |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
36 .set noreorder |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
37 .arch pca56 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
38 .text |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
39 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
40 /***************************************************************************** |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
41 * int pix_abs16x16_mvi_asm(uint8_t *pix1, uint8_t *pix2, int line_size) |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
42 * |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
43 * This code is written with a pca56 in mind. For ev6, one should |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
44 * really take the increased latency of 3 cycles for MVI instructions |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
45 * into account. |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
46 * |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
47 * It is important to keep the loading and first use of a register as |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
48 * far apart as possible, because if a register is accessed before it |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
49 * has been fetched from memory, the CPU will stall. |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
50 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
51 .align 4 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
52 .globl pix_abs16x16_mvi_asm |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
53 .ent pix_abs16x16_mvi_asm |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
54 pix_abs16x16_mvi_asm: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
55 .frame sp, 0, ra, 0 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
56 .prologue 0 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
57 |
4512 | 58 #ifdef CONFIG_GPROF |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
59 lda AT, _mcount |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
60 jsr AT, (AT), _mcount |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
61 #endif |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
62 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
63 and a1, 7, t0 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
64 clr v0 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
65 lda a3, 16 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
66 beq t0, $aligned |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
67 .align 4 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
68 $unaligned: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
69 /* Registers: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
70 line 0: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
71 t0: left_u -> left lo -> left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
72 t1: mid |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
73 t2: right_u -> right hi -> right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
74 t3: ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
75 t4: ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
76 line 1: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
77 t5: left_u -> left lo -> left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
78 t6: mid |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
79 t7: right_u -> right hi -> right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
80 t8: ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
81 t9: ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
82 temp: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
83 ta: left hi |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
84 tb: right lo |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
85 tc: error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
86 td: error right */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
87 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
88 /* load line 0 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
89 ldq_u t0, 0(a1) # left_u |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
90 ldq_u t1, 8(a1) # mid |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
91 ldq_u t2, 16(a1) # right_u |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
92 ldq t3, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
93 ldq t4, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
94 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
95 addq a1, a2, a1 # pix2 |
2967 | 96 /* load line 1 */ |
705
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
97 ldq_u t5, 0(a1) # left_u |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
98 ldq_u t6, 8(a1) # mid |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
99 ldq_u t7, 16(a1) # right_u |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
100 ldq t8, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
101 ldq t9, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
102 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
103 addq a1, a2, a1 # pix2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
104 /* calc line 0 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
105 extql t0, a1, t0 # left lo |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
106 extqh t1, a1, ta # left hi |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
107 extql t1, a1, tb # right lo |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
108 or t0, ta, t0 # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
109 extqh t2, a1, t2 # right hi |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
110 perr t3, t0, tc # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
111 or t2, tb, t2 # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
112 perr t4, t2, td # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
113 addq v0, tc, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
114 addq v0, td, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
115 /* calc line 1 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
116 extql t5, a1, t5 # left lo |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
117 extqh t6, a1, ta # left hi |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
118 extql t6, a1, tb # right lo |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
119 or t5, ta, t5 # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
120 extqh t7, a1, t7 # right hi |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
121 perr t8, t5, tc # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
122 or t7, tb, t7 # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
123 perr t9, t7, td # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
124 addq v0, tc, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
125 addq v0, td, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
126 /* loop */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
127 subq a3, 2, a3 # h -= 2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
128 bne a3, $unaligned |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
129 ret |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
130 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
131 .align 4 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
132 $aligned: |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
133 /* load line 0 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
134 ldq t0, 0(a1) # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
135 ldq t1, 8(a1) # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
136 addq a1, a2, a1 # pix2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
137 ldq t2, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
138 ldq t3, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
139 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
140 /* load line 1 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
141 ldq t4, 0(a1) # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
142 ldq t5, 8(a1) # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
143 addq a1, a2, a1 # pix2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
144 ldq t6, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
145 ldq t7, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
146 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
147 /* load line 2 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
148 ldq t8, 0(a1) # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
149 ldq t9, 8(a1) # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
150 addq a1, a2, a1 # pix2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
151 ldq ta, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
152 ldq tb, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
153 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
154 /* load line 3 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
155 ldq tc, 0(a1) # left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
156 ldq td, 8(a1) # right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
157 addq a1, a2, a1 # pix2 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
158 ldq te, 0(a0) # ref left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
159 ldq tf, 8(a0) # ref right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
160 /* calc line 0 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
161 perr t0, t2, t0 # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
162 addq a0, a2, a0 # pix1 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
163 perr t1, t3, t1 # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
164 addq v0, t0, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
165 /* calc line 1 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
166 perr t4, t6, t0 # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
167 addq v0, t1, v0 # add error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
168 perr t5, t7, t1 # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
169 addq v0, t0, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
170 /* calc line 2 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
171 perr t8, ta, t0 # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
172 addq v0, t1, v0 # add error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
173 perr t9, tb, t1 # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
174 addq v0, t0, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
175 /* calc line 3 */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
176 perr tc, te, t0 # error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
177 addq v0, t1, v0 # add error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
178 perr td, tf, t1 # error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
179 addq v0, t0, v0 # add error left |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
180 addq v0, t1, v0 # add error right |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
181 /* loop */ |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
182 subq a3, 4, a3 # h -= 4 |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
183 bne a3, $aligned |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
184 ret |
107a56aa74f5
Add Alpha assembly for pix_abs16x16. Optimized for pca56, no large win
mellum
parents:
diff
changeset
|
185 .end pix_abs16x16_mvi_asm |