annotate sparc/simple_idct_vis.c @ 7000:af0fe48cda98 libavcodec

cleanup, remove useless parentheses
author bcoudurier
date Wed, 04 Jun 2008 00:44:43 +0000
parents f7cbb7733146
children eebc7209c47f
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
5618
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
1 /*
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
2 * SPARC VIS optimized inverse DCT
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
3 * Copyright (c) 2007 Denes Balatoni < dbalatoni XatX interware XdotX hu >
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
4 *
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
5 * I did consult the following fine web page about dct
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
6 * http://www.geocities.com/ssavekar/dct.htm
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
7 *
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
8 * This file is part of FFmpeg.
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
9 *
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
10 * FFmpeg is free software; you can redistribute it and/or
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
11 * modify it under the terms of the GNU Lesser General Public
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
12 * License as published by the Free Software Foundation; either
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
13 * version 2.1 of the License, or (at your option) any later version.
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
14 *
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
15 * FFmpeg is distributed in the hope that it will be useful,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
18 * Lesser General Public License for more details.
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
19 *
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
20 * You should have received a copy of the GNU Lesser General Public
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
21 * License along with FFmpeg; if not, write to the Free Software
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
22 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
23 */
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
24
6763
f7cbb7733146 Use full path for #includes from another directory.
diego
parents: 5618
diff changeset
25 #include "libavcodec/dsputil.h"
5618
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
26
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
27 static const DECLARE_ALIGNED_8(int16_t, coeffs[28]) = {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
28 - 1259,- 1259,- 1259,- 1259,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
29 - 4989,- 4989,- 4989,- 4989,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
30 -11045,-11045,-11045,-11045,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
31 -19195,-19195,-19195,-19195,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
32 -29126,-29126,-29126,-29126,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
33 25080, 25080, 25080, 25080,
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
34 12785, 12785, 12785, 12785
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
35 };
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
36 static const DECLARE_ALIGNED_8(uint16_t, scale[4]) = {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
37 65536>>6, 65536>>6, 65536>>6, 65536>>6
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
38 };
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
39 static const DECLARE_ALIGNED_8(uint16_t, rounder[4]) = {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
40 1<<5, 1<<5, 1<<5, 1<<5
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
41 };
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
42 static const DECLARE_ALIGNED_8(uint16_t, expand[4]) = {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
43 1<<14, 1<<14, 1<<14, 1<<14
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
44 };
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
45
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
46 #define INIT_IDCT \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
47 "ldd [%1], %%f32 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
48 "ldd [%1+8], %%f34 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
49 "ldd [%1+16], %%f36 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
50 "ldd [%1+24], %%f38 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
51 "ldd [%1+32], %%f40 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
52 "ldd [%1+40], %%f42 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
53 "ldd [%1+48], %%f44 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
54 "ldd [%0], %%f46 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
55 "fzero %%f62 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
56
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
57 #define LOADSCALE(in) \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
58 "ldd [" in "], %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
59 "ldd [" in "+16], %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
60 "ldd [" in "+32], %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
61 "ldd [" in "+48], %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
62 "ldd [" in "+64], %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
63 "ldd [" in "+80], %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
64 "ldd [" in "+96], %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
65 "ldd [" in "+112], %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
66 "fpadd16 %%f0, %%f0, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
67 "fpadd16 %%f2, %%f2, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
68 "fpadd16 %%f4, %%f4, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
69 "fpadd16 %%f6, %%f6, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
70 "fpadd16 %%f8, %%f8, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
71 "fpadd16 %%f10, %%f10, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
72 "fpadd16 %%f12, %%f12, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
73 "fpadd16 %%f14, %%f14, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
74 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
75 "fpadd16 %%f0, %%f0, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
76 "fpadd16 %%f2, %%f2, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
77 "fpadd16 %%f4, %%f4, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
78 "fpadd16 %%f6, %%f6, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
79 "fpadd16 %%f8, %%f8, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
80 "fpadd16 %%f10, %%f10, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
81 "fpadd16 %%f12, %%f12, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
82 "fpadd16 %%f14, %%f14, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
83 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
84 "fpadd16 %%f0, %%f0, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
85 "fpadd16 %%f2, %%f2, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
86 "fpadd16 %%f4, %%f4, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
87 "fpadd16 %%f6, %%f6, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
88 "fpadd16 %%f8, %%f8, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
89 "fpadd16 %%f10, %%f10, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
90 "fpadd16 %%f12, %%f12, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
91 "fpadd16 %%f14, %%f14, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
92 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
93 "fpadd16 %%f0, %%f0, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
94 "fpadd16 %%f2, %%f2, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
95 "fpadd16 %%f4, %%f4, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
96 "fpadd16 %%f6, %%f6, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
97 "fpadd16 %%f8, %%f8, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
98 "fpadd16 %%f10, %%f10, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
99 "fpadd16 %%f12, %%f12, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
100 "fpadd16 %%f14, %%f14, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
101
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
102 #define LOAD(in) \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
103 "ldd [" in "], %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
104 "ldd [" in "+8], %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
105 "ldd [" in "+16], %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
106 "ldd [" in "+24], %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
107 "ldd [" in "+32], %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
108 "ldd [" in "+40], %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
109 "ldd [" in "+48], %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
110 "ldd [" in "+56], %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
111
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
112 #define TRANSPOSE \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
113 "fpmerge %%f16, %%f24, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
114 "fpmerge %%f20, %%f28, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
115 "fpmerge %%f17, %%f25, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
116 "fpmerge %%f21, %%f29, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
117 "fpmerge %%f18, %%f26, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
118 "fpmerge %%f22, %%f30, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
119 "fpmerge %%f19, %%f27, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
120 "fpmerge %%f23, %%f31, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
121 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
122 "fpmerge %%f0, %%f2, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
123 "fpmerge %%f1, %%f3, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
124 "fpmerge %%f4, %%f6, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
125 "fpmerge %%f5, %%f7, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
126 "fpmerge %%f8, %%f10, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
127 "fpmerge %%f9, %%f11, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
128 "fpmerge %%f12, %%f14, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
129 "fpmerge %%f13, %%f15, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
130 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
131 "fpmerge %%f16, %%f17, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
132 "fpmerge %%f18, %%f19, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
133 "fpmerge %%f20, %%f21, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
134 "fpmerge %%f22, %%f23, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
135 "fpmerge %%f24, %%f25, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
136 "fpmerge %%f26, %%f27, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
137 "fpmerge %%f28, %%f29, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
138 "fpmerge %%f30, %%f31, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
139
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
140 #define IDCT4ROWS \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
141 /* 1. column */\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
142 "fmul8ulx16 %%f0, %%f38, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
143 "for %%f4, %%f6, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
144 "fmul8ulx16 %%f2, %%f32, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
145 "fmul8ulx16 %%f2, %%f36, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
146 "fmul8ulx16 %%f2, %%f40, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
147 "fmul8ulx16 %%f2, %%f44, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
148 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
149 ADDROUNDER\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
150 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
151 "fmul8sux16 %%f0, %%f38, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
152 "fcmpd %%fcc0, %%f62, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
153 "for %%f8, %%f10, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
154 "fmul8sux16 %%f2, %%f32, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
155 "fmul8sux16 %%f2, %%f36, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
156 "fmul8sux16 %%f2, %%f40, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
157 "fmul8sux16 %%f2, %%f44, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
158 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
159 "fpadd16 %%f48, %%f28, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
160 "fcmpd %%fcc1, %%f62, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
161 "for %%f12, %%f14, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
162 "fpadd16 %%f50, %%f18, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
163 "fpadd16 %%f52, %%f22, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
164 "fpadd16 %%f54, %%f26, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
165 "fpadd16 %%f56, %%f30, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
166 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
167 "fpadd16 %%f28, %%f0, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
168 "fcmpd %%fcc2, %%f62, %%f60 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
169 "fpadd16 %%f28, %%f0, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
170 "fpadd16 %%f28, %%f0, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
171 "fpadd16 %%f28, %%f0, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
172 "fpadd16 %%f18, %%f2, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
173 "fpadd16 %%f22, %%f2, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
174 /* 2. column */\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
175 "fbe %%fcc0, 3f \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
176 "fpadd16 %%f26, %%f2, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
177 "fmul8ulx16 %%f4, %%f34, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
178 "fmul8ulx16 %%f4, %%f42, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
179 "fmul8ulx16 %%f6, %%f36, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
180 "fmul8ulx16 %%f6, %%f44, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
181 "fmul8ulx16 %%f6, %%f32, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
182 "fmul8ulx16 %%f6, %%f40, %%f58 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
183 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
184 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
185 "fpadd16 %%f20, %%f50, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
186 "fpsub16 %%f24, %%f50, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
187 "fpsub16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
188 "fpadd16 %%f18, %%f52, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
189 "fpsub16 %%f22, %%f54, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
190 "fpsub16 %%f26, %%f56, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
191 "fpsub16 %%f30, %%f58, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
192 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
193 "fmul8sux16 %%f4, %%f34, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
194 "fmul8sux16 %%f4, %%f42, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
195 "fmul8sux16 %%f6, %%f36, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
196 "fmul8sux16 %%f6, %%f44, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
197 "fmul8sux16 %%f6, %%f32, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
198 "fmul8sux16 %%f6, %%f40, %%f58 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
199 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
200 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
201 "fpadd16 %%f20, %%f50, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
202 "fpsub16 %%f24, %%f50, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
203 "fpsub16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
204 "fpadd16 %%f18, %%f52, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
205 "fpsub16 %%f22, %%f54, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
206 "fpsub16 %%f26, %%f56, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
207 "fpsub16 %%f30, %%f58, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
208 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
209 "fpadd16 %%f16, %%f4, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
210 "fpsub16 %%f28, %%f4, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
211 "fpadd16 %%f18, %%f6, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
212 "fpsub16 %%f26, %%f6, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
213 /* 3. column */\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
214 "3: \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
215 "fbe %%fcc1, 4f \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
216 "fpsub16 %%f30, %%f6, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
217 "fmul8ulx16 %%f8, %%f38, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
218 "fmul8ulx16 %%f10, %%f40, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
219 "fmul8ulx16 %%f10, %%f32, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
220 "fmul8ulx16 %%f10, %%f44, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
221 "fmul8ulx16 %%f10, %%f36, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
222 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
223 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
224 "fpsub16 %%f20, %%f48, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
225 "fpsub16 %%f24, %%f48, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
226 "fpadd16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
227 "fpadd16 %%f18, %%f50, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
228 "fpsub16 %%f22, %%f52, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
229 "fpadd16 %%f26, %%f54, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
230 "fpadd16 %%f30, %%f56, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
231 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
232 "fmul8sux16 %%f8, %%f38, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
233 "fmul8sux16 %%f10, %%f40, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
234 "fmul8sux16 %%f10, %%f32, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
235 "fmul8sux16 %%f10, %%f44, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
236 "fmul8sux16 %%f10, %%f36, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
237 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
238 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
239 "fpsub16 %%f20, %%f48, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
240 "fpsub16 %%f24, %%f48, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
241 "fpadd16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
242 "fpadd16 %%f18, %%f50, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
243 "fpsub16 %%f22, %%f52, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
244 "fpadd16 %%f26, %%f54, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
245 "fpadd16 %%f30, %%f56, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
246 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
247 "fpadd16 %%f16, %%f8, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
248 "fpsub16 %%f20, %%f8, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
249 "fpsub16 %%f24, %%f8, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
250 "fpadd16 %%f28, %%f8, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
251 "fpadd16 %%f18, %%f10, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
252 "fpsub16 %%f22, %%f10, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
253 /* 4. column */\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
254 "4: \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
255 "fbe %%fcc2, 5f \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
256 "fpadd16 %%f30, %%f10, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
257 "fmul8ulx16 %%f12, %%f42, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
258 "fmul8ulx16 %%f12, %%f34, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
259 "fmul8ulx16 %%f14, %%f44, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
260 "fmul8ulx16 %%f14, %%f40, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
261 "fmul8ulx16 %%f14, %%f36, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
262 "fmul8ulx16 %%f14, %%f32, %%f58 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
263 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
264 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
265 "fpsub16 %%f20, %%f50, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
266 "fpadd16 %%f24, %%f50, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
267 "fpsub16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
268 "fpadd16 %%f18, %%f52, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
269 "fpsub16 %%f22, %%f54, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
270 "fpadd16 %%f26, %%f56, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
271 "fpsub16 %%f30, %%f58, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
272 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
273 "fmul8sux16 %%f12, %%f42, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
274 "fmul8sux16 %%f12, %%f34, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
275 "fmul8sux16 %%f14, %%f44, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
276 "fmul8sux16 %%f14, %%f40, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
277 "fmul8sux16 %%f14, %%f36, %%f56 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
278 "fmul8sux16 %%f14, %%f32, %%f58 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
279 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
280 "fpadd16 %%f16, %%f48, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
281 "fpsub16 %%f20, %%f50, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
282 "fpadd16 %%f24, %%f50, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
283 "fpsub16 %%f28, %%f48, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
284 "fpadd16 %%f18, %%f52, %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
285 "fpsub16 %%f22, %%f54, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
286 "fpadd16 %%f26, %%f56, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
287 "fpsub16 %%f30, %%f58, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
288 \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
289 "fpsub16 %%f20, %%f12, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
290 "fpadd16 %%f24, %%f12, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
291 "fpsub16 %%f22, %%f14, %%f22 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
292 "fpadd16 %%f26, %%f14, %%f26 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
293 "fpsub16 %%f30, %%f14, %%f30 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
294 /* final butterfly */\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
295 "5: \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
296 "fpsub16 %%f16, %%f18, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
297 "fpsub16 %%f20, %%f22, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
298 "fpsub16 %%f24, %%f26, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
299 "fpsub16 %%f28, %%f30, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
300 "fpadd16 %%f16, %%f18, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
301 "fpadd16 %%f20, %%f22, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
302 "fpadd16 %%f24, %%f26, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
303 "fpadd16 %%f28, %%f30, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
304
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
305 #define STOREROWS(out) \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
306 "std %%f48, [" out "+112] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
307 "std %%f50, [" out "+96] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
308 "std %%f52, [" out "+80] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
309 "std %%f54, [" out "+64] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
310 "std %%f16, [" out "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
311 "std %%f20, [" out "+16] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
312 "std %%f24, [" out "+32] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
313 "std %%f28, [" out "+48] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
314
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
315 #define SCALEROWS \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
316 "fmul8sux16 %%f46, %%f48, %%f48 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
317 "fmul8sux16 %%f46, %%f50, %%f50 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
318 "fmul8sux16 %%f46, %%f52, %%f52 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
319 "fmul8sux16 %%f46, %%f54, %%f54 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
320 "fmul8sux16 %%f46, %%f16, %%f16 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
321 "fmul8sux16 %%f46, %%f20, %%f20 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
322 "fmul8sux16 %%f46, %%f24, %%f24 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
323 "fmul8sux16 %%f46, %%f28, %%f28 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
324
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
325 #define PUTPIXELSCLAMPED(dest) \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
326 "fpack16 %%f48, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
327 "fpack16 %%f50, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
328 "fpack16 %%f16, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
329 "fpack16 %%f20, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
330 "fpack16 %%f24, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
331 "fpack16 %%f28, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
332 "fpack16 %%f54, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
333 "fpack16 %%f52, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
334 "st %%f0, [%3+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
335 "st %%f2, [%5+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
336 "st %%f4, [%6+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
337 "st %%f6, [%7+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
338 "st %%f8, [%8+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
339 "st %%f10, [%9+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
340 "st %%f12, [%10+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
341 "st %%f14, [%11+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
342
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
343 #define ADDPIXELSCLAMPED(dest) \
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
344 "ldd [%5], %%f18 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
345 "ld [%3+" dest"], %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
346 "ld [%6+" dest"], %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
347 "ld [%7+" dest"], %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
348 "ld [%8+" dest"], %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
349 "ld [%9+" dest"], %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
350 "ld [%10+" dest"], %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
351 "ld [%11+" dest"], %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
352 "ld [%12+" dest"], %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
353 "fmul8x16 %%f0, %%f18, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
354 "fmul8x16 %%f2, %%f18, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
355 "fmul8x16 %%f4, %%f18, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
356 "fmul8x16 %%f6, %%f18, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
357 "fmul8x16 %%f8, %%f18, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
358 "fmul8x16 %%f10, %%f18, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
359 "fmul8x16 %%f12, %%f18, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
360 "fmul8x16 %%f14, %%f18, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
361 "fpadd16 %%f0, %%f16, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
362 "fpadd16 %%f2, %%f20, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
363 "fpadd16 %%f4, %%f24, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
364 "fpadd16 %%f6, %%f28, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
365 "fpadd16 %%f8, %%f54, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
366 "fpadd16 %%f10, %%f52, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
367 "fpadd16 %%f12, %%f50, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
368 "fpadd16 %%f14, %%f48, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
369 "fpack16 %%f0, %%f0 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
370 "fpack16 %%f2, %%f2 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
371 "fpack16 %%f4, %%f4 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
372 "fpack16 %%f6, %%f6 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
373 "fpack16 %%f8, %%f8 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
374 "fpack16 %%f10, %%f10 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
375 "fpack16 %%f12, %%f12 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
376 "fpack16 %%f14, %%f14 \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
377 "st %%f0, [%3+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
378 "st %%f2, [%6+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
379 "st %%f4, [%7+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
380 "st %%f6, [%8+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
381 "st %%f8, [%9+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
382 "st %%f10, [%10+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
383 "st %%f12, [%11+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
384 "st %%f14, [%12+" dest "] \n\t"\
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
385
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
386
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
387 inline void ff_simple_idct_vis(DCTELEM *data) {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
388 int out1, out2, out3, out4;
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
389 DECLARE_ALIGNED_8(int16_t, temp[8*8]);
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
390
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
391 asm volatile(
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
392 INIT_IDCT
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
393
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
394 #define ADDROUNDER
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
395
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
396 // shift right 16-4=12
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
397 LOADSCALE("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
398 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
399 STOREROWS("%3+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
400 LOADSCALE("%2+0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
401 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
402 "std %%f48, [%3+112] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
403 "std %%f50, [%3+96] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
404 "std %%f52, [%3+80] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
405 "std %%f54, [%3+64] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
406
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
407 // shift right 16+4
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
408 "ldd [%3+8], %%f18 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
409 "ldd [%3+24], %%f22 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
410 "ldd [%3+40], %%f26 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
411 "ldd [%3+56], %%f30 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
412 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
413 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
414 SCALEROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
415 STOREROWS("%2+0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
416 LOAD("%3+64")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
417 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
418 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
419 SCALEROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
420 STOREROWS("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
421
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
422 : "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
423 : "0" (scale), "1" (coeffs), "2" (data), "3" (temp)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
424 );
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
425 }
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
426
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
427 void ff_simple_idct_put_vis(uint8_t *dest, int line_size, DCTELEM *data) {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
428 int out1, out2, out3, out4, out5;
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
429 int r1, r2, r3, r4, r5, r6, r7;
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
430
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
431 asm volatile(
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
432 "wr %%g0, 0x8, %%gsr \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
433
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
434 INIT_IDCT
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
435
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
436 "add %3, %4, %5 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
437 "add %5, %4, %6 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
438 "add %6, %4, %7 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
439 "add %7, %4, %8 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
440 "add %8, %4, %9 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
441 "add %9, %4, %10 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
442 "add %10, %4, %11 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
443
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
444 // shift right 16-4=12
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
445 LOADSCALE("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
446 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
447 STOREROWS("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
448 LOADSCALE("%2+0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
449 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
450 "std %%f48, [%2+112] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
451 "std %%f50, [%2+96] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
452 "std %%f52, [%2+80] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
453 "std %%f54, [%2+64] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
454
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
455 #undef ADDROUNDER
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
456 #define ADDROUNDER "fpadd16 %%f28, %%f46, %%f28 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
457
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
458 // shift right 16+4
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
459 "ldd [%2+8], %%f18 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
460 "ldd [%2+24], %%f22 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
461 "ldd [%2+40], %%f26 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
462 "ldd [%2+56], %%f30 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
463 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
464 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
465 PUTPIXELSCLAMPED("0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
466 LOAD("%2+64")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
467 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
468 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
469 PUTPIXELSCLAMPED("4")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
470
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
471 : "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5),
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
472 "=r" (r1), "=r" (r2), "=r" (r3), "=r" (r4), "=r" (r5), "=r" (r6), "=r" (r7)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
473 : "0" (rounder), "1" (coeffs), "2" (data), "3" (dest), "4" (line_size)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
474 );
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
475 }
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
476
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
477 void ff_simple_idct_add_vis(uint8_t *dest, int line_size, DCTELEM *data) {
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
478 int out1, out2, out3, out4, out5, out6;
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
479 int r1, r2, r3, r4, r5, r6, r7;
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
480
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
481 asm volatile(
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
482 "wr %%g0, 0x8, %%gsr \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
483
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
484 INIT_IDCT
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
485
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
486 "add %3, %4, %6 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
487 "add %6, %4, %7 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
488 "add %7, %4, %8 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
489 "add %8, %4, %9 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
490 "add %9, %4, %10 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
491 "add %10, %4, %11 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
492 "add %11, %4, %12 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
493
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
494 #undef ADDROUNDER
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
495 #define ADDROUNDER
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
496
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
497 // shift right 16-4=12
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
498 LOADSCALE("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
499 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
500 STOREROWS("%2+8")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
501 LOADSCALE("%2+0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
502 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
503 "std %%f48, [%2+112] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
504 "std %%f50, [%2+96] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
505 "std %%f52, [%2+80] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
506 "std %%f54, [%2+64] \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
507
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
508 #undef ADDROUNDER
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
509 #define ADDROUNDER "fpadd16 %%f28, %%f46, %%f28 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
510
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
511 // shift right 16+4
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
512 "ldd [%2+8], %%f18 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
513 "ldd [%2+24], %%f22 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
514 "ldd [%2+40], %%f26 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
515 "ldd [%2+56], %%f30 \n\t"
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
516 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
517 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
518 ADDPIXELSCLAMPED("0")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
519 LOAD("%2+64")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
520 TRANSPOSE
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
521 IDCT4ROWS
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
522 ADDPIXELSCLAMPED("4")
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
523
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
524 : "=r" (out1), "=r" (out2), "=r" (out3), "=r" (out4), "=r" (out5), "=r" (out6),
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
525 "=r" (r1), "=r" (r2), "=r" (r3), "=r" (r4), "=r" (r5), "=r" (r6), "=r" (r7)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
526 : "0" (rounder), "1" (coeffs), "2" (data), "3" (dest), "4" (line_size), "5" (expand)
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
527 );
ad0ab0eebd69 add simple_idct implemented in Sparc VIS
gpoirier
parents:
diff changeset
528 }