Mercurial > mplayer.hg
annotate mp3lib/decode_mmx.c @ 31766:1abfb1bfd2a6
Reduce probability that a window on top of VDPAU uses the overlay colour.
author | cehoyos |
---|---|
date | Tue, 27 Jul 2010 17:29:22 +0000 |
parents | 0ad2da052b2e |
children |
rev | line source |
---|---|
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
1 /* |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
2 * this code comes under GPL |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
3 * This code was taken from http://www.mpg123.org |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
4 * See ChangeLog of mpg123-0.59s-pre.1 for detail |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
5 * Applied to mplayer by Nick Kurshev <nickols_k@mail.ru> |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
6 * |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
7 * Local ChangeLog: |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
8 * - Partial loops unrolling and removing MOVW insn from loops |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
9 */ |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
10 #include "config.h" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
11 #include "mangle.h" |
30167
347d152a5cfa
Refactor real --> float #define to a typedef in a common header.
diego
parents:
29434
diff
changeset
|
12 #include "mpg123.h" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
13 |
28830 | 14 static const unsigned long long attribute_used __attribute__((aligned(8))) null_one = 0x0000ffff0000ffffULL; |
15 static const unsigned long long attribute_used __attribute__((aligned(8))) one_null = 0xffff0000ffff0000ULL; | |
16 const unsigned int __attribute__((aligned(16))) costab_mmx[] = | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
17 { |
30990 | 18 1056974725, |
19 1057056395, | |
20 1057223771, | |
21 1057485416, | |
22 1057855544, | |
23 1058356026, | |
24 1059019886, | |
25 1059897405, | |
26 1061067246, | |
27 1062657950, | |
28 1064892987, | |
29 1066774581, | |
30 1069414683, | |
31 1073984175, | |
32 1079645762, | |
33 1092815430, | |
34 1057005197, | |
35 1057342072, | |
36 1058087743, | |
37 1059427869, | |
38 1061799040, | |
39 1065862217, | |
40 1071413542, | |
41 1084439708, | |
42 1057128951, | |
43 1058664893, | |
44 1063675095, | |
45 1076102863, | |
46 1057655764, | |
47 1067924853, | |
48 1060439283, | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
49 }; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
50 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
51 /** |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
52 This array of magic numbers were calculated by the pure function |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
53 make_decode_tables_MMX(32768), which had been implemented in (deleted since |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
54 r23383) tabinit_MMX.c. |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
55 */ |
28830 | 56 static const short __attribute__((aligned(8))) mp3lib_decwins[] = |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
57 { |
30990 | 58 0, 7, 54, 114, 510, 1288, 1644, 9372, |
59 18760, -9373, 1644, -1289, 510, -115, 54, -8, | |
60 0, 7, 54, 114, 510, 1288, 1644, 9372, | |
61 18760, -9373, 1644, -1289, 510, -115, 54, -8, | |
62 0, 7, 55, 129, 500, 1379, 1490, 9834, | |
63 18748, -8910, 1784, -1197, 516, -101, 52, -7, | |
64 0, 7, 55, 129, 500, 1379, 1490, 9834, | |
65 18748, -8910, 1784, -1197, 516, -101, 52, -7, | |
66 0, 8, 56, 145, 488, 1469, 1322, 10294, | |
67 18714, -8448, 1910, -1107, 520, -87, 51, -6, | |
68 0, 8, 56, 145, 488, 1469, 1322, 10294, | |
69 18714, -8448, 1910, -1107, 520, -87, 51, -6, | |
70 0, 9, 57, 161, 474, 1559, 1141, 10751, | |
71 18658, -7987, 2023, -1016, 522, -74, 49, -6, | |
72 0, 9, 57, 161, 474, 1559, 1141, 10751, | |
73 18658, -7987, 2023, -1016, 522, -74, 49, -6, | |
74 0, 10, 57, 177, 456, 1647, 944, 11205, | |
75 18579, -7528, 2123, -927, 522, -61, 48, -5, | |
76 0, 10, 57, 177, 456, 1647, 944, 11205, | |
77 18579, -7528, 2123, -927, 522, -61, 48, -5, | |
78 0, 11, 57, 194, 435, 1733, 734, 11654, | |
79 18477, -7073, 2210, -838, 519, -50, 46, -5, | |
80 0, 11, 57, 194, 435, 1733, 734, 11654, | |
81 18477, -7073, 2210, -838, 519, -50, 46, -5, | |
82 0, 12, 57, 212, 411, 1817, 510, 12097, | |
83 18354, -6621, 2285, -751, 515, -39, 44, -4, | |
84 0, 12, 57, 212, 411, 1817, 510, 12097, | |
85 18354, -6621, 2285, -751, 515, -39, 44, -4, | |
86 0, 13, 57, 229, 384, 1899, 271, 12534, | |
87 18209, -6174, 2348, -666, 508, -28, 43, -4, | |
88 0, 13, 57, 229, 384, 1899, 271, 12534, | |
89 18209, -6174, 2348, -666, 508, -28, 43, -4, | |
90 0, 14, 56, 247, 354, 1977, 18, 12963, | |
91 18043, -5733, 2398, -583, 501, -18, 41, -4, | |
92 0, 14, 56, 247, 354, 1977, 18, 12963, | |
93 18043, -5733, 2398, -583, 501, -18, 41, -4, | |
94 0, 15, 56, 266, 320, 2052, -249, 13383, | |
95 17855, -5298, 2438, -502, 491, -9, 39, -3, | |
96 0, 15, 56, 266, 320, 2052, -249, 13383, | |
97 17855, -5298, 2438, -502, 491, -9, 39, -3, | |
98 0, 17, 54, 284, 283, 2122, -530, 13794, | |
99 17648, -4870, 2466, -423, 480, -1, 37, -3, | |
100 0, 17, 54, 284, 283, 2122, -530, 13794, | |
101 17648, -4870, 2466, -423, 480, -1, 37, -3, | |
102 0, 18, 52, 302, 243, 2188, -825, 14194, | |
103 17420, -4450, 2484, -347, 468, 7, 35, -3, | |
104 0, 18, 52, 302, 243, 2188, -825, 14194, | |
105 17420, -4450, 2484, -347, 468, 7, 35, -3, | |
106 0, 19, 50, 320, 199, 2249, -1133, 14583, | |
107 17173, -4039, 2492, -274, 455, 14, 33, -2, | |
108 0, 19, 50, 320, 199, 2249, -1133, 14583, | |
109 17173, -4039, 2492, -274, 455, 14, 33, -2, | |
110 -1, 21, 48, 339, 152, 2304, -1454, 14959, | |
111 16908, -3637, 2490, -204, 440, 20, 32, -2, | |
112 -1, 21, 48, 339, 152, 2304, -1454, 14959, | |
113 16908, -3637, 2490, -204, 440, 20, 32, -2, | |
114 -1, 22, 45, 357, 101, 2354, -1788, 15322, | |
115 16624, -3245, 2479, -137, 425, 26, 30, -2, | |
116 -1, 22, 45, 357, 101, 2354, -1788, 15322, | |
117 16624, -3245, 2479, -137, 425, 26, 30, -2, | |
118 -1, 24, 41, 374, 47, 2396, -2135, 15671, | |
119 16323, -2864, 2460, -72, 409, 31, 28, -2, | |
120 -1, 24, 41, 374, 47, 2396, -2135, 15671, | |
121 16323, -2864, 2460, -72, 409, 31, 28, -2, | |
122 -1, 26, 37, 391, -11, 2431, -2493, 16004, | |
123 16005, -2494, 2432, -12, 392, 36, 26, -2, | |
124 -1, 26, 37, 391, -11, 2431, -2493, 16004, | |
125 16005, -2494, 2432, -12, 392, 36, 26, -2, | |
126 -2, -28, 31, -409, -72, -2460, -2864, -16323, | |
127 15671, 2135, 2396, -47, 374, -41, 24, 1, | |
128 -2, -28, 31, -409, -72, -2460, -2864, -16323, | |
129 15671, 2135, 2396, -47, 374, -41, 24, 1, | |
130 -2, -30, 26, -425, -137, -2479, -3245, -16624, | |
131 15322, 1788, 2354, -101, 357, -45, 22, 1, | |
132 -2, -30, 26, -425, -137, -2479, -3245, -16624, | |
133 15322, 1788, 2354, -101, 357, -45, 22, 1, | |
134 -2, -32, 20, -440, -204, -2490, -3637, -16908, | |
135 14959, 1454, 2304, -152, 339, -48, 21, 1, | |
136 -2, -32, 20, -440, -204, -2490, -3637, -16908, | |
137 14959, 1454, 2304, -152, 339, -48, 21, 1, | |
138 -2, -33, 14, -455, -274, -2492, -4039, -17173, | |
139 14583, 1133, 2249, -199, 320, -50, 19, 0, | |
140 -2, -33, 14, -455, -274, -2492, -4039, -17173, | |
141 14583, 1133, 2249, -199, 320, -50, 19, 0, | |
142 -3, -35, 7, -468, -347, -2484, -4450, -17420, | |
143 14194, 825, 2188, -243, 302, -52, 18, 0, | |
144 -3, -35, 7, -468, -347, -2484, -4450, -17420, | |
145 14194, 825, 2188, -243, 302, -52, 18, 0, | |
146 -3, -37, -1, -480, -423, -2466, -4870, -17648, | |
147 13794, 530, 2122, -283, 284, -54, 17, 0, | |
148 -3, -37, -1, -480, -423, -2466, -4870, -17648, | |
149 13794, 530, 2122, -283, 284, -54, 17, 0, | |
150 -3, -39, -9, -491, -502, -2438, -5298, -17855, | |
151 13383, 249, 2052, -320, 266, -56, 15, 0, | |
152 -3, -39, -9, -491, -502, -2438, -5298, -17855, | |
153 13383, 249, 2052, -320, 266, -56, 15, 0, | |
154 -4, -41, -18, -501, -583, -2398, -5733, -18043, | |
155 12963, -18, 1977, -354, 247, -56, 14, 0, | |
156 -4, -41, -18, -501, -583, -2398, -5733, -18043, | |
157 12963, -18, 1977, -354, 247, -56, 14, 0, | |
158 -4, -43, -28, -508, -666, -2348, -6174, -18209, | |
159 12534, -271, 1899, -384, 229, -57, 13, 0, | |
160 -4, -43, -28, -508, -666, -2348, -6174, -18209, | |
161 12534, -271, 1899, -384, 229, -57, 13, 0, | |
162 -4, -44, -39, -515, -751, -2285, -6621, -18354, | |
163 12097, -510, 1817, -411, 212, -57, 12, 0, | |
164 -4, -44, -39, -515, -751, -2285, -6621, -18354, | |
165 12097, -510, 1817, -411, 212, -57, 12, 0, | |
166 -5, -46, -50, -519, -838, -2210, -7073, -18477, | |
167 11654, -734, 1733, -435, 194, -57, 11, 0, | |
168 -5, -46, -50, -519, -838, -2210, -7073, -18477, | |
169 11654, -734, 1733, -435, 194, -57, 11, 0, | |
170 -5, -48, -61, -522, -927, -2123, -7528, -18579, | |
171 11205, -944, 1647, -456, 177, -57, 10, 0, | |
172 -5, -48, -61, -522, -927, -2123, -7528, -18579, | |
173 11205, -944, 1647, -456, 177, -57, 10, 0, | |
174 -6, -49, -74, -522, -1016, -2023, -7987, -18658, | |
175 10751, -1141, 1559, -474, 161, -57, 9, 0, | |
176 -6, -49, -74, -522, -1016, -2023, -7987, -18658, | |
177 10751, -1141, 1559, -474, 161, -57, 9, 0, | |
178 -6, -51, -87, -520, -1107, -1910, -8448, -18714, | |
179 10294, -1322, 1469, -488, 145, -56, 8, 0, | |
180 -6, -51, -87, -520, -1107, -1910, -8448, -18714, | |
181 10294, -1322, 1469, -488, 145, -56, 8, 0, | |
182 -7, -52, -101, -516, -1197, -1784, -8910, -18748, | |
183 9834, -1490, 1379, -500, 129, -55, 7, 0, | |
184 -7, -52, -101, -516, -1197, -1784, -8910, -18748, | |
185 9834, -1490, 1379, -500, 129, -55, 7, 0, | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
186 }; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
187 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
188 int synth_1to1_MMX(real *bandPtr, int channel, short *samples) |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
189 { |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
190 static short buffs[2][2][0x110] __attribute__((aligned(8))); |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
191 static int bo = 1; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
192 short *b0, (*buf)[0x110], *a, *b; |
28830 | 193 const short* window; |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
194 int bo1, i = 8; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
195 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
196 if (channel == 0) { |
30990 | 197 bo = (bo - 1) & 0xf; |
198 buf = buffs[1]; | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
199 } else { |
30990 | 200 samples++; |
201 buf = buffs[0]; | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
202 } |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
203 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
204 if (bo & 1) { |
30990 | 205 b0 = buf[1]; |
206 bo1 = bo + 1; | |
207 a = buf[0] + bo; | |
208 b = buf[1] + ((bo + 1) & 0xf); | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
209 } else { |
30990 | 210 b0 = buf[0]; |
211 bo1 = bo; | |
212 b = buf[0] + bo; | |
213 a = buf[1] + ((bo + 1) & 0xf); | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
214 } |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
215 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
216 dct64_MMX_func(a, b, bandPtr); |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
217 window = mp3lib_decwins + 16 - bo1; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
218 //printf("DEBUG: channel %d, bo %d, off %d\n", channel, bo, 16 - bo1); |
27757
b5a46071062a
Replace all occurrences of '__volatile__' and '__volatile' by plain 'volatile'.
diego
parents:
27754
diff
changeset
|
219 __asm__ volatile( |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
220 ASMALIGN(4) |
29434 | 221 "0:\n\t" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
222 "movq (%1),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
223 "movq 64(%1),%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
224 "pmaddwd (%2),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
225 "pmaddwd 32(%2),%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
226 "movq 8(%1),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
227 "movq 72(%1),%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
228 "pmaddwd 8(%2),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
229 "pmaddwd 40(%2),%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
230 "movq 16(%1),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
231 "movq 80(%1),%%mm6\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
232 "pmaddwd 16(%2),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
233 "pmaddwd 48(%2),%%mm6\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
234 "movq 24(%1),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
235 "movq 88(%1),%%mm7\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
236 "pmaddwd 24(%2),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
237 "pmaddwd 56(%2),%%mm7\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
238 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
239 "paddd %%mm5,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
240 "paddd %%mm2,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
241 "paddd %%mm6,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
242 "paddd %%mm3,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
243 "paddd %%mm7,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
244 "movq %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
245 "movq %%mm4,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
246 "psrlq $32,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
247 "psrlq $32,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
248 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
249 "paddd %%mm5,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
250 "psrad $13,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
251 "psrad $13,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
252 "packssdw %%mm0,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
253 "packssdw %%mm4,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
254 |
30990 | 255 "movq (%3), %%mm1\n\t" |
256 "punpckldq %%mm4, %%mm0\n\t" | |
257 "pand "MANGLE(one_null)", %%mm1\n\t" | |
258 "pand "MANGLE(null_one)", %%mm0\n\t" | |
259 "por %%mm0, %%mm1\n\t" | |
260 "movq %%mm1,(%3)\n\t" | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
261 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
262 "add $64,%2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
263 "add $128,%1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
264 "add $8,%3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
265 |
30990 | 266 "decl %0\n\t" |
29434 | 267 "jnz 0b\n\t" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
268 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
269 "movq (%1),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
270 "pmaddwd (%2),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
271 "movq 8(%1),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
272 "pmaddwd 8(%2),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
273 "movq 16(%1),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
274 "pmaddwd 16(%2),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
275 "movq 24(%1),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
276 "pmaddwd 24(%2),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
277 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
278 "paddd %%mm2,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
279 "paddd %%mm3,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
280 "movq %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
281 "psrlq $32,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
282 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
283 "psrad $13,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
284 "packssdw %%mm0,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
285 "movd %%mm0,%%eax\n\t" |
30990 | 286 "movw %%ax, (%3)\n\t" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
287 "sub $32,%2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
288 "add $64,%1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
289 "add $4,%3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
290 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
291 "movl $7,%0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
292 ASMALIGN(4) |
29434 | 293 "1:\n\t" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
294 "movq (%1),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
295 "movq 64(%1),%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
296 "pmaddwd (%2),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
297 "pmaddwd -32(%2),%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
298 "movq 8(%1),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
299 "movq 72(%1),%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
300 "pmaddwd 8(%2),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
301 "pmaddwd -24(%2),%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
302 "movq 16(%1),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
303 "movq 80(%1),%%mm6\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
304 "pmaddwd 16(%2),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
305 "pmaddwd -16(%2),%%mm6\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
306 "movq 24(%1),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
307 "movq 88(%1),%%mm7\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
308 "pmaddwd 24(%2),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
309 "pmaddwd -8(%2),%%mm7\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
310 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
311 "paddd %%mm5,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
312 "paddd %%mm2,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
313 "paddd %%mm6,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
314 "paddd %%mm3,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
315 "paddd %%mm7,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
316 "movq %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
317 "movq %%mm4,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
318 "psrlq $32,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
319 "psrlq $32,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
320 "paddd %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
321 "paddd %%mm4,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
322 "psrad $13,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
323 "psrad $13,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
324 "packssdw %%mm1,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
325 "packssdw %%mm5,%%mm5\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
326 "psubd %%mm0,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
327 "psubd %%mm4,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
328 "psubsw %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
329 "psubsw %%mm5,%%mm4\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
330 |
30990 | 331 "movq (%3), %%mm1\n\t" |
332 "punpckldq %%mm4, %%mm0\n\t" | |
333 "pand "MANGLE(one_null)", %%mm1\n\t" | |
334 "pand "MANGLE(null_one)", %%mm0\n\t" | |
335 "por %%mm0, %%mm1\n\t" | |
336 "movq %%mm1,(%3)\n\t" | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
337 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
338 "sub $64,%2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
339 "add $128,%1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
340 "add $8,%3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
341 "decl %0\n\t" |
30990 | 342 "jnz 1b\n\t" |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
343 |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
344 "movq (%1),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
345 "pmaddwd (%2),%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
346 "movq 8(%1),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
347 "pmaddwd 8(%2),%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
348 "movq 16(%1),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
349 "pmaddwd 16(%2),%%mm2\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
350 "movq 24(%1),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
351 "pmaddwd 24(%2),%%mm3\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
352 "paddd %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
353 "paddd %%mm2,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
354 "paddd %%mm3,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
355 "movq %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
356 "psrlq $32,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
357 "paddd %%mm0,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
358 "psrad $13,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
359 "packssdw %%mm1,%%mm1\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
360 "psubd %%mm0,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
361 "psubsw %%mm1,%%mm0\n\t" |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
362 "movd %%mm0,%%eax\n\t" |
30990 | 363 "movw %%ax,(%3)\n\t" |
364 "emms\n\t" | |
365 :"+r"(i), "+r"(window), "+r"(b0), "+r"(samples) | |
366 : | |
367 :"memory", "%eax"); | |
25350
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
368 return 0; |
2095f98cf0fa
cosmetics: Remove ugly and inconsistent uppercasing from filenames.
diego
parents:
diff
changeset
|
369 } |