comparison liba52/resample_mmx.c @ 4247:2dbd637ffe05

mangle for win32 in liba52 (includes dummy mangle.h pointing to the one in main)
author atmos4
date Sat, 19 Jan 2002 05:12:34 +0000
parents ef32c8bdee81
children 9fc45fe0d444
comparison
equal deleted inserted replaced
4246:3f677202418b 4247:2dbd637ffe05
15 static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){ 15 static int a52_resample_MONO_to_5_MMX(float * _f, int16_t * s16){
16 int i; 16 int i;
17 int32_t * f = (int32_t *) _f; 17 int32_t * f = (int32_t *) _f;
18 asm volatile( 18 asm volatile(
19 "movl $-512, %%esi \n\t" 19 "movl $-512, %%esi \n\t"
20 "movq magicF2W, %%mm7 \n\t" 20 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
21 "movq wm1100, %%mm3 \n\t" 21 "movq "MANGLE(wm1100)", %%mm3 \n\t"
22 "movq wm0101, %%mm4 \n\t" 22 "movq "MANGLE(wm0101)", %%mm4 \n\t"
23 "movq wm1010, %%mm5 \n\t" 23 "movq "MANGLE(wm1010)", %%mm5 \n\t"
24 "pxor %%mm6, %%mm6 \n\t" 24 "pxor %%mm6, %%mm6 \n\t"
25 "1: \n\t" 25 "1: \n\t"
26 "movq (%1, %%esi, 2), %%mm0 \n\t" 26 "movq (%1, %%esi, 2), %%mm0 \n\t"
27 "movq 8(%1, %%esi, 2), %%mm1 \n\t" 27 "movq 8(%1, %%esi, 2), %%mm1 \n\t"
28 "leal (%%esi, %%esi, 4), %%edi \n\t" 28 "leal (%%esi, %%esi, 4), %%edi \n\t"
71 :: "r" (s16+512), "r" (f+256) 71 :: "r" (s16+512), "r" (f+256)
72 :"%esi", "memory" 72 :"%esi", "memory"
73 );*/ 73 );*/
74 asm volatile( 74 asm volatile(
75 "movl $-1024, %%esi \n\t" 75 "movl $-1024, %%esi \n\t"
76 "movq magicF2W, %%mm7 \n\t" 76 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
77 "1: \n\t" 77 "1: \n\t"
78 "movq (%1, %%esi), %%mm0 \n\t" 78 "movq (%1, %%esi), %%mm0 \n\t"
79 "movq 8(%1, %%esi), %%mm1 \n\t" 79 "movq 8(%1, %%esi), %%mm1 \n\t"
80 "movq 1024(%1, %%esi), %%mm2 \n\t" 80 "movq 1024(%1, %%esi), %%mm2 \n\t"
81 "movq 1032(%1, %%esi), %%mm3 \n\t" 81 "movq 1032(%1, %%esi), %%mm3 \n\t"
102 static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){ 102 static int a52_resample_3F_to_5_MMX(float * _f, int16_t * s16){
103 int i; 103 int i;
104 int32_t * f = (int32_t *) _f; 104 int32_t * f = (int32_t *) _f;
105 asm volatile( 105 asm volatile(
106 "movl $-1024, %%esi \n\t" 106 "movl $-1024, %%esi \n\t"
107 "movq magicF2W, %%mm7 \n\t" 107 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
108 "pxor %%mm6, %%mm6 \n\t" 108 "pxor %%mm6, %%mm6 \n\t"
109 "movq %%mm7, %%mm5 \n\t" 109 "movq %%mm7, %%mm5 \n\t"
110 "punpckldq %%mm6, %%mm5 \n\t" 110 "punpckldq %%mm6, %%mm5 \n\t"
111 "1: \n\t" 111 "1: \n\t"
112 "movd (%1, %%esi), %%mm0 \n\t" 112 "movd (%1, %%esi), %%mm0 \n\t"
158 static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){ 158 static int a52_resample_2F_2R_to_4_MMX(float * _f, int16_t * s16){
159 int i; 159 int i;
160 int32_t * f = (int32_t *) _f; 160 int32_t * f = (int32_t *) _f;
161 asm volatile( 161 asm volatile(
162 "movl $-1024, %%esi \n\t" 162 "movl $-1024, %%esi \n\t"
163 "movq magicF2W, %%mm7 \n\t" 163 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
164 "1: \n\t" 164 "1: \n\t"
165 "movq (%1, %%esi), %%mm0 \n\t" 165 "movq (%1, %%esi), %%mm0 \n\t"
166 "movq 8(%1, %%esi), %%mm1 \n\t" 166 "movq 8(%1, %%esi), %%mm1 \n\t"
167 "movq 1024(%1, %%esi), %%mm2 \n\t" 167 "movq 1024(%1, %%esi), %%mm2 \n\t"
168 "movq 1032(%1, %%esi), %%mm3 \n\t" 168 "movq 1032(%1, %%esi), %%mm3 \n\t"
210 static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){ 210 static int a52_resample_3F_2R_to_5_MMX(float * _f, int16_t * s16){
211 int i; 211 int i;
212 int32_t * f = (int32_t *) _f; 212 int32_t * f = (int32_t *) _f;
213 asm volatile( 213 asm volatile(
214 "movl $-1024, %%esi \n\t" 214 "movl $-1024, %%esi \n\t"
215 "movq magicF2W, %%mm7 \n\t" 215 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
216 "1: \n\t" 216 "1: \n\t"
217 "movd (%1, %%esi), %%mm0 \n\t" 217 "movd (%1, %%esi), %%mm0 \n\t"
218 "punpckldq 2048(%1, %%esi), %%mm0\n\t" 218 "punpckldq 2048(%1, %%esi), %%mm0\n\t"
219 "movd 3072(%1, %%esi), %%mm1 \n\t" 219 "movd 3072(%1, %%esi), %%mm1 \n\t"
220 "punpckldq 4096(%1, %%esi), %%mm1\n\t" 220 "punpckldq 4096(%1, %%esi), %%mm1\n\t"
270 static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){ 270 static int a52_resample_MONO_LFE_to_6_MMX(float * _f, int16_t * s16){
271 int i; 271 int i;
272 int32_t * f = (int32_t *) _f; 272 int32_t * f = (int32_t *) _f;
273 asm volatile( 273 asm volatile(
274 "movl $-1024, %%esi \n\t" 274 "movl $-1024, %%esi \n\t"
275 "movq magicF2W, %%mm7 \n\t" 275 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
276 "pxor %%mm6, %%mm6 \n\t" 276 "pxor %%mm6, %%mm6 \n\t"
277 "1: \n\t" 277 "1: \n\t"
278 "movq 1024(%1, %%esi), %%mm0 \n\t" 278 "movq 1024(%1, %%esi), %%mm0 \n\t"
279 "movq 1032(%1, %%esi), %%mm1 \n\t" 279 "movq 1032(%1, %%esi), %%mm1 \n\t"
280 "movq (%1, %%esi), %%mm2 \n\t" 280 "movq (%1, %%esi), %%mm2 \n\t"
311 static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){ 311 static int a52_resample_STEREO_LFE_to_6_MMX(float * _f, int16_t * s16){
312 int i; 312 int i;
313 int32_t * f = (int32_t *) _f; 313 int32_t * f = (int32_t *) _f;
314 asm volatile( 314 asm volatile(
315 "movl $-1024, %%esi \n\t" 315 "movl $-1024, %%esi \n\t"
316 "movq magicF2W, %%mm7 \n\t" 316 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
317 "pxor %%mm6, %%mm6 \n\t" 317 "pxor %%mm6, %%mm6 \n\t"
318 "1: \n\t" 318 "1: \n\t"
319 "movq 1024(%1, %%esi), %%mm0 \n\t" 319 "movq 1024(%1, %%esi), %%mm0 \n\t"
320 "movq 2048(%1, %%esi), %%mm1 \n\t" 320 "movq 2048(%1, %%esi), %%mm1 \n\t"
321 "movq (%1, %%esi), %%mm5 \n\t" 321 "movq (%1, %%esi), %%mm5 \n\t"
350 static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){ 350 static int a52_resample_3F_LFE_to_6_MMX(float * _f, int16_t * s16){
351 int i; 351 int i;
352 int32_t * f = (int32_t *) _f; 352 int32_t * f = (int32_t *) _f;
353 asm volatile( 353 asm volatile(
354 "movl $-1024, %%esi \n\t" 354 "movl $-1024, %%esi \n\t"
355 "movq magicF2W, %%mm7 \n\t" 355 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
356 "pxor %%mm6, %%mm6 \n\t" 356 "pxor %%mm6, %%mm6 \n\t"
357 "1: \n\t" 357 "1: \n\t"
358 "movq 1024(%1, %%esi), %%mm0 \n\t" 358 "movq 1024(%1, %%esi), %%mm0 \n\t"
359 "movq 3072(%1, %%esi), %%mm1 \n\t" 359 "movq 3072(%1, %%esi), %%mm1 \n\t"
360 "movq 2048(%1, %%esi), %%mm4 \n\t" 360 "movq 2048(%1, %%esi), %%mm4 \n\t"
391 static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ 391 static int a52_resample_2F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
392 int i; 392 int i;
393 int32_t * f = (int32_t *) _f; 393 int32_t * f = (int32_t *) _f;
394 asm volatile( 394 asm volatile(
395 "movl $-1024, %%esi \n\t" 395 "movl $-1024, %%esi \n\t"
396 "movq magicF2W, %%mm7 \n\t" 396 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
397 // "pxor %%mm6, %%mm6 \n\t" 397 // "pxor %%mm6, %%mm6 \n\t"
398 "1: \n\t" 398 "1: \n\t"
399 "movq 1024(%1, %%esi), %%mm0 \n\t" 399 "movq 1024(%1, %%esi), %%mm0 \n\t"
400 "movq 2048(%1, %%esi), %%mm1 \n\t" 400 "movq 2048(%1, %%esi), %%mm1 \n\t"
401 "movq 3072(%1, %%esi), %%mm2 \n\t" 401 "movq 3072(%1, %%esi), %%mm2 \n\t"
438 static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){ 438 static int a52_resample_3F_2R_LFE_to_6_MMX(float * _f, int16_t * s16){
439 int i; 439 int i;
440 int32_t * f = (int32_t *) _f; 440 int32_t * f = (int32_t *) _f;
441 asm volatile( 441 asm volatile(
442 "movl $-1024, %%esi \n\t" 442 "movl $-1024, %%esi \n\t"
443 "movq magicF2W, %%mm7 \n\t" 443 "movq "MANGLE(magicF2W)", %%mm7 \n\t"
444 // "pxor %%mm6, %%mm6 \n\t" 444 // "pxor %%mm6, %%mm6 \n\t"
445 "1: \n\t" 445 "1: \n\t"
446 "movq 1024(%1, %%esi), %%mm0 \n\t" 446 "movq 1024(%1, %%esi), %%mm0 \n\t"
447 "movq 3072(%1, %%esi), %%mm1 \n\t" 447 "movq 3072(%1, %%esi), %%mm1 \n\t"
448 "movq 4096(%1, %%esi), %%mm2 \n\t" 448 "movq 4096(%1, %%esi), %%mm2 \n\t"