1 /*****************************************************************************
2 * ac3_imdct_sse.c: accelerated SSE ac3 DCT
3 *****************************************************************************
4 * Copyright (C) 1999, 2000 VideoLAN
5 * $Id: ac3_imdct_sse.c,v 1.13 2002/07/31 20:56:51 sam Exp $
7 * Authors: Renaud Dartus <reno@videolan.org>
8 * Aaron Holtzman <aholtzma@engr.uvic.ca>
10 * This program is free software; you can redistribute it and/or modify
11 * it under the terms of the GNU General Public License as published by
12 * the Free Software Foundation; either version 2 of the License, or
13 * (at your option) any later version.
15 * This program is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 * GNU General Public License for more details.
20 * You should have received a copy of the GNU General Public License
21 * along with this program; if not, write to the Free Software
22 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111, USA.
23 *****************************************************************************/
25 /*****************************************************************************
27 *****************************************************************************/
33 #include "ac3_imdct.h"
34 #include "ac3_imdct_common.h"
35 #include "ac3_retables.h"
38 # define M_PI 3.14159265358979323846
41 void E_( fft_64p ) ( complex_t *x );
42 void E_( fft_128p ) ( complex_t *a );
44 static void imdct512_pre_ifft_twiddle_sse ( const int *, complex_t *,
46 static void imdct512_post_ifft_twiddle_sse ( complex_t *, float * );
47 static void imdct512_window_delay_sse ( complex_t *, float *,
49 static void imdct512_window_delay_nol_sse ( complex_t *, float *,
52 void E_( imdct_init ) (imdct_t * p_imdct)
55 float scale = 181.019;
57 for (i=0; i < 128; i++)
59 float xcos_i = cos(2.0f * M_PI * (8*i+1)/(8*N)) * scale;
60 float xsin_i = sin(2.0f * M_PI * (8*i+1)/(8*N)) * scale;
61 p_imdct->xcos_sin_sse[i * 4] = xcos_i;
62 p_imdct->xcos_sin_sse[i * 4 + 1] = -xsin_i;
63 p_imdct->xcos_sin_sse[i * 4 + 2] = -xsin_i;
64 p_imdct->xcos_sin_sse[i * 4 + 3] = -xcos_i;
68 void E_( imdct_do_512 ) (imdct_t * p_imdct, float data[], float delay[])
70 imdct512_pre_ifft_twiddle_sse( pm128, p_imdct->buf, data,
71 p_imdct->xcos_sin_sse );
72 E_( fft_128p ) ( p_imdct->buf );
73 imdct512_post_ifft_twiddle_sse( p_imdct->buf, p_imdct->xcos_sin_sse );
74 imdct512_window_delay_sse( p_imdct->buf, data, window, delay );
78 void E_( imdct_do_512_nol ) (imdct_t * p_imdct, float data[], float delay[])
80 imdct512_pre_ifft_twiddle_sse( pm128, p_imdct->buf, data,
81 p_imdct->xcos_sin_sse );
82 E_( fft_128p ) ( p_imdct->buf );
83 imdct512_post_ifft_twiddle_sse( p_imdct->buf, p_imdct->xcos_sin_sse );
84 imdct512_window_delay_nol_sse( p_imdct->buf, data, window, delay );
87 static void imdct512_pre_ifft_twiddle_sse (const int *pmt, complex_t *buf, float *data, float *xcos_sin_sse)
89 __asm__ __volatile__ (
93 "addl $-4, %%esp\n" /* local variable, loop counter */
102 "movl %%edi, %%ebx\n" /* buf */
103 "movl $64, -4(%%ebp)\n"
107 "movl (%%eax), %%esi\n"
108 "movl 4(%%eax), %%edi\n"
109 "movss (%%ecx, %%esi, 8), %%xmm1\n" /* 2j */
110 "movss (%%ecx, %%edi, 8), %%xmm3\n" /* 2(j+1) */
115 "movaps (%%edx, %%esi, 8), %%xmm0\n" /* -c_j | -s_j | -s_j | c_j */
116 "movaps (%%edx, %%edi, 8), %%xmm2\n" /* -c_j+1 | -s_j+1 | -s_j+1 | c_j+1 */
121 "movss 1020(%%ecx, %%esi, 4), %%xmm4\n" /* 255-2j */
123 "movss 1020(%%ecx, %%edi, 4), %%xmm5\n" /* 255-2(j+1) */
125 "shufps $0, %%xmm1, %%xmm4\n" /* 2j | 2j | 255-2j | 255-2j */
126 "shufps $0, %%xmm3, %%xmm5\n" /* 2(j+1) | 2(j+1) | 255-2(j+1) | 255-2(j+1) */
127 "mulps %%xmm4, %%xmm0\n"
128 "mulps %%xmm5, %%xmm2\n"
129 "movhlps %%xmm0, %%xmm1\n"
130 "movhlps %%xmm2, %%xmm3\n"
132 "addps %%xmm1, %%xmm0\n"
133 "addps %%xmm3, %%xmm2\n"
134 "movlhps %%xmm2, %%xmm0\n"
136 "movaps %%xmm0, -16(%%ebx)\n"
150 : "a" (pmt), "c" (data), "d" (xcos_sin_sse), "D" (buf));
154 static void imdct512_post_ifft_twiddle_sse (complex_t *buf, float *xcos_sin_sse)
156 __asm__ __volatile__ (
159 "movl $32, %%ebx\n" /* loop counter */
163 "movaps (%%eax), %%xmm0\n" /* im1 | re1 | im0 | re0 */
165 "movaps (%%ecx), %%xmm2\n" /* -c | -s | -s | c */
166 "movhlps %%xmm0, %%xmm1\n" /* im1 | re1 */
167 "movaps 16(%%ecx), %%xmm3\n" /* -c1 | -s1 | -s1 | c1 */
169 "shufps $0x50, %%xmm0, %%xmm0\n" /* im0 | im0 | re0 | re0 */
170 "shufps $0x50, %%xmm1, %%xmm1\n" /* im1 | im1 | re1 | re1 */
172 "movaps 16(%%eax), %%xmm4\n" /* im3 | re3 | im2 | re2 */
174 "shufps $0x27, %%xmm2, %%xmm2\n" /* c | -s | -s | -c */
175 "movhlps %%xmm4, %%xmm5\n" /* im3 | re3 */
176 "shufps $0x27, %%xmm3, %%xmm3\n" /* c1 | -s1 | -s1 | -c1 */
178 "movaps 32(%%ecx), %%xmm6\n" /* -c2 | -s2 | -s2 | c2 */
179 "movaps 48(%%ecx), %%xmm7\n" /* -c3 | -s3 | -s3 | c3 */
181 "shufps $0x50, %%xmm4, %%xmm4\n" /* im2 | im2 | re2 | re2 */
182 "shufps $0x50, %%xmm5, %%xmm5\n" /* im3 | im3 | re3 | re3 */
184 "mulps %%xmm2, %%xmm0\n"
185 "mulps %%xmm3, %%xmm1\n"
187 "shufps $0x27, %%xmm6, %%xmm6\n" /* c2 | -s2 | -s2 | -c2 */
188 "shufps $0x27, %%xmm7, %%xmm7\n" /* c3 | -s3 | -s3 | -c3 */
190 "movhlps %%xmm0, %%xmm2\n"
191 "movhlps %%xmm1, %%xmm3\n"
193 "mulps %%xmm6, %%xmm4\n"
194 "mulps %%xmm7, %%xmm5\n"
196 "addps %%xmm2, %%xmm0\n"
197 "addps %%xmm3, %%xmm1\n"
199 "movhlps %%xmm4, %%xmm6\n"
200 "movhlps %%xmm5, %%xmm7\n"
202 "addps %%xmm6, %%xmm4\n"
203 "addps %%xmm7, %%xmm5\n"
205 "movlhps %%xmm1, %%xmm0\n"
206 "movlhps %%xmm5, %%xmm4\n"
208 "movaps %%xmm0, (%%eax)\n"
209 "movaps %%xmm4, 16(%%eax)\n"
217 : "a" (buf), "c" (xcos_sin_sse) );
220 static void imdct512_window_delay_sse (complex_t *buf, float *data_ptr, float *window_prt, float *delay_prt)
222 __asm__ __volatile__ (
233 "movl %%esi, %%ebp\n" /* buf */
234 "movl $16, %%ebx\n" /* loop count */
235 "leal 516(%%ebp), %%esi\n" /* buf[64].im */
236 "leal 504(%%ebp), %%edi\n" /* buf[63].re */
239 ".first_128_samples:\n"
240 "movss (%%esi), %%xmm0\n"
241 "movss 8(%%esi), %%xmm2\n"
242 "movss (%%edi), %%xmm1\n"
243 "movss -8(%%edi), %%xmm3\n"
245 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
246 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
248 "movaps (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
249 "movaps (%%ecx), %%xmm5\n" /* d3 | d2 | d1 | d0 */
250 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
252 "movss 16(%%esi), %%xmm6\n" /* im2 */
253 "movss 24(%%esi), %%xmm7\n" /* im3 */
254 "subps %%xmm1, %%xmm0\n" /* -re1 | im1 | -re0 | im0 */
255 "movss -16(%%edi), %%xmm2\n" /* re2 */
256 "movss -24(%%edi), %%xmm3\n" /* re3 */
257 "mulps %%xmm4, %%xmm0\n"
258 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
259 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
260 "addps %%xmm5, %%xmm0\n"
261 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
262 "movaps 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
263 "movaps 16(%%ecx), %%xmm5\n" /* d7 | d6 | d5 | d4 */
264 "subps %%xmm2, %%xmm6\n" /* -re3 | im3 | -re2 | im2 */
266 "movaps %%xmm0, (%%eax)\n"
268 "mulps %%xmm4, %%xmm6\n"
271 "addps %%xmm5, %%xmm6\n"
273 "movaps %%xmm6, -16(%%eax)\n"
275 "jnz .first_128_samples\n"
277 "movl %%ebp, %%esi\n" /* buf[0].re */
278 "movl $16, %%ebx\n" /* loop count */
279 "leal 1020(%%ebp), %%edi\n" /* buf[127].im */
282 ".second_128_samples:\n"
283 "movss (%%esi), %%xmm0\n" /* buf[i].re */
284 "movss 8(%%esi), %%xmm2\n" /* re1 */
285 "movss (%%edi), %%xmm1\n" /* buf[127-i].im */
286 "movss -8(%%edi), %%xmm3\n" /* im1 */
288 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
289 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im1 */
291 "movaps (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
292 "movaps (%%ecx), %%xmm5\n" /* d3 | d2 | d1 | d0 */
294 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
295 "movss 16(%%esi), %%xmm6\n" /* re2 */
296 "movss 24(%%esi), %%xmm7\n" /* re3 */
297 "movss -16(%%edi), %%xmm2\n" /* im2 */
298 "movss -24(%%edi), %%xmm3\n" /* im3 */
299 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
300 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
301 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
302 "mulps %%xmm4, %%xmm0\n"
303 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
304 "movaps 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
306 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
307 "addps %%xmm5, %%xmm0\n"
308 "mulps %%xmm4, %%xmm6\n"
310 "movaps 16(%%ecx), %%xmm5\n" /* d7 | d6 | d5 | d4 */
311 "movaps %%xmm0, (%%eax)\n"
312 "addps %%xmm5, %%xmm6\n"
316 "movaps %%xmm6, -16(%%eax)\n"
318 "jnz .second_128_samples\n"
320 "leal 512(%%ebp), %%esi\n" /* buf[64].re */
321 "leal 508(%%ebp), %%edi\n" /* buf[63].im */
322 "movl $16, %%ebx\n" /* loop count */
323 "addl $-1024, %%ecx\n" /* delay */
326 ".first_128_delay:\n"
327 "movss (%%esi), %%xmm0\n"
328 "movss 8(%%esi), %%xmm2\n"
329 "movss (%%edi), %%xmm1\n"
330 "movss -8(%%edi), %%xmm3\n"
332 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
333 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im0 */
335 "movaps -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
336 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
337 "movss 16(%%esi), %%xmm6\n" /* re2 */
338 "movss 24(%%esi), %%xmm7\n" /* re3 */
339 "movss -16(%%edi), %%xmm2\n" /* im2 */
340 "movss -24(%%edi), %%xmm3\n" /* im3 */
341 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
343 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
344 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
345 "mulps %%xmm4, %%xmm0\n"
346 "movaps (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
347 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
348 "movaps %%xmm0, (%%ecx)\n"
350 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
352 "mulps %%xmm5, %%xmm6\n"
354 "movaps %%xmm6, -16(%%ecx)\n"
356 "jnz .first_128_delay\n"
358 "leal 4(%%ebp), %%esi\n" /* buf[0].im */
359 "leal 1016(%%ebp), %%edi\n" /* buf[127].re */
360 "movl $16, %%ebx\n" /* loop count */
363 ".second_128_delay:\n"
364 "movss (%%esi), %%xmm0\n"
365 "movss 8(%%esi), %%xmm2\n"
366 "movss (%%edi), %%xmm1\n"
367 "movss -8(%%edi), %%xmm3\n"
369 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
370 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
372 "movaps -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
373 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
374 "movss 16(%%esi), %%xmm6\n" /* im2 */
375 "movss 24(%%esi), %%xmm7\n" /* im3 */
376 "movss -16(%%edi), %%xmm2\n" /* re2 */
377 "movss -24(%%edi), %%xmm3\n" /* re3 */
378 "subps %%xmm0, %%xmm1\n" /* re1 | -im1 | re0 | -im0 */
380 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
381 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
382 "mulps %%xmm4, %%xmm1\n"
383 "movaps (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
384 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
385 "movaps %%xmm1, (%%ecx)\n"
387 "subps %%xmm6, %%xmm2\n" /* re | -im3 | re | -im2 */
389 "mulps %%xmm5, %%xmm2\n"
391 "movaps %%xmm2, -16(%%ecx)\n"
393 "jnz .second_128_delay\n"
402 : "=S" (buf), "=a" (data_ptr), "=c" (delay_prt), "=d" (window_prt)
403 : "S" (buf), "a" (data_ptr), "c" (delay_prt), "d" (window_prt));
407 static void imdct512_window_delay_nol_sse( complex_t *buf, float *data_ptr,
408 float *window_prt, float *delay_prt )
410 __asm__ __volatile__ (
421 "movl %%esi, %%ebp\n" /* buf */
422 "movl $16, %%ebx\n" /* loop count */
423 "leal 516(%%ebp), %%esi\n" /* buf[64].im */
424 "leal 504(%%ebp), %%edi\n" /* buf[63].re */
427 ".first_128_sample:\n"
428 "movss (%%esi), %%xmm0\n"
429 "movss 8(%%esi), %%xmm2\n"
430 "movss (%%edi), %%xmm1\n"
431 "movss -8(%%edi), %%xmm3\n"
433 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
434 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
436 "movaps (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
437 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
439 "movss 16(%%esi), %%xmm6\n" /* im2 */
440 "movss 24(%%esi), %%xmm7\n" /* im3 */
441 "subps %%xmm1, %%xmm0\n" /* -re1 | im1 | -re0 | im0 */
442 "movss -16(%%edi), %%xmm2\n" /* re2 */
443 "movss -24(%%edi), %%xmm3\n" /* re3 */
444 "mulps %%xmm4, %%xmm0\n"
445 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
446 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
447 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
448 "movaps 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
449 "subps %%xmm2, %%xmm6\n" /* -re3 | im3 | -re2 | im2 */
451 "movaps %%xmm0, (%%eax)\n"
452 "mulps %%xmm4, %%xmm6\n"
456 "movaps %%xmm6, -16(%%eax)\n"
458 "jnz .first_128_sample\n"
460 "movl %%ebp, %%esi\n" /* buf[0].re */
461 "movl $16, %%ebx\n" /* loop count */
462 "leal 1020(%%ebp), %%edi\n" /* buf[127].im */
465 ".second_128_sample:\n"
466 "movss (%%esi), %%xmm0\n" /* buf[i].re */
467 "movss 8(%%esi), %%xmm2\n" /* re1 */
468 "movss (%%edi), %%xmm1\n" /* buf[127-i].im */
469 "movss -8(%%edi), %%xmm3\n" /* im1 */
471 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
472 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im1 */
474 "movaps (%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
476 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
477 "movss 16(%%esi), %%xmm6\n" /* re2 */
478 "movss 24(%%esi), %%xmm7\n" /* re3 */
479 "movss -16(%%edi), %%xmm2\n" /* im2 */
480 "movss -24(%%edi), %%xmm3\n" /* im3 */
481 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
482 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
483 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
484 "mulps %%xmm4, %%xmm0\n"
485 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
486 "movaps 16(%%edx), %%xmm4\n" /* w7 | w6 | w5 | w4 */
488 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
489 "mulps %%xmm4, %%xmm6\n"
491 "movaps %%xmm0, (%%eax)\n"
494 "movaps %%xmm6, -16(%%eax)\n"
496 "jnz .second_128_sample\n"
498 "leal 512(%%ebp), %%esi\n" /* buf[64].re */
499 "leal 508(%%ebp), %%edi\n" /* buf[63].im */
500 "movl $16, %%ebx\n" /* loop count */
503 ".first_128_delays:\n"
504 "movss (%%esi), %%xmm0\n"
505 "movss 8(%%esi), %%xmm2\n"
506 "movss (%%edi), %%xmm1\n"
507 "movss -8(%%edi), %%xmm3\n"
509 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | re1 | 0.0 | re0 */
510 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | im1 | 0.0 | im0 */
512 "movaps -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
513 "shufps $0xb1, %%xmm1, %%xmm1\n"/* im1 | 0.0 | im0 | 0.0 */
514 "movss 16(%%esi), %%xmm6\n" /* re2 */
515 "movss 24(%%esi), %%xmm7\n" /* re3 */
516 "movss -16(%%edi), %%xmm2\n" /* im2 */
517 "movss -24(%%edi), %%xmm3\n" /* im3 */
518 "subps %%xmm1, %%xmm0\n" /* -im1 | re1 | -im0 | re0 */
520 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | re3 | 0.0 | re2 */
521 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | im3 | 0.0 | im2 */
522 "mulps %%xmm4, %%xmm0\n"
523 "movaps (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
524 "shufps $0xb1, %%xmm2, %%xmm2\n"/* im3 | 0.0 | im2 | 0.0 */
525 "movaps %%xmm0, (%%ecx)\n"
527 "subps %%xmm2, %%xmm6\n" /* -im3 | re3 | -im2 | re2 */
529 "mulps %%xmm5, %%xmm6\n"
531 "movaps %%xmm6, -16(%%ecx)\n"
533 "jnz .first_128_delays\n"
535 "leal 4(%%ebp), %%esi\n" /* buf[0].im */
536 "leal 1016(%%ebp), %%edi\n" /* buf[127].re */
537 "movl $16, %%ebx\n" /* loop count */
540 ".second_128_delays:\n"
541 "movss (%%esi), %%xmm0\n"
542 "movss 8(%%esi), %%xmm2\n"
543 "movss (%%edi), %%xmm1\n"
544 "movss -8(%%edi), %%xmm3\n"
546 "movlhps %%xmm2, %%xmm0\n" /* 0.0 | im1 | 0.0 | im0 */
547 "movlhps %%xmm3, %%xmm1\n" /* 0.0 | re1 | 0.0 | re0 */
549 "movaps -16(%%edx), %%xmm4\n" /* w3 | w2 | w1 | w0 */
550 "shufps $0xb1, %%xmm1, %%xmm1\n"/* re1 | 0.0 | re0 | 0.0 */
551 "movss 16(%%esi), %%xmm6\n" /* im2 */
552 "movss 24(%%esi), %%xmm7\n" /* im3 */
553 "movss -16(%%edi), %%xmm2\n" /* re2 */
554 "movss -24(%%edi), %%xmm3\n" /* re3 */
555 "subps %%xmm0, %%xmm1\n" /* re1 | -im1 | re0 | -im0 */
557 "movlhps %%xmm7, %%xmm6\n" /* 0.0 | im3 | 0.0 | im2 */
558 "movlhps %%xmm3, %%xmm2\n" /* 0.0 | re3 | 0.0 | re2 */
559 "mulps %%xmm4, %%xmm1\n"
560 "movaps (%%edx), %%xmm5\n" /* w7 | w6 | w5 | w4 */
561 "shufps $0xb1, %%xmm2, %%xmm2\n"/* re3 | 0.0 | re2 | 0.0 */
562 "movaps %%xmm1, (%%ecx)\n"
564 "subps %%xmm6, %%xmm2\n" /* re | -im3 | re | -im2 */
566 "mulps %%xmm5, %%xmm2\n"
568 "movaps %%xmm2, -16(%%ecx)\n"
570 "jnz .second_128_delays\n"
579 : "=S" (buf), "=a" (data_ptr), "=c" (delay_prt), "=d" (window_prt)
580 : "S" (buf), "a" (data_ptr), "c" (delay_prt), "d" (window_prt));