Parent Directory | Revision Log
Revision 460 -
(view)
(download)
Original Path: trunk/xvidcore/src/dct/x86_asm/fdct_mmx.asm
1 : | chl | 432 | ;/***************************************************************************** |
2 : | ; * | ||
3 : | ; * XVID MPEG-4 VIDEO CODEC | ||
4 : | chl | 460 | ; * mmx version - fast discrete cosine transformation |
5 : | chl | 432 | ; * |
6 : | chl | 460 | ; * Initial version provided by Intel at AppNote AP-922 |
7 : | chl | 432 | ; * Copyright (C) 1999 Intel Corporation, |
8 : | chl | 460 | ; * |
9 : | ; * completed and corrected | ||
10 : | chl | 432 | ; * Copyright (C) 2000 - Royce Shih-Wea Liao <liaor@iname.com>, |
11 : | chl | 460 | ; * |
12 : | chl | 432 | ; * ported to NASM and some minor changes |
13 : | ; * Copyright (C) 2001 - Michael Militzer <isibaar@xvid.org> | ||
14 : | chl | 460 | ; * |
15 : | chl | 432 | ; * This program is an implementation of a part of one or more MPEG-4 |
16 : | ; * Video tools as specified in ISO/IEC 14496-2 standard. Those intending | ||
17 : | ; * to use this software module in hardware or software products are | ||
18 : | ; * advised that its use may infringe existing patents or copyrights, and | ||
19 : | ; * any such use would be at such party's own risk. The original | ||
20 : | ; * developer of this software module and his/her company, and subsequent | ||
21 : | ; * editors and their companies, will have no liability for use of this | ||
22 : | ; * software or modifications or derivatives thereof. | ||
23 : | ; * | ||
24 : | ; * This program is free software; you can redistribute it and/or modify | ||
25 : | ; * it under the terms of the GNU General Public License as published by | ||
26 : | ; * the Free Software Foundation; either version 2 of the License, or | ||
27 : | ; * (at your option) any later version. | ||
28 : | ; * | ||
29 : | ; * This program is distributed in the hope that it will be useful, | ||
30 : | ; * but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
31 : | ; * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
32 : | ; * GNU General Public License for more details. | ||
33 : | ; * | ||
34 : | ; * You should have received a copy of the GNU General Public License | ||
35 : | ; * along with this program; if not, write to the Free Software | ||
36 : | ; * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA | ||
37 : | ; * | ||
38 : | chl | 460 | ; *************************************************************************/ |
39 : | Isibaar | 154 | |
40 : | BITS 32 | ||
41 : | |||
42 : | %macro cglobal 1 | ||
43 : | %ifdef PREFIX | ||
44 : | global _%1 | ||
45 : | %define %1 _%1 | ||
46 : | %else | ||
47 : | global %1 | ||
48 : | %endif | ||
49 : | %endmacro | ||
50 : | |||
51 : | %define INP eax | ||
52 : | %define TABLE ebx | ||
53 : | %define TABLEF ebx | ||
54 : | %define OUT ecx | ||
55 : | %define round_frw_row edx | ||
56 : | |||
57 : | %define INP_1 eax + 16 | ||
58 : | %define INP_2 eax + 32 | ||
59 : | %define INP_3 eax + 48 | ||
60 : | %define INP_4 eax + 64 | ||
61 : | %define INP_5 eax + 80 | ||
62 : | %define INP_6 eax + 96 | ||
63 : | %define INP_7 eax + 112 | ||
64 : | |||
65 : | %define OUT_1 ecx + 16 | ||
66 : | %define OUT_2 ecx + 32 | ||
67 : | %define OUT_3 ecx + 48 | ||
68 : | %define OUT_4 ecx + 64 | ||
69 : | %define OUT_5 ecx + 80 | ||
70 : | %define OUT_6 ecx + 96 | ||
71 : | %define OUT_7 ecx + 112 | ||
72 : | %define OUT_8 ecx + 128 | ||
73 : | |||
74 : | %define TABLE_1 ebx + 64 | ||
75 : | %define TABLE_2 ebx + 128 | ||
76 : | %define TABLE_3 ebx + 192 | ||
77 : | %define TABLE_4 ebx + 256 | ||
78 : | %define TABLE_5 ebx + 320 | ||
79 : | %define TABLE_6 ebx + 384 | ||
80 : | %define TABLE_7 ebx + 448 | ||
81 : | |||
82 : | %define x0 INP + 0*16 | ||
83 : | %define x1 INP + 1*16 | ||
84 : | %define x2 INP + 2*16 | ||
85 : | %define x3 INP + 3*16 | ||
86 : | %define x4 INP + 4*16 | ||
87 : | %define x5 INP + 5*16 | ||
88 : | %define x6 INP + 6*16 | ||
89 : | %define x7 INP + 7*16 | ||
90 : | %define y0 OUT + 0*16 | ||
91 : | %define y1 OUT + 1*16 | ||
92 : | %define y2 OUT + 2*16 | ||
93 : | %define y3 OUT + 3*16 | ||
94 : | %define y4 OUT + 4*16 | ||
95 : | %define y5 OUT + 5*16 | ||
96 : | %define y6 OUT + 6*16 | ||
97 : | %define y7 OUT + 7*16 | ||
98 : | |||
99 : | %define tg_1_16 (TABLEF + 0) | ||
100 : | %define tg_2_16 (TABLEF + 8) | ||
101 : | %define tg_3_16 (TABLEF + 16) | ||
102 : | %define cos_4_16 (TABLEF + 24) | ||
103 : | %define ocos_4_16 (TABLEF + 32) | ||
104 : | |||
105 : | ;---added for sse2 | ||
106 : | %define tg_1_16_2 (TABLEF + 0) | ||
107 : | %define tg_2_16_2 (TABLEF + 16) | ||
108 : | %define tg_3_16_2 (TABLEF + 32) | ||
109 : | %define cos_4_16_2 (TABLEF + 48) | ||
110 : | %define ocos_4_16_2 (TABLEF + 64) | ||
111 : | ;--- | ||
112 : | |||
113 : | %ifdef FORMAT_COFF | ||
114 : | SECTION .data data | ||
115 : | %else | ||
116 : | SECTION .data data align=64 | ||
117 : | %endif | ||
118 : | |||
119 : | |||
120 : | ALIGN 16 | ||
121 : | |||
122 : | suxen_drol | 207 | BITS_FRW_ACC equ 3 ; 2 or 3 for accuracy |
123 : | SHIFT_FRW_COL equ BITS_FRW_ACC | ||
124 : | SHIFT_FRW_ROW equ (BITS_FRW_ACC + 17) | ||
125 : | Isibaar | 154 | RND_FRW_ROW equ (1 << (SHIFT_FRW_ROW-1)) |
126 : | suxen_drol | 207 | |
127 : | SHIFT_FRW_ROW_CLIP2 equ (4) | ||
128 : | Isibaar | 154 | SHIFT_FRW_ROW_CLIP1 equ (SHIFT_FRW_ROW - SHIFT_FRW_ROW_CLIP2) |
129 : | |||
130 : | PASS1_BITS equ (2) | ||
131 : | CONST_BITS equ (13) | ||
132 : | |||
133 : | one_corr dw 1, 1, 1, 1 | ||
134 : | |||
135 : | ;---added for sse2 | ||
136 : | align 16 | ||
137 : | one_corr_2 dw 1, 1, 1, 1, | ||
138 : | dw 1, 1, 1, 1 | ||
139 : | ;--- | ||
140 : | |||
141 : | r_frw_row dd RND_FRW_ROW, RND_FRW_ROW | ||
142 : | |||
143 : | |||
144 : | tg_all_16 dw 13036, 13036, 13036, 13036, ; tg * (2<<16) + 0.5 | ||
145 : | dw 27146, 27146, 27146, 27146, ; tg * (2<<16) + 0.5 | ||
146 : | dw -21746, -21746, -21746, -21746, ; tg * (2<<16) + 0.5 | ||
147 : | dw -19195, -19195, -19195, -19195, ; cos * (2<<16) + 0.5 | ||
148 : | dw 23170, 23170, 23170, 23170 ; cos * (2<<15) + 0.5 | ||
149 : | |||
150 : | ;---added for sse2 | ||
151 : | align 16 | ||
152 : | tg_all_16_2 dw 13036, 13036, 13036, 13036, ; tg * (2<<16) + 0.5 | ||
153 : | dw 13036, 13036, 13036, 13036, | ||
154 : | dw 27146, 27146, 27146, 27146, ; tg * (2<<16) + 0.5 | ||
155 : | dw 27146, 27146, 27146, 27146, | ||
156 : | dw -21746, -21746, -21746, -21746, ; tg * (2<<16) + 0.5 | ||
157 : | dw -21746, -21746, -21746, -21746, | ||
158 : | dw -19195, -19195, -19195, -19195, ; cos * (2<<16) + 0.5 | ||
159 : | dw -19195, -19195, -19195, -19195, | ||
160 : | dw 23170, 23170, 23170, 23170 ; cos * (2<<15) + 0.5 | ||
161 : | dw 23170, 23170, 23170, 23170 | ||
162 : | ;--- | ||
163 : | |||
164 : | tab_frw_01234567 | ||
165 : | ; row0 | ||
166 : | dw 16384, 16384, 21407, -8867, ; w09 w01 w08 w00 | ||
167 : | dw 16384, 16384, 8867, -21407, ; w13 w05 w12 w04 | ||
168 : | dw 16384, -16384, 8867, 21407, ; w11 w03 w10 w02 | ||
169 : | dw -16384, 16384, -21407, -8867, ; w15 w07 w14 w06 | ||
170 : | dw 22725, 12873, 19266, -22725, ; w22 w20 w18 w16 | ||
171 : | dw 19266, 4520, -4520, -12873, ; w23 w21 w19 w17 | ||
172 : | dw 12873, 4520, 4520, 19266, ; w30 w28 w26 w24 | ||
173 : | dw -22725, 19266, -12873, -22725, ; w31 w29 w27 w25 | ||
174 : | |||
175 : | ; row1 | ||
176 : | dw 22725, 22725, 29692, -12299, ; w09 w01 w08 w00 | ||
177 : | dw 22725, 22725, 12299, -29692, ; w13 w05 w12 w04 | ||
178 : | dw 22725, -22725, 12299, 29692, ; w11 w03 w10 w02 | ||
179 : | dw -22725, 22725, -29692, -12299, ; w15 w07 w14 w06 | ||
180 : | dw 31521, 17855, 26722, -31521, ; w22 w20 w18 w16 | ||
181 : | dw 26722, 6270, -6270, -17855, ; w23 w21 w19 w17 | ||
182 : | dw 17855, 6270, 6270, 26722, ; w30 w28 w26 w24 | ||
183 : | dw -31521, 26722, -17855, -31521, ; w31 w29 w27 w25 | ||
184 : | |||
185 : | ; row2 | ||
186 : | dw 21407, 21407, 27969, -11585, ; w09 w01 w08 w00 | ||
187 : | dw 21407, 21407, 11585, -27969, ; w13 w05 w12 w04 | ||
188 : | dw 21407, -21407, 11585, 27969, ; w11 w03 w10 w02 | ||
189 : | dw -21407, 21407, -27969, -11585, ; w15 w07 w14 w06 | ||
190 : | dw 29692, 16819, 25172, -29692, ; w22 w20 w18 w16 | ||
191 : | dw 25172, 5906, -5906, -16819, ; w23 w21 w19 w17 | ||
192 : | dw 16819, 5906, 5906, 25172, ; w30 w28 w26 w24 | ||
193 : | dw -29692, 25172, -16819, -29692, ; w31 w29 w27 w25 | ||
194 : | |||
195 : | ; row3 | ||
196 : | dw 19266, 19266, 25172, -10426, ; w09 w01 w08 w00 | ||
197 : | dw 19266, 19266, 10426, -25172, ; w13 w05 w12 w04 | ||
198 : | dw 19266, -19266, 10426, 25172, ; w11 w03 w10 w02 | ||
199 : | dw -19266, 19266, -25172, -10426, ; w15 w07 w14 w06 | ||
200 : | dw 26722, 15137, 22654, -26722, ; w22 w20 w18 w16 | ||
201 : | dw 22654, 5315, -5315, -15137, ; w23 w21 w19 w17 | ||
202 : | dw 15137, 5315, 5315, 22654, ; w30 w28 w26 w24 | ||
203 : | dw -26722, 22654, -15137, -26722, ; w31 w29 w27 w25 | ||
204 : | |||
205 : | ; row4 | ||
206 : | dw 16384, 16384, 21407, -8867, ; w09 w01 w08 w00 | ||
207 : | dw 16384, 16384, 8867, -21407, ; w13 w05 w12 w04 | ||
208 : | dw 16384, -16384, 8867, 21407, ; w11 w03 w10 w02 | ||
209 : | dw -16384, 16384, -21407, -8867, ; w15 w07 w14 w06 | ||
210 : | dw 22725, 12873, 19266, -22725, ; w22 w20 w18 w16 | ||
211 : | dw 19266, 4520, -4520, -12873, ; w23 w21 w19 w17 | ||
212 : | dw 12873, 4520, 4520, 19266, ; w30 w28 w26 w24 | ||
213 : | dw -22725, 19266, -12873, -22725, ; w31 w29 w27 w25 | ||
214 : | |||
215 : | ; row5 | ||
216 : | dw 19266, 19266, 25172, -10426, ; w09 w01 w08 w00 | ||
217 : | dw 19266, 19266, 10426, -25172, ; w13 w05 w12 w04 | ||
218 : | dw 19266, -19266, 10426, 25172, ; w11 w03 w10 w02 | ||
219 : | dw -19266, 19266, -25172, -10426, ; w15 w07 w14 w06 | ||
220 : | dw 26722, 15137, 22654, -26722, ; w22 w20 w18 w16 | ||
221 : | dw 22654, 5315, -5315, -15137, ; w23 w21 w19 w17 | ||
222 : | dw 15137, 5315, 5315, 22654, ; w30 w28 w26 w24 | ||
223 : | dw -26722, 22654, -15137, -26722, ; w31 w29 w27 w25 | ||
224 : | |||
225 : | ; row6 | ||
226 : | dw 21407, 21407, 27969, -11585, ; w09 w01 w08 w00 | ||
227 : | dw 21407, 21407, 11585, -27969, ; w13 w05 w12 w04 | ||
228 : | dw 21407, -21407, 11585, 27969, ; w11 w03 w10 w02 | ||
229 : | dw -21407, 21407, -27969, -11585, ; w15 w07 w14 w06 | ||
230 : | dw 29692, 16819, 25172, -29692, ; w22 w20 w18 w16 | ||
231 : | dw 25172, 5906, -5906, -16819, ; w23 w21 w19 w17 | ||
232 : | dw 16819, 5906, 5906, 25172, ; w30 w28 w26 w24 | ||
233 : | dw -29692, 25172, -16819, -29692, ; w31 w29 w27 w25 | ||
234 : | |||
235 : | ; row7 | ||
236 : | dw 22725, 22725, 29692, -12299, ; w09 w01 w08 w00 | ||
237 : | dw 22725, 22725, 12299, -29692, ; w13 w05 w12 w04 | ||
238 : | dw 22725, -22725, 12299, 29692, ; w11 w03 w10 w02 | ||
239 : | dw -22725, 22725, -29692, -12299, ; w15 w07 w14 w06 | ||
240 : | dw 31521, 17855, 26722, -31521, ; w22 w20 w18 w16 | ||
241 : | dw 26722, 6270, -6270, -17855, ; w23 w21 w19 w17 | ||
242 : | dw 17855, 6270, 6270, 26722, ; w30 w28 w26 w24 | ||
243 : | dw -31521, 26722, -17855, -31521 ; w31 w29 w27 w25 | ||
244 : | |||
245 : | align 128 | ||
246 : | |||
247 : | FIX_1 dw 10703, 4433, 10703, 4433 | ||
248 : | dw 10703, 4433, 10703, 4433 | ||
249 : | |||
250 : | FIX_2 dw 4433, -10704, 4433, -10704 | ||
251 : | dw 4433, -10704, 4433, -10704 | ||
252 : | |||
253 : | rounder_5 dw 2+16,2+16,2+16,2+16,2+16,2+16,2+16,2+16 | ||
254 : | rounder_11 dd 1024,1024,1024,1024 | ||
255 : | rounder_18 dd 16384+131072,16384+131072,16384+131072,16384+131072 | ||
256 : | |||
257 : | align 128 | ||
258 : | |||
259 : | FIX_3 dw 6437, 2260, 6437, 2260 | ||
260 : | dw 6437, 2260, 6437, 2260 | ||
261 : | dw 11363, 9633, 11363, 9633 | ||
262 : | dw 11363, 9633, 11363, 9633 | ||
263 : | |||
264 : | FIX_4 dw -11362, -6436, -11362, -6436 | ||
265 : | dw -11362, -6436, -11362, -6436 | ||
266 : | dw 9633, -2259, 9633, -2259 | ||
267 : | dw 9633, -2259, 9633, -2259 | ||
268 : | |||
269 : | FIX_5 dw 2261, 9633, 2261, 9633 | ||
270 : | dw 2261, 9633, 2261, 9633 | ||
271 : | dw 6437, -11362, 6437, -11362 | ||
272 : | dw 6437, -11362, 6437, -11362 | ||
273 : | |||
274 : | FIX_6 dw 9633, -11363, 9633, -11363 | ||
275 : | dw 9633, -11363, 9633, -11363 | ||
276 : | dw 2260, -6436, 2260, -6436 | ||
277 : | dw 2260, -6436, 2260, -6436 | ||
278 : | |||
279 : | align 128 | ||
280 : | buffer dw 0,0,0,0,0,0,0,0 | ||
281 : | dw 0,0,0,0,0,0,0,0 | ||
282 : | dw 0,0,0,0,0,0,0,0 | ||
283 : | dw 0,0,0,0,0,0,0,0 | ||
284 : | dw 0,0,0,0,0,0,0,0 | ||
285 : | dw 0,0,0,0,0,0,0,0 | ||
286 : | dw 0,0,0,0,0,0,0,0 | ||
287 : | dw 0,0,0,0,0,0,0,0 | ||
288 : | |||
289 : | SECTION .text | ||
290 : | |||
291 : | ALIGN 16 | ||
292 : | |||
293 : | |||
294 : | cglobal fdct_mmx | ||
295 : | ;;void fdct_mmx(short *block); | ||
296 : | fdct_mmx: | ||
297 : | |||
298 : | push ebx | ||
299 : | |||
300 : | mov INP, dword [esp + 8] ; block | ||
301 : | |||
302 : | mov TABLEF, tg_all_16 | ||
303 : | mov OUT, INP | ||
304 : | |||
305 : | movq mm0, [x1] ; 0 ; x1 | ||
306 : | |||
307 : | movq mm1, [x6] ; 1 ; x6 | ||
308 : | movq mm2, mm0 ; 2 ; x1 | ||
309 : | |||
310 : | movq mm3, [x2] ; 3 ; x2 | ||
311 : | paddsw mm0, mm1 ; t1 = x[1] + x[6] | ||
312 : | |||
313 : | movq mm4, [x5] ; 4 ; x5 | ||
314 : | psllw mm0, SHIFT_FRW_COL ; t1 | ||
315 : | |||
316 : | movq mm5, [x0] ; 5 ; x0 | ||
317 : | paddsw mm4, mm3 ; t2 = x[2] + x[5] | ||
318 : | |||
319 : | paddsw mm5, [x7] ; t0 = x[0] + x[7] | ||
320 : | psllw mm4, SHIFT_FRW_COL ; t2 | ||
321 : | |||
322 : | movq mm6, mm0 ; 6 ; t1 | ||
323 : | psubsw mm2, mm1 ; 1 ; t6 = x[1] - x[6] | ||
324 : | |||
325 : | movq mm1, [tg_2_16] ; 1 ; tg_2_16 | ||
326 : | psubsw mm0, mm4 ; tm12 = t1 - t2 | ||
327 : | |||
328 : | movq mm7, [x3] ; 7 ; x3 | ||
329 : | pmulhw mm1, mm0 ; tm12*tg_2_16 | ||
330 : | |||
331 : | paddsw mm7, [x4] ; t3 = x[3] + x[4] | ||
332 : | psllw mm5, SHIFT_FRW_COL ; t0 | ||
333 : | |||
334 : | paddsw mm6, mm4 ; 4 ; tp12 = t1 + t2 | ||
335 : | psllw mm7, SHIFT_FRW_COL ; t3 | ||
336 : | |||
337 : | movq mm4, mm5 ; 4 ; t0 | ||
338 : | psubsw mm5, mm7 ; tm03 = t0 - t3 | ||
339 : | |||
340 : | paddsw mm1, mm5 ; y2 = tm03 + tm12*tg_2_16 | ||
341 : | paddsw mm4, mm7 ; 7 ; tp03 = t0 + t3 | ||
342 : | |||
343 : | por mm1, qword [one_corr] ; correction y2 +0.5 | ||
344 : | psllw mm2, SHIFT_FRW_COL+1 ; t6 | ||
345 : | |||
346 : | pmulhw mm5, [tg_2_16] ; tm03*tg_2_16 | ||
347 : | movq mm7, mm4 ; 7 ; tp03 | ||
348 : | |||
349 : | psubsw mm3, [x5] ; t5 = x[2] - x[5] | ||
350 : | psubsw mm4, mm6 ; y4 = tp03 - tp12 | ||
351 : | |||
352 : | movq [y2], mm1 ; 1 ; save y2 | ||
353 : | paddsw mm7, mm6 ; 6 ; y0 = tp03 + tp12 | ||
354 : | |||
355 : | movq mm1, [x3] ; 1 ; x3 | ||
356 : | psllw mm3, SHIFT_FRW_COL+1 ; t5 | ||
357 : | |||
358 : | psubsw mm1, [x4] ; t4 = x[3] - x[4] | ||
359 : | movq mm6, mm2 ; 6 ; t6 | ||
360 : | |||
361 : | movq [y4], mm4 ; 4 ; save y4 | ||
362 : | paddsw mm2, mm3 ; t6 + t5 | ||
363 : | |||
364 : | pmulhw mm2, [ocos_4_16] ; tp65 = (t6 + t5)*cos_4_16 | ||
365 : | psubsw mm6, mm3 ; 3 ; t6 - t5 | ||
366 : | |||
367 : | pmulhw mm6, [ocos_4_16] ; tm65 = (t6 - t5)*cos_4_16 | ||
368 : | psubsw mm5, mm0 ; 0 ; y6 = tm03*tg_2_16 - tm12 | ||
369 : | |||
370 : | por mm5, qword [one_corr] ; correction y6 +0.5 | ||
371 : | psllw mm1, SHIFT_FRW_COL ; t4 | ||
372 : | |||
373 : | por mm2, qword [one_corr] ; correction tp65 +0.5 | ||
374 : | movq mm4, mm1 ; 4 ; t4 | ||
375 : | |||
376 : | movq mm3, [x0] ; 3 ; x0 | ||
377 : | paddsw mm1, mm6 ; tp465 = t4 + tm65 | ||
378 : | |||
379 : | psubsw mm3, [x7] ; t7 = x[0] - x[7] | ||
380 : | psubsw mm4, mm6 ; 6 ; tm465 = t4 - tm65 | ||
381 : | |||
382 : | movq mm0, [tg_1_16] ; 0 ; tg_1_16 | ||
383 : | psllw mm3, SHIFT_FRW_COL ; t7 | ||
384 : | |||
385 : | movq mm6, [tg_3_16] ; 6 ; tg_3_16 | ||
386 : | pmulhw mm0, mm1 ; tp465*tg_1_16 | ||
387 : | |||
388 : | movq [y0], mm7 ; 7 ; save y0 | ||
389 : | pmulhw mm6, mm4 ; tm465*tg_3_16 | ||
390 : | |||
391 : | movq [y6], mm5 ; 5 ; save y6 | ||
392 : | movq mm7, mm3 ; 7 ; t7 | ||
393 : | |||
394 : | movq mm5, [tg_3_16] ; 5 ; tg_3_16 | ||
395 : | psubsw mm7, mm2 ; tm765 = t7 - tp65 | ||
396 : | |||
397 : | paddsw mm3, mm2 ; 2 ; tp765 = t7 + tp65 | ||
398 : | pmulhw mm5, mm7 ; tm765*tg_3_16 | ||
399 : | |||
400 : | paddsw mm0, mm3 ; y1 = tp765 + tp465*tg_1_16 | ||
401 : | paddsw mm6, mm4 ; tm465*tg_3_16 | ||
402 : | |||
403 : | pmulhw mm3, [tg_1_16] ; tp765*tg_1_16 | ||
404 : | |||
405 : | por mm0, qword [one_corr] ; correction y1 +0.5 | ||
406 : | paddsw mm5, mm7 ; tm765*tg_3_16 | ||
407 : | |||
408 : | psubsw mm7, mm6 ; 6 ; y3 = tm765 - tm465*tg_3_16 | ||
409 : | add INP, 0x08 | ||
410 : | |||
411 : | movq [y1], mm0 ; 0 ; save y1 | ||
412 : | paddsw mm5, mm4 ; 4 ; y5 = tm765*tg_3_16 + tm465 | ||
413 : | |||
414 : | movq [y3], mm7 ; 7 ; save y3 | ||
415 : | psubsw mm3, mm1 ; 1 ; y7 = tp765*tg_1_16 - tp465 | ||
416 : | |||
417 : | movq [y5], mm5 ; 5 ; save y5 | ||
418 : | |||
419 : | movq mm0, [x1] ; 0 ; x1 | ||
420 : | |||
421 : | movq [y7], mm3 ; 3 ; save y7 (columns 0-4) | ||
422 : | |||
423 : | movq mm1, [x6] ; 1 ; x6 | ||
424 : | movq mm2, mm0 ; 2 ; x1 | ||
425 : | |||
426 : | movq mm3, [x2] ; 3 ; x2 | ||
427 : | paddsw mm0, mm1 ; t1 = x[1] + x[6] | ||
428 : | |||
429 : | movq mm4, [x5] ; 4 ; x5 | ||
430 : | psllw mm0, SHIFT_FRW_COL ; t1 | ||
431 : | |||
432 : | movq mm5, [x0] ; 5 ; x0 | ||
433 : | paddsw mm4, mm3 ; t2 = x[2] + x[5] | ||
434 : | |||
435 : | paddsw mm5, [x7] ; t0 = x[0] + x[7] | ||
436 : | psllw mm4, SHIFT_FRW_COL ; t2 | ||
437 : | |||
438 : | movq mm6, mm0 ; 6 ; t1 | ||
439 : | psubsw mm2, mm1 ; 1 ; t6 = x[1] - x[6] | ||
440 : | |||
441 : | movq mm1, [tg_2_16] ; 1 ; tg_2_16 | ||
442 : | psubsw mm0, mm4 ; tm12 = t1 - t2 | ||
443 : | |||
444 : | movq mm7, [x3] ; 7 ; x3 | ||
445 : | pmulhw mm1, mm0 ; tm12*tg_2_16 | ||
446 : | |||
447 : | paddsw mm7, [x4] ; t3 = x[3] + x[4] | ||
448 : | psllw mm5, SHIFT_FRW_COL ; t0 | ||
449 : | |||
450 : | paddsw mm6, mm4 ; 4 ; tp12 = t1 + t2 | ||
451 : | psllw mm7, SHIFT_FRW_COL ; t3 | ||
452 : | |||
453 : | movq mm4, mm5 ; 4 ; t0 | ||
454 : | psubsw mm5, mm7 ; tm03 = t0 - t3 | ||
455 : | |||
456 : | paddsw mm1, mm5 ; y2 = tm03 + tm12*tg_2_16 | ||
457 : | paddsw mm4, mm7 ; 7 ; tp03 = t0 + t3 | ||
458 : | |||
459 : | por mm1, qword [one_corr] ; correction y2 +0.5 | ||
460 : | psllw mm2, SHIFT_FRW_COL+1 ; t6 | ||
461 : | |||
462 : | pmulhw mm5, [tg_2_16] ; tm03*tg_2_16 | ||
463 : | movq mm7, mm4 ; 7 ; tp03 | ||
464 : | |||
465 : | psubsw mm3, [x5] ; t5 = x[2] - x[5] | ||
466 : | psubsw mm4, mm6 ; y4 = tp03 - tp12 | ||
467 : | |||
468 : | movq [y2+8], mm1 ; 1 ; save y2 | ||
469 : | paddsw mm7, mm6 ; 6 ; y0 = tp03 + tp12 | ||
470 : | |||
471 : | movq mm1, [x3] ; 1 ; x3 | ||
472 : | psllw mm3, SHIFT_FRW_COL+1 ; t5 | ||
473 : | |||
474 : | psubsw mm1, [x4] ; t4 = x[3] - x[4] | ||
475 : | movq mm6, mm2 ; 6 ; t6 | ||
476 : | |||
477 : | movq [y4+8], mm4 ; 4 ; save y4 | ||
478 : | paddsw mm2, mm3 ; t6 + t5 | ||
479 : | |||
480 : | pmulhw mm2, [ocos_4_16] ; tp65 = (t6 + t5)*cos_4_16 | ||
481 : | psubsw mm6, mm3 ; 3 ; t6 - t5 | ||
482 : | |||
483 : | pmulhw mm6, [ocos_4_16] ; tm65 = (t6 - t5)*cos_4_16 | ||
484 : | psubsw mm5, mm0 ; 0 ; y6 = tm03*tg_2_16 - tm12 | ||
485 : | |||
486 : | por mm5, qword [one_corr] ; correction y6 +0.5 | ||
487 : | psllw mm1, SHIFT_FRW_COL ; t4 | ||
488 : | |||
489 : | por mm2, qword [one_corr] ; correction tp65 +0.5 | ||
490 : | movq mm4, mm1 ; 4 ; t4 | ||
491 : | |||
492 : | movq mm3, [x0] ; 3 ; x0 | ||
493 : | paddsw mm1, mm6 ; tp465 = t4 + tm65 | ||
494 : | |||
495 : | psubsw mm3, [x7] ; t7 = x[0] - x[7] | ||
496 : | psubsw mm4, mm6 ; 6 ; tm465 = t4 - tm65 | ||
497 : | |||
498 : | movq mm0, [tg_1_16] ; 0 ; tg_1_16 | ||
499 : | psllw mm3, SHIFT_FRW_COL ; t7 | ||
500 : | |||
501 : | movq mm6, [tg_3_16] ; 6 ; tg_3_16 | ||
502 : | pmulhw mm0, mm1 ; tp465*tg_1_16 | ||
503 : | |||
504 : | movq [y0+8], mm7 ; 7 ; save y0 | ||
505 : | pmulhw mm6, mm4 ; tm465*tg_3_16 | ||
506 : | |||
507 : | movq [y6+8], mm5 ; 5 ; save y6 | ||
508 : | movq mm7, mm3 ; 7 ; t7 | ||
509 : | |||
510 : | movq mm5, [tg_3_16] ; 5 ; tg_3_16 | ||
511 : | psubsw mm7, mm2 ; tm765 = t7 - tp65 | ||
512 : | |||
513 : | paddsw mm3, mm2 ; 2 ; tp765 = t7 + tp65 | ||
514 : | pmulhw mm5, mm7 ; tm765*tg_3_16 | ||
515 : | |||
516 : | paddsw mm0, mm3 ; y1 = tp765 + tp465*tg_1_16 | ||
517 : | paddsw mm6, mm4 ; tm465*tg_3_16 | ||
518 : | |||
519 : | pmulhw mm3, [tg_1_16] ; tp765*tg_1_16 | ||
520 : | |||
521 : | por mm0, qword [one_corr] ; correction y1 +0.5 | ||
522 : | paddsw mm5, mm7 ; tm765*tg_3_16 | ||
523 : | |||
524 : | psubsw mm7, mm6 ; 6 ; y3 = tm765 - tm465*tg_3_16 | ||
525 : | |||
526 : | movq [y1+8], mm0 ; 0 ; save y1 | ||
527 : | paddsw mm5, mm4 ; 4 ; y5 = tm765*tg_3_16 + tm465 | ||
528 : | |||
529 : | movq [y3+8], mm7 ; 7 ; save y3 | ||
530 : | psubsw mm3, mm1 ; 1 ; y7 = tp765*tg_1_16 - tp465 | ||
531 : | |||
532 : | movq [y5+8], mm5 ; 5 ; save y5 | ||
533 : | |||
534 : | movq [y7+8], mm3 ; 3 ; save y7 | ||
535 : | |||
536 : | |||
537 : | ;--------------------- columns | ||
538 : | |||
539 : | mov INP, [esp + 8] ; row 0 | ||
540 : | |||
541 : | mov TABLEF, tab_frw_01234567 ; row 0 | ||
542 : | mov OUT, INP | ||
543 : | |||
544 : | mov round_frw_row, r_frw_row | ||
545 : | |||
546 : | movd mm5, [INP+12] ; mm5 = 7 6 | ||
547 : | |||
548 : | punpcklwd mm5, [INP+8] | ||
549 : | |||
550 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
551 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
552 : | |||
553 : | movq mm0, [INP] ; mm0 = 3 2 1 0 | ||
554 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
555 : | |||
556 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
557 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
558 : | |||
559 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
560 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
561 : | |||
562 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
563 : | |||
564 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
565 : | movq mm1, mm2 ; mm1 | ||
566 : | |||
567 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
568 : | |||
569 : | movq mm3, [TABLE] ; 3 ; w06 w04 w02 w00 | ||
570 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
571 : | |||
572 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
573 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
574 : | |||
575 : | movq mm4, [TABLE+8] ; 4 ; w07 w05 w03 w01 | ||
576 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
577 : | |||
578 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
579 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
580 : | |||
581 : | movq mm1, [TABLE+32] ; 1 ; w22 w20 w18 w16 | ||
582 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
583 : | |||
584 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
585 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
586 : | |||
587 : | pmaddwd mm0, [TABLE+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
588 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
589 : | |||
590 : | movq mm7, [TABLE+40] ; 7 ; w23 w21 w19 w17 | ||
591 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
592 : | |||
593 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
594 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
595 : | |||
596 : | pmaddwd mm2, [TABLE+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
597 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
598 : | |||
599 : | pmaddwd mm5, [TABLE+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
600 : | |||
601 : | pmaddwd mm6, [TABLE+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
602 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
603 : | |||
604 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
605 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
606 : | |||
607 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
608 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
609 : | |||
610 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
611 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
612 : | |||
613 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
614 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
615 : | |||
616 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
617 : | |||
618 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
619 : | |||
620 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
621 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
622 : | |||
623 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
624 : | |||
625 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
626 : | |||
627 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
628 : | |||
629 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
630 : | |||
631 : | movq [OUT_1-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
632 : | |||
633 : | movq [OUT_1-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
634 : | |||
635 : | movd mm5, [INP_1+12] ; mm5 = 7 6 | ||
636 : | |||
637 : | punpcklwd mm5, [INP_1+8] | ||
638 : | |||
639 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
640 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
641 : | |||
642 : | movq mm0, [INP_1] ; mm0 = 3 2 1 0 | ||
643 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
644 : | |||
645 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
646 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
647 : | |||
648 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
649 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
650 : | |||
651 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
652 : | |||
653 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
654 : | movq mm1, mm2 ; mm1 | ||
655 : | |||
656 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
657 : | |||
658 : | movq mm3, [TABLE_1] ; 3 ; w06 w04 w02 w00 | ||
659 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
660 : | |||
661 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
662 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
663 : | |||
664 : | movq mm4, [TABLE_1+8] ; 4 ; w07 w05 w03 w01 | ||
665 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
666 : | |||
667 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
668 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
669 : | |||
670 : | movq mm1, [TABLE_1+32] ; 1 ; w22 w20 w18 w16 | ||
671 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
672 : | |||
673 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
674 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
675 : | |||
676 : | pmaddwd mm0, [TABLE_1+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
677 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
678 : | |||
679 : | movq mm7, [TABLE_1+40] ; 7 ; w23 w21 w19 w17 | ||
680 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
681 : | |||
682 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
683 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
684 : | |||
685 : | pmaddwd mm2, [TABLE_1+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
686 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
687 : | |||
688 : | pmaddwd mm5, [TABLE_1+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
689 : | |||
690 : | pmaddwd mm6, [TABLE_1+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
691 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
692 : | |||
693 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
694 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
695 : | |||
696 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
697 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
698 : | |||
699 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
700 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
701 : | |||
702 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
703 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
704 : | |||
705 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
706 : | |||
707 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
708 : | |||
709 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
710 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
711 : | |||
712 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
713 : | |||
714 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
715 : | |||
716 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
717 : | |||
718 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
719 : | |||
720 : | movq [OUT_2-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
721 : | |||
722 : | movq [OUT_2-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
723 : | |||
724 : | movd mm5, [INP_2+12] ; mm5 = 7 6 | ||
725 : | |||
726 : | punpcklwd mm5, [INP_2+8] | ||
727 : | |||
728 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
729 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
730 : | |||
731 : | movq mm0, [INP_2] ; mm0 = 3 2 1 0 | ||
732 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
733 : | |||
734 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
735 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
736 : | |||
737 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
738 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
739 : | |||
740 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
741 : | |||
742 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
743 : | movq mm1, mm2 ; mm1 | ||
744 : | |||
745 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
746 : | |||
747 : | movq mm3, [TABLE_2] ; 3 ; w06 w04 w02 w00 | ||
748 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
749 : | |||
750 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
751 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
752 : | |||
753 : | movq mm4, [TABLE_2+8] ; 4 ; w07 w05 w03 w01 | ||
754 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
755 : | |||
756 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
757 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
758 : | |||
759 : | movq mm1, [TABLE_2+32] ; 1 ; w22 w20 w18 w16 | ||
760 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
761 : | |||
762 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
763 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
764 : | |||
765 : | pmaddwd mm0, [TABLE_2+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
766 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
767 : | |||
768 : | movq mm7, [TABLE_2+40] ; 7 ; w23 w21 w19 w17 | ||
769 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
770 : | |||
771 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
772 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
773 : | |||
774 : | pmaddwd mm2, [TABLE_2+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
775 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
776 : | |||
777 : | pmaddwd mm5, [TABLE_2+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
778 : | |||
779 : | pmaddwd mm6, [TABLE_2+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
780 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
781 : | |||
782 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
783 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
784 : | |||
785 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
786 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
787 : | |||
788 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
789 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
790 : | |||
791 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
792 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
793 : | |||
794 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
795 : | |||
796 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
797 : | |||
798 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
799 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
800 : | |||
801 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
802 : | |||
803 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
804 : | |||
805 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
806 : | |||
807 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
808 : | |||
809 : | movq [OUT_3-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
810 : | |||
811 : | movq [OUT_3-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
812 : | |||
813 : | movd mm5, [INP_3+12] ; mm5 = 7 6 | ||
814 : | |||
815 : | punpcklwd mm5, [INP_3+8] | ||
816 : | |||
817 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
818 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
819 : | |||
820 : | movq mm0, [INP_3] ; mm0 = 3 2 1 0 | ||
821 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
822 : | |||
823 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
824 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
825 : | |||
826 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
827 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
828 : | |||
829 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
830 : | |||
831 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
832 : | movq mm1, mm2 ; mm1 | ||
833 : | |||
834 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
835 : | |||
836 : | movq mm3, [TABLE_3] ; 3 ; w06 w04 w02 w00 | ||
837 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
838 : | |||
839 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
840 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
841 : | |||
842 : | movq mm4, [TABLE_3+8] ; 4 ; w07 w05 w03 w01 | ||
843 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
844 : | |||
845 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
846 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
847 : | |||
848 : | movq mm1, [TABLE_3+32] ; 1 ; w22 w20 w18 w16 | ||
849 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
850 : | |||
851 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
852 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
853 : | |||
854 : | pmaddwd mm0, [TABLE_3+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
855 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
856 : | |||
857 : | movq mm7, [TABLE_3+40] ; 7 ; w23 w21 w19 w17 | ||
858 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
859 : | |||
860 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
861 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
862 : | |||
863 : | pmaddwd mm2, [TABLE_3+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
864 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
865 : | |||
866 : | pmaddwd mm5, [TABLE_3+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
867 : | |||
868 : | pmaddwd mm6, [TABLE_3+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
869 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
870 : | |||
871 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
872 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
873 : | |||
874 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
875 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
876 : | |||
877 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
878 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
879 : | |||
880 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
881 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
882 : | |||
883 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
884 : | |||
885 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
886 : | |||
887 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
888 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
889 : | |||
890 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
891 : | |||
892 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
893 : | |||
894 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
895 : | |||
896 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
897 : | |||
898 : | movq [OUT_4-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
899 : | |||
900 : | movq [OUT_4-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
901 : | |||
902 : | movd mm5, [INP_4+12] ; mm5 = 7 6 | ||
903 : | |||
904 : | punpcklwd mm5, [INP_4+8] | ||
905 : | |||
906 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
907 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
908 : | |||
909 : | movq mm0, [INP_4] ; mm0 = 3 2 1 0 | ||
910 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
911 : | |||
912 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
913 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
914 : | |||
915 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
916 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
917 : | |||
918 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
919 : | |||
920 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
921 : | movq mm1, mm2 ; mm1 | ||
922 : | |||
923 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
924 : | |||
925 : | movq mm3, [TABLE_4] ; 3 ; w06 w04 w02 w00 | ||
926 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
927 : | |||
928 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
929 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
930 : | |||
931 : | movq mm4, [TABLE_4+8] ; 4 ; w07 w05 w03 w01 | ||
932 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
933 : | |||
934 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
935 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
936 : | |||
937 : | movq mm1, [TABLE_4+32] ; 1 ; w22 w20 w18 w16 | ||
938 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
939 : | |||
940 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
941 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
942 : | |||
943 : | pmaddwd mm0, [TABLE_4+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
944 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
945 : | |||
946 : | movq mm7, [TABLE_4+40] ; 7 ; w23 w21 w19 w17 | ||
947 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
948 : | |||
949 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
950 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
951 : | |||
952 : | pmaddwd mm2, [TABLE_4+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
953 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
954 : | |||
955 : | pmaddwd mm5, [TABLE_4+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
956 : | |||
957 : | pmaddwd mm6, [TABLE_4+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
958 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
959 : | |||
960 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
961 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
962 : | |||
963 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
964 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
965 : | |||
966 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
967 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
968 : | |||
969 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
970 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
971 : | |||
972 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
973 : | |||
974 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
975 : | |||
976 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
977 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
978 : | |||
979 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
980 : | |||
981 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
982 : | |||
983 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
984 : | |||
985 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
986 : | |||
987 : | movq [OUT_5-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
988 : | |||
989 : | movq [OUT_5-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
990 : | |||
991 : | movd mm5, [INP_5+12] ; mm5 = 7 6 | ||
992 : | |||
993 : | punpcklwd mm5, [INP_5+8] | ||
994 : | |||
995 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
996 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
997 : | |||
998 : | movq mm0, [INP_5] ; mm0 = 3 2 1 0 | ||
999 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
1000 : | |||
1001 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
1002 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
1003 : | |||
1004 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
1005 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
1006 : | |||
1007 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
1008 : | |||
1009 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
1010 : | movq mm1, mm2 ; mm1 | ||
1011 : | |||
1012 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
1013 : | |||
1014 : | movq mm3, [TABLE_5] ; 3 ; w06 w04 w02 w00 | ||
1015 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
1016 : | |||
1017 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
1018 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
1019 : | |||
1020 : | movq mm4, [TABLE_5+8] ; 4 ; w07 w05 w03 w01 | ||
1021 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
1022 : | |||
1023 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
1024 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
1025 : | |||
1026 : | movq mm1, [TABLE_5+32] ; 1 ; w22 w20 w18 w16 | ||
1027 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
1028 : | |||
1029 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
1030 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
1031 : | |||
1032 : | pmaddwd mm0, [TABLE_5+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
1033 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
1034 : | |||
1035 : | movq mm7, [TABLE_5+40] ; 7 ; w23 w21 w19 w17 | ||
1036 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
1037 : | |||
1038 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
1039 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
1040 : | |||
1041 : | pmaddwd mm2, [TABLE_5+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
1042 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
1043 : | |||
1044 : | pmaddwd mm5, [TABLE_5+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
1045 : | |||
1046 : | pmaddwd mm6, [TABLE_5+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
1047 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
1048 : | |||
1049 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
1050 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
1051 : | |||
1052 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
1053 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
1054 : | |||
1055 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
1056 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
1057 : | |||
1058 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
1059 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
1060 : | |||
1061 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
1062 : | |||
1063 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
1064 : | |||
1065 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
1066 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
1067 : | |||
1068 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
1069 : | |||
1070 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
1071 : | |||
1072 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
1073 : | |||
1074 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
1075 : | |||
1076 : | movq [OUT_6-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
1077 : | |||
1078 : | movq [OUT_6-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
1079 : | |||
1080 : | movd mm5, [INP_6+12] ; mm5 = 7 6 | ||
1081 : | |||
1082 : | punpcklwd mm5, [INP_6+8] | ||
1083 : | |||
1084 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
1085 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
1086 : | |||
1087 : | movq mm0, [INP_6] ; mm0 = 3 2 1 0 | ||
1088 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
1089 : | |||
1090 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
1091 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
1092 : | |||
1093 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
1094 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
1095 : | |||
1096 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
1097 : | |||
1098 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
1099 : | movq mm1, mm2 ; mm1 | ||
1100 : | |||
1101 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
1102 : | |||
1103 : | movq mm3, [TABLE_6] ; 3 ; w06 w04 w02 w00 | ||
1104 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
1105 : | |||
1106 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
1107 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
1108 : | |||
1109 : | movq mm4, [TABLE_6+8] ; 4 ; w07 w05 w03 w01 | ||
1110 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
1111 : | |||
1112 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
1113 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
1114 : | |||
1115 : | movq mm1, [TABLE_6+32] ; 1 ; w22 w20 w18 w16 | ||
1116 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
1117 : | |||
1118 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
1119 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
1120 : | |||
1121 : | pmaddwd mm0, [TABLE_6+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
1122 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
1123 : | |||
1124 : | movq mm7, [TABLE_6+40] ; 7 ; w23 w21 w19 w17 | ||
1125 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
1126 : | |||
1127 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
1128 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
1129 : | |||
1130 : | pmaddwd mm2, [TABLE_6+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
1131 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
1132 : | |||
1133 : | pmaddwd mm5, [TABLE_6+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
1134 : | |||
1135 : | pmaddwd mm6, [TABLE_6+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
1136 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
1137 : | |||
1138 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
1139 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
1140 : | |||
1141 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
1142 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
1143 : | |||
1144 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
1145 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
1146 : | |||
1147 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
1148 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
1149 : | |||
1150 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
1151 : | |||
1152 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
1153 : | |||
1154 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
1155 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
1156 : | |||
1157 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
1158 : | |||
1159 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
1160 : | |||
1161 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
1162 : | |||
1163 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
1164 : | |||
1165 : | movq [OUT_7-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
1166 : | |||
1167 : | movq [OUT_7-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
1168 : | |||
1169 : | movd mm5, [INP_7+12] ; mm5 = 7 6 | ||
1170 : | |||
1171 : | punpcklwd mm5, [INP_7+8] | ||
1172 : | |||
1173 : | movq mm2, mm5 ; mm2 = 5 7 4 6 | ||
1174 : | psrlq mm5, 32 ; mm5 = _ _ 5 7 | ||
1175 : | |||
1176 : | movq mm0, [INP_7] ; mm0 = 3 2 1 0 | ||
1177 : | punpcklwd mm5, mm2 ; mm5 = 4 5 6 7 | ||
1178 : | |||
1179 : | movq mm1, mm0 ; mm1 = 3 2 1 0 | ||
1180 : | paddsw mm0, mm5 ; mm0 = [3+4, 2+5, 1+6, 0+7] (xt3, xt2, xt1, xt0) | ||
1181 : | |||
1182 : | psubsw mm1, mm5 ; mm1 = [3-4, 2-5, 1-6, 0-7] (xt7, xt6, xt5, xt4) | ||
1183 : | movq mm2, mm0 ; mm2 = [ xt3 xt2 xt1 xt0 ] | ||
1184 : | |||
1185 : | punpcklwd mm0, mm1 ; mm0 = [ xt5 xt1 xt4 xt0 ] | ||
1186 : | |||
1187 : | punpckhwd mm2, mm1 ; mm2 = [ xt7 xt3 xt6 xt2 ] | ||
1188 : | movq mm1, mm2 ; mm1 | ||
1189 : | |||
1190 : | movq mm2, mm0 ; 2 ; x3 x2 x1 x0 | ||
1191 : | |||
1192 : | movq mm3, [TABLE_7] ; 3 ; w06 w04 w02 w00 | ||
1193 : | punpcklwd mm0, mm1 ; x5 x1 x4 x0 | ||
1194 : | |||
1195 : | movq mm5, mm0 ; 5 ; x5 x1 x4 x0 | ||
1196 : | punpckldq mm0, mm0 ; x4 x0 x4 x0 [ xt2 xt0 xt2 xt0 ] | ||
1197 : | |||
1198 : | movq mm4, [TABLE_7+8] ; 4 ; w07 w05 w03 w01 | ||
1199 : | punpckhwd mm2, mm1 ; 1 ; x7 x3 x6 x2 | ||
1200 : | |||
1201 : | pmaddwd mm3, mm0 ; x4*w06+x0*w04 x4*w02+x0*w00 | ||
1202 : | movq mm6, mm2 ; 6 ; x7 x3 x6 x2 | ||
1203 : | |||
1204 : | movq mm1, [TABLE_7+32] ; 1 ; w22 w20 w18 w16 | ||
1205 : | punpckldq mm2, mm2 ; x6 x2 x6 x2 [ xt3 xt1 xt3 xt1 ] | ||
1206 : | |||
1207 : | pmaddwd mm4, mm2 ; x6*w07+x2*w05 x6*w03+x2*w01 | ||
1208 : | punpckhdq mm5, mm5 ; x5 x1 x5 x1 [ xt6 xt4 xt6 xt4 ] | ||
1209 : | |||
1210 : | pmaddwd mm0, [TABLE_7+16] ; x4*w14+x0*w12 x4*w10+x0*w08 | ||
1211 : | punpckhdq mm6, mm6 ; x7 x3 x7 x3 [ xt7 xt5 xt7 xt5 ] | ||
1212 : | |||
1213 : | movq mm7, [TABLE_7+40] ; 7 ; w23 w21 w19 w17 | ||
1214 : | pmaddwd mm1, mm5 ; x5*w22+x1*w20 x5*w18+x1*w16 | ||
1215 : | |||
1216 : | paddd mm3, [round_frw_row] ; +rounder (y2,y0) | ||
1217 : | pmaddwd mm7, mm6 ; x7*w23+x3*w21 x7*w19+x3*w17 | ||
1218 : | |||
1219 : | pmaddwd mm2, [TABLE_7+24] ; x6*w15+x2*w13 x6*w11+x2*w09 | ||
1220 : | paddd mm3, mm4 ; 4 ; a1=sum(even1) a0=sum(even0) | ||
1221 : | |||
1222 : | pmaddwd mm5, [TABLE_7+48] ; x5*w30+x1*w28 x5*w26+x1*w24 | ||
1223 : | |||
1224 : | pmaddwd mm6, [TABLE_7+56] ; x7*w31+x3*w29 x7*w27+x3*w25 | ||
1225 : | paddd mm1, mm7 ; 7 ; b1=sum(odd1) b0=sum(odd0) | ||
1226 : | |||
1227 : | paddd mm0, [round_frw_row] ; +rounder (y6,y4) | ||
1228 : | psrad mm3, SHIFT_FRW_ROW_CLIP1 ; (y2, y0) | ||
1229 : | |||
1230 : | paddd mm1, [round_frw_row] ; +rounder (y3,y1) | ||
1231 : | paddd mm0, mm2 ; 2 ; a3=sum(even3) a2=sum(even2) | ||
1232 : | |||
1233 : | paddd mm5, [round_frw_row] ; +rounder (y7,y5) | ||
1234 : | psrad mm1, SHIFT_FRW_ROW_CLIP1 ; y1=a1+b1 y0=a0+b0 | ||
1235 : | |||
1236 : | paddd mm5, mm6 ; 6 ; b3=sum(odd3) b2=sum(odd2) | ||
1237 : | psrad mm0, SHIFT_FRW_ROW_CLIP1 ; y3=a3+b3 y2=a2+b2 | ||
1238 : | |||
1239 : | psrad mm5, SHIFT_FRW_ROW_CLIP1 ; y4=a3-b3 y5=a2-b2 | ||
1240 : | |||
1241 : | packssdw mm3, mm0 ; 0 ; y6 y4 y2 y0, saturate {-32768,+32767} | ||
1242 : | |||
1243 : | packssdw mm1, mm5 ; 3 ; y7 y5 y3 y1, saturate {-32768,+32767} | ||
1244 : | movq mm6, mm3 ; mm0 = y6 y4 y2 y0 | ||
1245 : | |||
1246 : | punpcklwd mm3, mm1 ; y3 y2 y1 y0 | ||
1247 : | |||
1248 : | punpckhwd mm6, mm1 ; y7 y6 y5 y4 | ||
1249 : | |||
1250 : | psraw mm3, SHIFT_FRW_ROW_CLIP2 ; descale [y3 y2 y1 y0] to {-2048,+2047} | ||
1251 : | |||
1252 : | psraw mm6, SHIFT_FRW_ROW_CLIP2 ; descale [y7 y6 y5 y4] to {-2048,+2047} | ||
1253 : | |||
1254 : | movq [OUT_8-16], mm3 ; 1 ; save y3 y2 y1 y0 | ||
1255 : | |||
1256 : | movq [OUT_8-8], mm6 ; 7 ; save y7 y6 y5 y4 | ||
1257 : | |||
1258 : | pop ebx | ||
1259 : | emms | ||
1260 : | |||
1261 : | ret | ||
1262 : | |||
1263 : | |||
1264 : | ;******************************************************************* | ||
1265 : | ; This SSE2 code of the FDCT algoruthm coded by | ||
1266 : | ; Dmitry Rozhdestvensky and checked by Vladimir G. Ivanov | ||
1267 : | ;******************************************************************* | ||
1268 : | |||
1269 : | %macro transpose8x8sse2 3 ; source,dest,{0=first part, 1=second part} | ||
1270 : | ;I found this smart transposing algo at www.x86.org | ||
1271 : | |||
1272 : | movdqa xmm0,[%1+0*16] ; 07 06 05 04 03 02 01 00 | ||
1273 : | movdqa xmm6,[%1+2*16] ; 27 26 25 24 23 22 21 20 | ||
1274 : | movdqa xmm4,[%1+4*16] ; 47 46 45 44 43 42 41 40 | ||
1275 : | movdqa xmm7,[%1+6*16] ; 67 66 65 64 63 62 61 60 | ||
1276 : | |||
1277 : | %if %3=0 | ||
1278 : | punpcklwd xmm0,[%1+1*16] ; 13 03 12 02 11 01 10 00 | ||
1279 : | movdqa xmm2,xmm0 | ||
1280 : | punpcklwd xmm6,[%1+3*16] ; 33 23 32 22 31 21 30 20 | ||
1281 : | punpcklwd xmm4,[%1+5*16] ; 53 43 52 42 51 41 50 40 | ||
1282 : | movdqa xmm5,xmm4 | ||
1283 : | punpcklwd xmm7,[%1+7*16] ; 73 63 72 62 71 61 70 60 | ||
1284 : | %else | ||
1285 : | punpckhwd xmm0,[%1+1*16] ; | ||
1286 : | movdqa xmm2,xmm0 | ||
1287 : | punpckhwd xmm6,[%1+3*16] ; | ||
1288 : | punpckhwd xmm4,[%1+5*16] ; | ||
1289 : | movdqa xmm5,xmm4 | ||
1290 : | punpckhwd xmm7,[%1+7*16] ; | ||
1291 : | %endif | ||
1292 : | |||
1293 : | punpckldq xmm0,xmm6 ; 31 21 11 01 30 20 10 00 | ||
1294 : | movdqa xmm1,xmm0 | ||
1295 : | punpckldq xmm4,xmm7 ; 71 61 51 41 70 60 50 40 | ||
1296 : | punpckhdq xmm2,xmm6 ; 33 23 13 03 32 22 12 02 | ||
1297 : | movdqa xmm3,xmm2 | ||
1298 : | punpckhdq xmm5,xmm7 ; 73 63 53 43 72 62 52 42 | ||
1299 : | |||
1300 : | punpcklqdq xmm0,xmm4 ; 70 60 50 40 30 20 10 00 | ||
1301 : | punpcklqdq xmm2,xmm5 ; 72 62 52 42 32 22 21 02 | ||
1302 : | punpckhqdq xmm1,xmm4 ; 71 61 51 41 31 21 11 01 | ||
1303 : | punpckhqdq xmm3,xmm5 ; 73 63 53 43 33 23 13 03 | ||
1304 : | |||
1305 : | movdqa [%2+(0+%3*4)*16],xmm0 | ||
1306 : | movdqa [%2+(1+%3*4)*16],xmm1 | ||
1307 : | movdqa [%2+(2+%3*4)*16],xmm2 | ||
1308 : | movdqa [%2+(3+%3*4)*16],xmm3 | ||
1309 : | |||
1310 : | %endmacro | ||
1311 : | |||
1312 : | |||
1313 : | %macro makeoddpart 3 ; output, table, shift | ||
1314 : | |||
1315 : | |||
1316 : | movdqa xmm1,[%2+0 ] ;45l | ||
1317 : | movdqa xmm5,[%2+16] ;67l | ||
1318 : | movdqa xmm3,xmm1 ;45h | ||
1319 : | movdqa xmm7,xmm5 ;67h | ||
1320 : | |||
1321 : | pmaddwd xmm1,xmm2 ;[%2+0 ] | ||
1322 : | pmaddwd xmm5,xmm0 ;[%2+16] | ||
1323 : | paddd xmm1,xmm5 | ||
1324 : | %if %3=11 | ||
1325 : | movdqa xmm5,[rounder_11] | ||
1326 : | %else | ||
1327 : | movdqa xmm5,[rounder_18] | ||
1328 : | %endif | ||
1329 : | |||
1330 : | pmaddwd xmm3,xmm6 ;[%2+0 ] | ||
1331 : | pmaddwd xmm7,xmm4 ;[%2+16] | ||
1332 : | paddd xmm3,xmm7 | ||
1333 : | |||
1334 : | paddd xmm1,xmm5 ;rounder | ||
1335 : | paddd xmm3,xmm5 ;rounder | ||
1336 : | psrad xmm1,%3 | ||
1337 : | psrad xmm3,%3 | ||
1338 : | |||
1339 : | packssdw xmm1,xmm3 | ||
1340 : | movdqa [%1],xmm1 | ||
1341 : | |||
1342 : | %endmacro | ||
1343 : | |||
1344 : | %macro makeoddpartlast 3 ; output, table, shift | ||
1345 : | |||
1346 : | pmaddwd xmm2,[%2+0 ] | ||
1347 : | pmaddwd xmm0,[%2+16] | ||
1348 : | paddd xmm2,xmm0 | ||
1349 : | |||
1350 : | pmaddwd xmm6,[%2+0 ] | ||
1351 : | pmaddwd xmm4,[%2+16] | ||
1352 : | paddd xmm6,xmm4 | ||
1353 : | |||
1354 : | paddd xmm2,xmm5 ;rounder | ||
1355 : | paddd xmm6,xmm5 ;rounder | ||
1356 : | psrad xmm2,%3 | ||
1357 : | psrad xmm6,%3 | ||
1358 : | |||
1359 : | packssdw xmm2,xmm6 | ||
1360 : | movdqa [%1],xmm2 | ||
1361 : | |||
1362 : | %endmacro | ||
1363 : | |||
1364 : | |||
1365 : | %macro FDCT_1D 4 ; INP,OUTP,{0=first pass, 1=second pass}, shift={11,18} | ||
1366 : | |||
1367 : | ;movdqa xmm0,[%1+16*0] ;We do not load 0-3 values here for they | ||
1368 : | ;movdqa xmm1,[%1+16*1] ;stayed from transposition | ||
1369 : | ;movdqa xmm2,[%1+16*2] | ||
1370 : | ;movdqa xmm3,[%1+16*3] | ||
1371 : | %if %3<>0 | ||
1372 : | movdqa xmm7,[rounder_5] | ||
1373 : | %endif | ||
1374 : | |||
1375 : | paddsw xmm0,[%1+16*7] ;tmp0 | ||
1376 : | movdqa xmm4,xmm0 | ||
1377 : | paddsw xmm1,[%1+16*6] ;tmp1 | ||
1378 : | movdqa xmm5,xmm1 | ||
1379 : | paddsw xmm2,[%1+16*5] ;tmp2 | ||
1380 : | paddsw xmm3,[%1+16*4] ;tmp3 | ||
1381 : | |||
1382 : | paddsw xmm0,xmm3 ;tmp10 | ||
1383 : | %if %3<>0 ; In the second pass we must round and shift before | ||
1384 : | ; the tmp10+tmp11 and tmp10-tmp11 calculation | ||
1385 : | ; or the overflow will happen. | ||
1386 : | paddsw xmm0,xmm7 ;[rounder_5] | ||
1387 : | psraw xmm0,PASS1_BITS+3 | ||
1388 : | %endif | ||
1389 : | movdqa xmm6,xmm0 ;tmp10 | ||
1390 : | paddsw xmm1,xmm2 ;tmp11 | ||
1391 : | psubsw xmm4,xmm3 ;tmp13 | ||
1392 : | psubsw xmm5,xmm2 ;tmp12 | ||
1393 : | |||
1394 : | %if %3=0 | ||
1395 : | paddsw xmm0,xmm1 | ||
1396 : | psubsw xmm6,xmm1 | ||
1397 : | |||
1398 : | psllw xmm0,PASS1_BITS | ||
1399 : | psllw xmm6,PASS1_BITS | ||
1400 : | %else | ||
1401 : | paddsw xmm1,xmm7 ;[rounder_5] | ||
1402 : | psraw xmm1,PASS1_BITS+3 | ||
1403 : | |||
1404 : | paddsw xmm0,xmm1 | ||
1405 : | psubsw xmm6,xmm1 | ||
1406 : | %endif | ||
1407 : | |||
1408 : | movdqa xmm1,xmm4 | ||
1409 : | movdqa xmm2,xmm4 | ||
1410 : | |||
1411 : | movdqa [%2+16*0],xmm0 | ||
1412 : | movdqa [%2+16*4],xmm6 | ||
1413 : | |||
1414 : | movdqa xmm7,[FIX_1] | ||
1415 : | |||
1416 : | punpckhwd xmm1,xmm5 ; 12 13 12 13 12 13 12 13 high part | ||
1417 : | movdqa xmm6,xmm1 ;high | ||
1418 : | punpcklwd xmm2,xmm5 ; 12 13 12 13 12 13 12 13 low part | ||
1419 : | movdqa xmm0,xmm2 ;low | ||
1420 : | |||
1421 : | movdqa xmm4,[FIX_2] | ||
1422 : | |||
1423 : | %if %4=11 | ||
1424 : | movdqa xmm5,[rounder_11] | ||
1425 : | %else | ||
1426 : | movdqa xmm5,[rounder_18] | ||
1427 : | %endif | ||
1428 : | |||
1429 : | pmaddwd xmm2,xmm7 ;[FIX_1] | ||
1430 : | pmaddwd xmm1,xmm7 ;[FIX_1] | ||
1431 : | pmaddwd xmm0,xmm4 ;[FIX_2] | ||
1432 : | pmaddwd xmm6,xmm4 ;[FIX_2] | ||
1433 : | |||
1434 : | paddd xmm2,xmm5 ;rounder | ||
1435 : | paddd xmm1,xmm5 ;rounder | ||
1436 : | psrad xmm2,%4 | ||
1437 : | psrad xmm1,%4 | ||
1438 : | |||
1439 : | packssdw xmm2,xmm1 | ||
1440 : | movdqa [%2+16*2],xmm2 | ||
1441 : | |||
1442 : | paddd xmm0,xmm5 ;rounder | ||
1443 : | paddd xmm6,xmm5 ;rounder | ||
1444 : | psrad xmm0,%4 | ||
1445 : | psrad xmm6,%4 | ||
1446 : | |||
1447 : | packssdw xmm0,xmm6 | ||
1448 : | movdqa [%2+16*6],xmm0 | ||
1449 : | |||
1450 : | movdqa xmm0,[%1+16*0] | ||
1451 : | movdqa xmm1,[%1+16*1] | ||
1452 : | movdqa xmm2,[%1+16*2] | ||
1453 : | movdqa xmm3,[%1+16*3] | ||
1454 : | |||
1455 : | psubsw xmm0,[%1+16*7] ;tmp7 | ||
1456 : | movdqa xmm4,xmm0 | ||
1457 : | psubsw xmm1,[%1+16*6] ;tmp6 | ||
1458 : | psubsw xmm2,[%1+16*5] ;tmp5 | ||
1459 : | movdqa xmm6,xmm2 | ||
1460 : | psubsw xmm3,[%1+16*4] ;tmp4 | ||
1461 : | |||
1462 : | punpckhwd xmm4,xmm1 ; 6 7 6 7 6 7 6 7 high part | ||
1463 : | punpcklwd xmm0,xmm1 ; 6 7 6 7 6 7 6 7 low part | ||
1464 : | punpckhwd xmm6,xmm3 ; 4 5 4 5 4 5 4 5 high part | ||
1465 : | punpcklwd xmm2,xmm3 ; 4 5 4 5 4 5 4 5 low part | ||
1466 : | |||
1467 : | makeoddpart %2+16*1,FIX_3,%4 | ||
1468 : | makeoddpart %2+16*3,FIX_4,%4 | ||
1469 : | makeoddpart %2+16*5,FIX_5,%4 | ||
1470 : | makeoddpartlast %2+16*7,FIX_6,%4 | ||
1471 : | |||
1472 : | %endmacro | ||
1473 : | |||
1474 : | cglobal fdct_sse2 | ||
1475 : | ;;void f dct_sse2(short *block); | ||
1476 : | fdct_sse2: | ||
1477 : | |||
1478 : | push eax | ||
1479 : | push ebx | ||
1480 : | |||
1481 : | mov eax,[esp+4+2*4] | ||
1482 : | mov ebx,buffer | ||
1483 : | |||
1484 : | prefetchnta [FIX_1] | ||
1485 : | prefetchnta [FIX_3] | ||
1486 : | prefetchnta [FIX_5] | ||
1487 : | |||
1488 : | transpose8x8sse2 eax,ebx,1 ; First we transpose last 4 lines | ||
1489 : | transpose8x8sse2 eax,ebx,0 ; Then the firts 4 lines | ||
1490 : | |||
1491 : | ;processing columns (became rows after transposition) | ||
1492 : | |||
1493 : | FDCT_1D ebx,eax,0,CONST_BITS - PASS1_BITS | ||
1494 : | |||
1495 : | transpose8x8sse2 eax,ebx,1 | ||
1496 : | transpose8x8sse2 eax,ebx,0 | ||
1497 : | |||
1498 : | ;now processing rows | ||
1499 : | |||
1500 : | FDCT_1D ebx,eax,1,CONST_BITS + PASS1_BITS + 3 | ||
1501 : | |||
1502 : | pop ebx | ||
1503 : | pop eax | ||
1504 : | |||
1505 : | ret |
No admin address has been configured | ViewVC Help |
Powered by ViewVC 1.0.4 |