[Mplayer-cvslog] CVS: main/liba52 resample.c,1.4,1.5
Michael Niedermayer
michael at mplayer.dev.hu
Tue Dec 18 02:46:43 CET 2001
Update of /cvsroot/mplayer/main/liba52
In directory mplayer:/var/tmp.root/cvs-serv30720
Modified Files:
resample.c
Log Message:
mmx opt
Index: resample.c
===================================================================
RCS file: /cvsroot/mplayer/main/liba52/resample.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- resample.c 18 Dec 2001 00:56:08 -0000 1.4
+++ resample.c 18 Dec 2001 01:46:41 -0000 1.5
@@ -294,6 +294,51 @@
}
break;
case A52_3F2R | A52_LFE:
+#ifdef HAVE_MMX
+ asm volatile(
+ "movl $-1024, %%esi \n\t"
+ "movq magicF2W, %%mm7 \n\t"
+// "pxor %%mm6, %%mm6 \n\t"
+ "1: \n\t"
+ "movq 1024(%1, %%esi), %%mm0 \n\t"
+ "movq 3072(%1, %%esi), %%mm1 \n\t"
+ "movq 4096(%1, %%esi), %%mm2 \n\t"
+ "movq 5120(%1, %%esi), %%mm3 \n\t"
+ "movq 2048(%1, %%esi), %%mm4 \n\t"
+ "movq (%1, %%esi), %%mm5 \n\t"
+ "psubd %%mm7, %%mm0 \n\t"
+ "psubd %%mm7, %%mm1 \n\t"
+ "psubd %%mm7, %%mm2 \n\t"
+ "psubd %%mm7, %%mm3 \n\t"
+ "psubd %%mm7, %%mm4 \n\t"
+ "psubd %%mm7, %%mm5 \n\t"
+ "leal (%%esi, %%esi, 2), %%edi \n\t"
+
+ "packssdw %%mm2, %%mm0 \n\t" // CcAa
+ "packssdw %%mm3, %%mm1 \n\t" // DdBb
+ "packssdw %%mm4, %%mm4 \n\t" // EeEe
+ "packssdw %%mm5, %%mm5 \n\t" // FfFf
+ "movq %%mm0, %%mm2 \n\t" // CcAa
+ "punpcklwd %%mm1, %%mm0 \n\t" // BAba
+ "punpckhwd %%mm1, %%mm2 \n\t" // DCdc
+ "punpcklwd %%mm5, %%mm4 \n\t" // FEfe
+ "movq %%mm0, %%mm1 \n\t" // BAba
+ "movq %%mm4, %%mm3 \n\t" // FEfe
+ "punpckldq %%mm2, %%mm0 \n\t" // dcba
+ "punpckhdq %%mm1, %%mm1 \n\t" // BABA
+ "punpckldq %%mm1, %%mm4 \n\t" // BAfe
+ "punpckhdq %%mm3, %%mm2 \n\t" // FEDC
+
+ "movq %%mm0, (%0, %%edi) \n\t"
+ "movq %%mm4, 8(%0, %%edi) \n\t"
+ "movq %%mm2, 16(%0, %%edi) \n\t"
+ "addl $8, %%esi \n\t"
+ " jnz 1b \n\t"
+ "emms \n\t"
+ :: "r" (s16+1536), "r" (f+256)
+ :"%esi", "%edi", "memory"
+ );
+#else
for (i = 0; i < 256; i++) {
s16[6*i] = convert (f[i+256]);
s16[6*i+1] = convert (f[i+768]);
@@ -302,6 +347,7 @@
s16[6*i+4] = convert (f[i+512]);
s16[6*i+5] = convert (f[i]);
}
+#endif
break;
}
return chans*256;
More information about the MPlayer-cvslog
mailing list