summaryrefslogtreecommitdiffstats
path: root/mp3lib/sr1.c
diff options
context:
space:
mode:
authorzuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-08 14:38:25 +0000
committerzuxy <zuxy@b3059339-0415-0410-9bf9-f77b7e298cf2>2007-06-08 14:38:25 +0000
commitdd053ddd67f28af122189a8a11c32637061d35c5 (patch)
tree528672c2ca37338d8b24fba7edc49944ab4f0242 /mp3lib/sr1.c
parentc8e819bb7c9402d271f88c180ca741b5fd13f3fd (diff)
downloadmpv-dd053ddd67f28af122189a8a11c32637061d35c5.tar.bz2
mpv-dd053ddd67f28af122189a8a11c32637061d35c5.tar.xz
Enable SIMD optmizations for mp3lib on AMD64
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@23515 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'mp3lib/sr1.c')
-rw-r--r--mp3lib/sr1.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/mp3lib/sr1.c b/mp3lib/sr1.c
index 9b607d0bfd..6f098ba9be 100644
--- a/mp3lib/sr1.c
+++ b/mp3lib/sr1.c
@@ -32,8 +32,10 @@
#include "libvo/fastmemcpy.h"
-#ifdef ARCH_X86_32
-#define CAN_COMPILE_X86_ASM
+#ifdef ARCH_X86_64
+// 3DNow! and 3DNow!Ext routines don't compile under AMD64
+#undef HAVE_3DNOW
+#undef HAVE_3DNOWEX
#endif
//static FILE* mp3_file=NULL;
@@ -137,7 +139,7 @@ LOCAL unsigned int getbits_fast(short number_of_bits)
// if(MP3_frames>=7741) printf("getbits_fast: bits=%d bitsleft=%d wordptr=%x\n",number_of_bits,bitsleft,wordpointer);
if((bitsleft-=number_of_bits)<0) return 0;
if(!number_of_bits) return 0;
-#if defined(CAN_COMPILE_X86_ASM)
+#ifdef ARCH_X86
rval = bswap_16(*((uint16_t *)wordpointer));
#else
/*
@@ -180,7 +182,7 @@ LOCAL void set_pointer(int backstep)
LOCAL int stream_head_read(unsigned char *hbuf,uint32_t *newhead){
if(mp3_read(hbuf,4) != 4) return FALSE;
-#if defined(CAN_COMPILE_X86_ASM)
+#ifdef ARCH_X86
*newhead = bswap_32(*((uint32_t*)hbuf));
#else
/*
@@ -415,8 +417,6 @@ void MP3_Init(){
make_decode_tables(outscale);
-#ifdef CAN_COMPILE_X86_ASM
-
#ifdef HAVE_MMX
if (gCpuCaps.hasMMX)
{
@@ -451,6 +451,7 @@ void MP3_Init(){
}
else
#endif
+#ifdef ARCH_X86_32
#ifdef HAVE_MMX
if (gCpuCaps.hasMMX)
{
@@ -465,7 +466,7 @@ void MP3_Init(){
mp_msg(MSGT_DECAUDIO,MSGL_V,"mp3lib: using Pentium optimized decore!\n");
}
else
-#endif
+#endif /* ARCH_X86_32 */
#ifdef HAVE_ALTIVEC
if (gCpuCaps.hasAltiVec)
{