Mercurial > libavcodec.hg
annotate alpha/dsputil_alpha_asm.S @ 11371:4532987cd74b libavcodec
Bink version 'h' also has chroma planes swapped
author | kostya |
---|---|
date | Sat, 06 Mar 2010 15:09:14 +0000 |
parents | 7a463923ecd1 |
children | 58c2da0a371b |
rev | line source |
---|---|
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
1 /* |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
2 * Alpha optimized DSP utils |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
3 * Copyright (c) 2002 Falk Hueffner <falk@debian.org> |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
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. |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
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, |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
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. | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
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 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
20 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
21 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
22 /* |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
23 * These functions are scheduled for pca56. They should work |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
24 * reasonably on ev6, though. |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
25 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
26 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
27 #include "regdef.h" |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
28 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
29 /* Some nicer register names. */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
30 #define ta t10 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
31 #define tb t11 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
32 #define tc t12 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
33 #define td AT |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
34 /* Danger: these overlap with the argument list and the return value */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
35 #define te a5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
36 #define tf a4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
37 #define tg a3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
38 #define th v0 |
2967 | 39 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
40 .set noat |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
41 .set noreorder |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
42 .arch pca56 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
43 .text |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
44 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
45 /************************************************************************ |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
46 * void put_pixels_axp_asm(uint8_t *block, const uint8_t *pixels, |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
47 * int line_size, int h) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
48 */ |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
49 .align 6 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
50 .globl put_pixels_axp_asm |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
51 .ent put_pixels_axp_asm |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
52 put_pixels_axp_asm: |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
53 .frame sp, 0, ra |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
54 .prologue 0 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
55 |
8590 | 56 #if CONFIG_GPROF |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
57 lda AT, _mcount |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
58 jsr AT, (AT), _mcount |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
59 #endif |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
60 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
61 and a1, 7, t0 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
62 beq t0, $aligned |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
63 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
64 .align 4 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
65 $unaligned: |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
66 ldq_u t0, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
67 ldq_u t1, 8(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
68 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
69 nop |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
70 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
71 ldq_u t2, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
72 ldq_u t3, 8(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
73 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
74 nop |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
75 |
2979 | 76 ldq_u t4, 0(a1) |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
77 ldq_u t5, 8(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
78 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
79 nop |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
80 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
81 ldq_u t6, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
82 ldq_u t7, 8(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
83 extql t0, a1, t0 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
84 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
85 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
86 extqh t1, a1, t1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
87 addq a0, a2, t8 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
88 extql t2, a1, t2 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
89 addq t8, a2, t9 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
90 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
91 extqh t3, a1, t3 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
92 addq t9, a2, ta |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
93 extql t4, a1, t4 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
94 or t0, t1, t0 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
95 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
96 extqh t5, a1, t5 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
97 or t2, t3, t2 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
98 extql t6, a1, t6 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
99 or t4, t5, t4 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
100 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
101 extqh t7, a1, t7 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
102 or t6, t7, t6 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
103 stq t0, 0(a0) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
104 stq t2, 0(t8) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
105 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
106 stq t4, 0(t9) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
107 subq a3, 4, a3 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
108 stq t6, 0(ta) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
109 addq ta, a2, a0 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
110 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
111 bne a3, $unaligned |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
112 ret |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
113 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
114 .align 4 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
115 $aligned: |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
116 ldq t0, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
117 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
118 ldq t1, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
119 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
120 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
121 ldq t2, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
122 addq a1, a2, a1 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
123 ldq t3, 0(a1) |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
124 |
2979 | 125 addq a0, a2, t4 |
126 addq a1, a2, a1 | |
127 addq t4, a2, t5 | |
128 subq a3, 4, a3 | |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
129 |
2979 | 130 stq t0, 0(a0) |
131 addq t5, a2, t6 | |
132 stq t1, 0(t4) | |
133 addq t6, a2, a0 | |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
134 |
2979 | 135 stq t2, 0(t5) |
136 stq t3, 0(t6) | |
2967 | 137 |
2979 | 138 bne a3, $aligned |
511
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
139 ret |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
140 .end put_pixels_axp_asm |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
141 |
fa4425cf6b31
Assembly version of put_pixels. This is currently the function that
mellum
parents:
510
diff
changeset
|
142 /************************************************************************ |
2967 | 143 * void put_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
144 * int line_size) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
145 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
146 .align 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
147 .globl put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
148 .ent put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
149 put_pixels_clamped_mvi_asm: |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
150 .frame sp, 0, ra |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
151 .prologue 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
152 |
8590 | 153 #if CONFIG_GPROF |
510 | 154 lda AT, _mcount |
155 jsr AT, (AT), _mcount | |
156 #endif | |
157 | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
158 lda t8, -1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
159 lda t9, 8 # loop counter |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
160 zap t8, 0xaa, t8 # 00ff00ff00ff00ff |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
161 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
162 .align 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
163 1: ldq t0, 0(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
164 ldq t1, 8(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
165 ldq t2, 16(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
166 ldq t3, 24(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
167 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
168 maxsw4 t0, zero, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
169 subq t9, 2, t9 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
170 maxsw4 t1, zero, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
171 lda a0, 32(a0) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
172 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
173 maxsw4 t2, zero, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
174 addq a1, a2, ta |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
175 maxsw4 t3, zero, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
176 minsw4 t0, t8, t0 |
2967 | 177 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
178 minsw4 t1, t8, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
179 minsw4 t2, t8, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
180 minsw4 t3, t8, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
181 pkwb t0, t0 |
2967 | 182 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
183 pkwb t1, t1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
184 pkwb t2, t2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
185 pkwb t3, t3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
186 stl t0, 0(a1) |
2967 | 187 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
188 stl t1, 4(a1) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
189 addq ta, a2, a1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
190 stl t2, 0(ta) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
191 stl t3, 4(ta) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
192 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
193 bne t9, 1b |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
194 ret |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
195 .end put_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
196 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
197 /************************************************************************ |
2967 | 198 * void add_pixels_clamped_mvi_asm(const DCTELEM *block, uint8_t *pixels, |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
199 * int line_size) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
200 */ |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
201 .align 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
202 .globl add_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
203 .ent add_pixels_clamped_mvi_asm |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
204 add_pixels_clamped_mvi_asm: |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
205 .frame sp, 0, ra |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
206 .prologue 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
207 |
8590 | 208 #if CONFIG_GPROF |
510 | 209 lda AT, _mcount |
210 jsr AT, (AT), _mcount | |
211 #endif | |
212 | |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
213 lda t1, -1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
214 lda th, 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
215 zap t1, 0x33, tg |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
216 nop |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
217 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
218 srl tg, 1, t0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
219 xor tg, t0, tg # 0x8000800080008000 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
220 zap t1, 0xaa, tf # 0x00ff00ff00ff00ff |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
221 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
222 .align 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
223 1: ldl t1, 0(a1) # pix0 (try to hit cache line soon) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
224 ldl t4, 4(a1) # pix1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
225 addq a1, a2, te # pixels += line_size |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
226 ldq t0, 0(a0) # shorts0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
227 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
228 ldl t7, 0(te) # pix2 (try to hit cache line soon) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
229 ldl ta, 4(te) # pix3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
230 ldq t3, 8(a0) # shorts1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
231 ldq t6, 16(a0) # shorts2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
232 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
233 ldq t9, 24(a0) # shorts3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
234 unpkbw t1, t1 # 0 0 (quarter/op no.) |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
235 and t0, tg, t2 # 0 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
236 unpkbw t4, t4 # 1 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
237 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
238 bic t0, tg, t0 # 0 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
239 unpkbw t7, t7 # 2 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
240 and t3, tg, t5 # 1 1 |
2967 | 241 addq t0, t1, t0 # 0 3 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
242 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
243 xor t0, t2, t0 # 0 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
244 unpkbw ta, ta # 3 0 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
245 and t6, tg, t8 # 2 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
246 maxsw4 t0, zero, t0 # 0 5 |
2967 | 247 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
248 bic t3, tg, t3 # 1 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
249 bic t6, tg, t6 # 2 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
250 minsw4 t0, tf, t0 # 0 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
251 addq t3, t4, t3 # 1 3 |
2967 | 252 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
253 pkwb t0, t0 # 0 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
254 xor t3, t5, t3 # 1 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
255 maxsw4 t3, zero, t3 # 1 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
256 addq t6, t7, t6 # 2 3 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
257 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
258 xor t6, t8, t6 # 2 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
259 and t9, tg, tb # 3 1 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
260 minsw4 t3, tf, t3 # 1 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
261 bic t9, tg, t9 # 3 2 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
262 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
263 maxsw4 t6, zero, t6 # 2 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
264 addq t9, ta, t9 # 3 3 |
2967 | 265 stl t0, 0(a1) # 0 8 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
266 minsw4 t6, tf, t6 # 2 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
267 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
268 xor t9, tb, t9 # 3 4 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
269 maxsw4 t9, zero, t9 # 3 5 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
270 lda a0, 32(a0) # block += 16; |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
271 pkwb t3, t3 # 1 7 |
2967 | 272 |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
273 minsw4 t9, tf, t9 # 3 6 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
274 subq th, 2, th |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
275 pkwb t6, t6 # 2 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
276 pkwb t9, t9 # 3 7 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
277 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
278 stl t3, 4(a1) # 1 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
279 addq te, a2, a1 # pixels += line_size |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
280 stl t6, 0(te) # 2 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
281 stl t9, 4(te) # 3 8 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
282 |
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
283 bne th, 1b |
2967 | 284 ret |
509
cab79946302f
Implement put_pixels_clamped and add_pixels_clamped in Assembler. This
mellum
parents:
diff
changeset
|
285 .end add_pixels_clamped_mvi_asm |