summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile24
-rw-r--r--command.c4
-rwxr-xr-xconfigure19
-rw-r--r--cpudetect.c61
-rw-r--r--etc/codecs.conf1
-rw-r--r--get_path.c6
-rw-r--r--input/lirc.c30
-rw-r--r--liba52/bitstream.h2
-rw-r--r--liba52/imdct.c18
-rw-r--r--liba52/imdct_3dnow.h28
-rw-r--r--liba52/liba52_changes.diff10
-rw-r--r--liba52/srfftp_3dnow.h4
-rw-r--r--libaf/af.h2
-rw-r--r--libaf/af_format.c13
-rw-r--r--libaf/af_format.h2
-rw-r--r--libao2/ao_alsa.c42
-rw-r--r--libao2/ao_alsa5.c26
-rw-r--r--libao2/ao_dxr2.c20
-rw-r--r--libao2/ao_esd.c3
-rw-r--r--libao2/ao_mpegpes.c20
-rw-r--r--libao2/ao_nas.c31
-rw-r--r--libao2/ao_null.c20
-rw-r--r--libao2/ao_oss.c20
-rw-r--r--libao2/ao_pcm.c20
-rw-r--r--libao2/ao_sgi.c25
-rw-r--r--libao2/ao_sun.c20
-rw-r--r--libao2/audio_out.c18
-rw-r--r--libao2/audio_out.h18
-rw-r--r--libao2/audio_out_internal.h18
-rw-r--r--libass/ass_render.c4
-rw-r--r--libfaad2/common.h6
-rw-r--r--libfaad2/local_changes.diff9
-rw-r--r--libmpcodecs/ae_lame.c1
-rw-r--r--libmpcodecs/ve_lavc.c4
-rw-r--r--libmpcodecs/vf_filmdint.c4
-rw-r--r--libmpcodecs/vf_tfields.c4
-rw-r--r--libmpdemux/demux_xmms.c2
-rw-r--r--libmpdemux/demuxer.h4
-rw-r--r--libmpeg2/libmpeg2_changes.diff2
-rw-r--r--libmpeg2/motion_comp.c2
-rw-r--r--libvo/aclib.c32
-rw-r--r--libvo/aclib_template.c8
-rw-r--r--libvo/fastmemcpy.h2
-rw-r--r--libvo/osd.c40
-rw-r--r--libvo/osd_template.c12
-rw-r--r--libvo/video_out.c2
-rw-r--r--libvo/vo_direct3d.c156
-rw-r--r--loader/win32.c1
-rw-r--r--mp3lib/decod386.c2
-rw-r--r--mp3lib/sr1.c12
-rw-r--r--mpcommon.c24
-rwxr-xr-xversion.sh8
-rw-r--r--vidix/mga_vid.c12
53 files changed, 579 insertions, 299 deletions
diff --git a/Makefile b/Makefile
index 60613190b2..c1525b0e76 100644
--- a/Makefile
+++ b/Makefile
@@ -389,10 +389,10 @@ SRCS_COMMON-$(MACOSX_FINDER) += osdep/macosx_finder_args.c
SRCS_COMMON-$(MNG) += libmpdemux/demux_mng.c
SRCS_COMMON-$(MP3LIB) += libmpcodecs/ad_mp3lib.c mp3lib/sr1.c
SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32) += mp3lib/decode_i586.c
-SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOW) += mp3lib/dct36_3dnow.c \
- mp3lib/dct64_3dnow.c
-SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_3DNOWEXT) += mp3lib/dct36_k7.c \
- mp3lib/dct64_k7.c
+SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_AMD3DNOW) += mp3lib/dct36_3dnow.c \
+ mp3lib/dct64_3dnow.c
+SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_AMD3DNOWEXT) += mp3lib/dct36_k7.c \
+ mp3lib/dct64_k7.c
SRCS_COMMON-$(MP3LIB)-$(ARCH_X86_32)-$(HAVE_MMX) += mp3lib/dct64_mmx.c
SRCS_COMMON-$(MP3LIB)-$(HAVE_ALTIVEC) += mp3lib/dct64_altivec.c
SRCS_COMMON-$(MP3LIB)-$(HAVE_MMX) += mp3lib/decode_mmx.c
@@ -842,8 +842,8 @@ help_mp.h: help/help_mp-en.h $(HELP_FILE)
ifeq ($(wildcard .svn/entries),.svn/entries)
version.h: .svn/entries
endif
-version.h:
- ./version.sh `$(CC) -dumpversion`
+version.h: version.sh
+ ./$< `$(CC) -dumpversion`
%(EXESUF): %.c
@@ -1032,13 +1032,13 @@ TOOLS/netstream$(EXESUF) TOOLS/vivodump$(EXESUF): $(subst mplayer.o,mplayer-noma
fastmemcpybench: TOOLS/fastmemcpybench.c
$(CC) $(CFLAGS) $< -o TOOLS/fastmem-mmx$(EXESUF) -DNAME=\"mmx\" -DHAVE_MMX
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_3DNOW
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k6$(EXESUF) -DNAME=\"k6\ \" -DHAVE_MMX -DHAVE_AMD3DNOW
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem-k7$(EXESUF) -DNAME=\"k7\ \" -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem-sse$(EXESUF) -DNAME=\"sse\" -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
$(CC) $(CFLAGS) $< -o TOOLS/fastmem2-mmx$(EXESUF) -DNAME=\"mga-mmx\" -DCONFIG_MGA -DHAVE_MMX
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_3DNOW -DHAVE_MMX2
- $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k6$(EXESUF) -DNAME=\"mga-k6\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-k7$(EXESUF) -DNAME=\"mga-k7\ \" -DCONFIG_MGA -DHAVE_MMX -DHAVE_AMD3DNOW -DHAVE_MMX2
+ $(CC) $(CFLAGS) $< -o TOOLS/fastmem2-sse$(EXESUF) -DNAME=\"mga-sse\" -DCONFIG_MGA -DHAVE_MMX -DHAVE_SSE -DHAVE_MMX2
REAL_SRCS = $(wildcard TOOLS/realcodecs/*.c)
REAL_TARGETS = $(REAL_SRCS:.c=.so.6.0)
diff --git a/command.c b/command.c
index 6487a8b346..caf1ca5037 100644
--- a/command.c
+++ b/command.c
@@ -2492,6 +2492,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_SWITCH_RATIO:
+ if (!sh_video)
+ break;
if (cmd->nargs == 0 || cmd->args[0].v.f == -1)
opts->movie_aspect = (float) sh_video->disp_w / sh_video->disp_h;
else
@@ -2996,6 +2998,8 @@ void run_command(MPContext *mpctx, mp_cmd_t *cmd)
break;
case MP_CMD_VF_CHANGE_RECTANGLE:
+ if (!sh_video)
+ break;
set_rectangle(sh_video, cmd->args[0].v.i, cmd->args[1].v.i);
break;
diff --git a/configure b/configure
index dbea3fbb30..6f7edc9363 100755
--- a/configure
+++ b/configure
@@ -2617,12 +2617,12 @@ EOF
echores "$_iwmmxt"
fi
-_cpuexts_all='ALTIVEC BSWAP MMX MMX2 3DNOW 3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI'
+_cpuexts_all='ALTIVEC BSWAP MMX MMX2 AMD3DNOW AMD3DNOWEXT SSE SSE2 SSSE3 FAST_CMOV CMOV PLD ARMV5TE ARMV6 ARMV6T2 ARMVFP IWMMXT MMI VIS MVI'
test "$_altivec" = yes && _cpuexts="ALTIVEC $_cpuexts"
test "$_mmx" = yes && _cpuexts="MMX $_cpuexts"
test "$_mmxext" = yes && _cpuexts="MMX2 $_cpuexts"
-test "$_3dnow" = yes && _cpuexts="3DNOW $_cpuexts"
-test "$_3dnowext" = yes && _cpuexts="3DNOWEXT $_cpuexts"
+test "$_3dnow" = yes && _cpuexts="AMD3DNOW $_cpuexts"
+test "$_3dnowext" = yes && _cpuexts="AMD3DNOWEXT $_cpuexts"
test "$_sse" = yes && _cpuexts="SSE $_cpuexts"
test "$_sse2" = yes && _cpuexts="SSE2 $_cpuexts"
test "$_ssse3" = yes && _cpuexts="SSSE3 $_cpuexts"
@@ -4245,7 +4245,7 @@ if test "$_xvmc" = yes ; then
_vomodules="xvmc $_vomodules"
_res_comment="using $_xvmclib"
else
- _def_xvmc='#undef CONFIG_XVMC'
+ _def_xvmc='#define CONFIG_XVMC 0'
_novomodules="xvmc $_novomodules"
_libavdecoders=`echo $_libavdecoders | sed -e s/MPEG_XVMC_DECODER// `
fi
@@ -5632,7 +5632,7 @@ if test "$_dvdread_internal" = auto ; then
if (linux || freebsd || netbsd || openbsd || dragonfly || sunos || hpux) \
&& (test "$_dvd" = yes || test "$_cdrom" = yes || test "$_cdio" = yes || \
test "$_dvdio" = yes || test "$_bsdi_dvd" = yes) \
- || darwin || win32; then
+ || darwin || win32 || os2; then
_dvdread_internal=yes
_dvdread=yes
_inc_extra="$_inc_extra -Ilibdvdread4"
@@ -7898,6 +7898,7 @@ if test "$cc_vendor" = "gnu" ; then
cc_check -std=gnu99 && CFLAGS="-std=gnu99 $CFLAGS"
cc_check -Wno-pointer-sign && CFLAGS="-Wno-pointer-sign $CFLAGS"
cc_check -Wdisabled-optimization && CFLAGS="-Wdisabled-optimization $CFLAGS"
+ cc_check -Wundef && CFLAGS="-Wundef $CFLAGS"
else
CFLAGS="-D_ISOC99_SOURCE -D_BSD_SOURCE $CFLAGS"
fi
@@ -8169,6 +8170,7 @@ CONFIG_FFT=yes
CONFIG_FFT_MMX=$fft_mmx
CONFIG_GOLOMB=yes
CONFIG_MDCT=yes
+CONFIG_RDFT=yes
CONFIG_ENCODERS=yes
CONFIG_GPL=yes
@@ -8270,6 +8272,11 @@ $_def_fast_inttypes
/* libfaad2 + libdvdread */
#define STDC_HEADERS 1
#define HAVE_MEMCPY 1
+/* libfaad2 */
+#define HAVE_STRING_H 1
+#define HAVE_STRINGS_H 1
+#define HAVE_SYS_STAT_H 1
+#define HAVE_SYS_TYPES_H 1
/* libdvdread */
#define HAVE_UINTPTR_T 1
@@ -8599,6 +8606,7 @@ $_def_yasm
#define CONFIG_GPL 1
#define CONFIG_SMALL 0
+#define CONFIG_SWSCALE 1
#define CONFIG_GRAY 0
/* Some FFmpeg codecs depend on these. Enable them unconditionally for now. */
@@ -8606,6 +8614,7 @@ $_def_yasm
#define CONFIG_FFT 1
#define CONFIG_GOLOMB 1
#define CONFIG_MDCT 1
+#define CONFIG_RDFT 1
/* Use these registers in FFmpeg x86 inline asm. No proper detection yet. */
#define HAVE_EBX_AVAILABLE 1
diff --git a/cpudetect.c b/cpudetect.c
index fee0c8fc1f..5992ccb5bb 100644
--- a/cpudetect.c
+++ b/cpudetect.c
@@ -18,27 +18,17 @@ CpuCaps gCpuCaps;
#include <sys/param.h>
#include <sys/sysctl.h>
#include <machine/cpu.h>
-#endif
-
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__) || defined(__APPLE__)
#include <sys/types.h>
#include <sys/sysctl.h>
-#endif
-
-#ifdef __linux__
+#elif defined(__linux__)
#include <signal.h>
-#endif
-
-#if defined(__MINGW32__) || defined(__CYGWIN__)
+#elif defined(__MINGW32__) || defined(__CYGWIN__)
#include <windows.h>
-#endif
-
-#ifdef __OS2__
+#elif defined(__OS2__)
#define INCL_DOS
#include <os2.h>
-#endif
-
-#ifdef __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
#include <proto/exec.h>
#endif
@@ -228,11 +218,11 @@ void GetCpuCaps( CpuCaps *caps)
if(caps->hasSSE2) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"SSE2 supported but disabled\n");
caps->hasSSE2=0;
#endif
-#if !HAVE_3DNOW
+#if !HAVE_AMD3DNOW
if(caps->has3DNow) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNow supported but disabled\n");
caps->has3DNow=0;
#endif
-#if !HAVE_3DNOWEXT
+#if !HAVE_AMD3DNOWEXT
if(caps->has3DNowExt) mp_msg(MSGT_CPUDETECT,MSGL_WARN,"3DNowExt supported but disabled\n");
caps->has3DNowExt=0;
#endif
@@ -475,7 +465,7 @@ static void check_os_katmai_support( void )
#ifdef __APPLE__
#include <sys/sysctl.h>
-#elif __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
/* nothing */
#else
#include <signal.h>
@@ -529,7 +519,7 @@ void GetCpuCaps( CpuCaps *caps)
if (has_vu != 0)
caps->hasAltiVec = 1;
}
-#elif __AMIGAOS4__
+#elif defined(__AMIGAOS4__)
ULONG result = 0;
GetCPUInfoTags(GCIT_VectorUnit, &result, TAG_DONE);
@@ -558,48 +548,37 @@ void GetCpuCaps( CpuCaps *caps)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"AltiVec %sfound\n", (caps->hasAltiVec ? "" : "not "));
#endif /* HAVE_ALTIVEC */
-#if ARCH_IA64
+if (ARCH_IA64)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Intel Itanium\n");
-#endif
-#if ARCH_SPARC
+if (ARCH_SPARC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Sun Sparc\n");
-#endif
-#if ARCH_ARM
+if (ARCH_ARM)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: ARM\n");
-#endif
-#if ARCH_PPC
+if (ARCH_PPC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: PowerPC\n");
-#endif
-#if ARCH_ALPHA
+if (ARCH_ALPHA)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Digital Alpha\n");
-#endif
-#if ARCH_SGI_MIPS
+if (ARCH_SGI_MIPS)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: SGI MIPS\n");
-#endif
-#if ARCH_PA_RISC
+if (ARCH_PA_RISC)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: Hewlett-Packard PA-RISC\n");
-#endif
-#if ARCH_S390
+if (ARCH_S390)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390\n");
-#endif
-#if ARCH_S390X
+if (ARCH_S390X)
mp_msg(MSGT_CPUDETECT,MSGL_INFO,"CPU: IBM S/390X\n");
-#endif
-#if ARCH_VAX
+if (ARCH_VAX)
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Digital VAX\n" );
-#endif
-#if ARCH_XTENSA
+if (ARCH_XTENSA)
mp_msg(MSGT_CPUDETECT,MSGL_INFO, "CPU: Tensilica Xtensa\n" );
-#endif
}
#endif /* !ARCH_X86 */
diff --git a/etc/codecs.conf b/etc/codecs.conf
index ae5e201ade..1245d7d9b6 100644
--- a/etc/codecs.conf
+++ b/etc/codecs.conf
@@ -1984,6 +1984,7 @@ videocodec ffduck
info "Duck Truemotion1"
status working
fourcc DUCK
+ fourcc PVEZ
driver ffmpeg
dll "truemotion1"
out BGR15,BGR16,BGR24,BGR32 query
diff --git a/get_path.c b/get_path.c
index 1cb7bd8207..f5cf41354e 100644
--- a/get_path.c
+++ b/get_path.c
@@ -18,12 +18,12 @@
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
-#elif __MINGW32__
+#elif defined(__MINGW32__)
#include <windows.h>
-#elif __CYGWIN__
+#elif defined(__CYGWIN__)
#include <windows.h>
#include <sys/cygwin.h>
-#elif __OS2__
+#elif defined(__OS2__)
#define INCL_DOS
#include <os2.h>
#endif
diff --git a/input/lirc.c b/input/lirc.c
index 4012d5b340..4e60f01182 100644
--- a/input/lirc.c
+++ b/input/lirc.c
@@ -20,11 +20,10 @@
#include <lirc/lirc_client.h>
#include <errno.h>
+#include <fcntl.h>
#include <stdio.h>
#include <string.h>
#include <unistd.h>
-#include <sys/types.h>
-#include <sys/time.h>
#include <stdlib.h>
#include "mp_msg.h"
@@ -39,6 +38,7 @@ static char* cmd_buf = NULL;
int
mp_input_lirc_init(void) {
int lirc_sock;
+ int mode;
mp_msg(MSGT_LIRC,MSGL_V,MSGTR_SettingUpLIRC);
if((lirc_sock=lirc_init("mplayer",1))==-1){
@@ -46,6 +46,14 @@ mp_input_lirc_init(void) {
return -1;
}
+ mode = fcntl(lirc_sock, F_GETFL);
+ if (mode < 0 || fcntl(lirc_sock, F_SETFL, mode | O_NONBLOCK) < 0) {
+ mp_msg(MSGT_LIRC, MSGL_ERR, "setting non-blocking mode failed: %s\n",
+ strerror(errno));
+ lirc_deinit();
+ return -1;
+ }
+
if(lirc_readconfig( lirc_configfile,&lirc_config,NULL )!=0 ){
mp_msg(MSGT_LIRC,MSGL_ERR,MSGTR_LIRCcfgerr,
lirc_configfile == NULL ? "~/.lircrc" : lirc_configfile);
@@ -57,8 +65,6 @@ mp_input_lirc_init(void) {
}
int mp_input_lirc_read(int fd,char* dest, int s) {
- fd_set fds;
- struct timeval tv;
int r,cl = 0;
char *code = NULL,*c = NULL;
@@ -77,22 +83,8 @@ int mp_input_lirc_read(int fd,char* dest, int s) {
}
// Nothing in the buffer, poll the lirc fd
- FD_ZERO(&fds);
- FD_SET(fd,&fds);
- memset(&tv,0,sizeof(tv));
- while((r = select(fd+1,&fds,NULL,NULL,&tv)) <= 0) {
- if(r < 0) {
- if(errno == EINTR)
- continue;
- mp_msg(MSGT_INPUT,MSGL_ERR,"Select error : %s\n",strerror(errno));
- return MP_INPUT_ERROR;
- } else
- return MP_INPUT_NOTHING;
- }
-
- // There's something to read
if(lirc_nextcode(&code) != 0) {
- mp_msg(MSGT_INPUT,MSGL_ERR,"Lirc error :(\n");
+ mp_msg(MSGT_LIRC,MSGL_ERR,"Lirc error :(\n");
return MP_INPUT_DEAD;
}
diff --git a/liba52/bitstream.h b/liba52/bitstream.h
index fcf2e47390..8500212c7e 100644
--- a/liba52/bitstream.h
+++ b/liba52/bitstream.h
@@ -37,7 +37,7 @@
#define ALT_BITSTREAM_READER
/* used to avoid misaligned exceptions on some archs (alpha, ...) */
-#if ARCH_X86 || defined(HAVE_ARMV6)
+#if ARCH_X86 || HAVE_ARMV6
# define unaligned32(a) (*(uint32_t*)(a))
#else
# ifdef __GNUC__
diff --git a/liba52/imdct.c b/liba52/imdct.c
index c6253b672d..e16038855e 100644
--- a/liba52/imdct.c
+++ b/liba52/imdct.c
@@ -53,8 +53,8 @@
void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias);
#ifdef RUNTIME_CPUDETECT
-#undef HAVE_3DNOWEXT
-#define HAVE_3DNOWEXT 0
+#undef HAVE_AMD3DNOWEXT
+#define HAVE_AMD3DNOWEXT 0
#endif
typedef struct complex_s {
@@ -712,19 +712,19 @@ imdct_do_512_altivec(sample_t data[],sample_t delay[], sample_t bias)
// Stuff below this line is borrowed from libac3
#include "srfftp.h"
#if ARCH_X86 || ARCH_X86_64
-#undef HAVE_3DNOW
-#define HAVE_3DNOW 1
+#undef HAVE_AMD3DNOW
+#define HAVE_AMD3DNOW 1
#include "srfftp_3dnow.h"
const i_cmplx_t x_plus_minus_3dnow __attribute__ ((aligned (8))) = {{ 0x00000000UL, 0x80000000UL }};
const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }};
const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
-#undef HAVE_3DNOWEXT
-#define HAVE_3DNOWEXT 0
+#undef HAVE_AMD3DNOWEXT
+#define HAVE_AMD3DNOWEXT 0
#include "imdct_3dnow.h"
-#undef HAVE_3DNOWEXT
-#define HAVE_3DNOWEXT 1
+#undef HAVE_AMD3DNOWEXT
+#define HAVE_AMD3DNOWEXT 1
#include "imdct_3dnow.h"
void
@@ -1287,7 +1287,7 @@ void a52_imdct_init (uint32_t mm_accel)
else
#endif
-#if LIBA52_DJBFFT
+#ifdef LIBA52_DJBFFT
if (mm_accel & MM_ACCEL_DJBFFT) {
fprintf (stderr, "Using djbfft for IMDCT transform\n");
ifft128 = (void (*) (complex_t *)) fftc4_un128;
diff --git a/liba52/imdct_3dnow.h b/liba52/imdct_3dnow.h
index 048aa7baa7..1c13f06870 100644
--- a/liba52/imdct_3dnow.h
+++ b/liba52/imdct_3dnow.h
@@ -26,7 +26,7 @@
#undef FFT_ASMB16_3DNOW
#undef FFT_128P_3DNOW
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
#define FFT_4_3DNOW fft_4_3dnowex
#define FFT_8_3DNOW fft_8_3dnowex
#define FFT_ASMB_3DNOW fft_asmb_3dnowex
@@ -52,7 +52,7 @@ static void FFT_4_3DNOW(complex_t *x)
"pxor %3, %%mm1\n\t" /* -mm1.re | mm1.im */
"pfadd %%mm1, %%mm3\n\t" /* vi.im = x[3].re - x[1].re; */
"movq %%mm3, %%mm4\n\t" /* vi.re =-x[3].im + x[1].im; mm4 = vi */
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm4, %%mm4\n\t"
#else
"punpckldq %%mm4, %%mm5\n\t"
@@ -129,7 +129,7 @@ static void FFT_8_3DNOW(complex_t *x)
"movq (%1), %%mm1\n\t"
"movq 16(%1), %%mm4\n\t"
"movq %%mm1, %%mm2\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm3, %%mm3\n\t"
#else
"punpckldq %%mm3, %%mm6\n\t"
@@ -160,7 +160,7 @@ static void FFT_8_3DNOW(complex_t *x)
"movq %2, %%mm1\n\t"
"movq 56(%3), %%mm3\n\t"
"pfsub 40(%3), %%mm0\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm1, %%mm1\n\t"
#else
"punpckldq %%mm1, %%mm2\n\t"
@@ -168,7 +168,7 @@ static void FFT_8_3DNOW(complex_t *x)
#endif
"pxor %%mm7, %%mm1\n\t"
"pfadd %%mm1, %%mm0\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm3, %%mm3\n\t"
#else
"punpckldq %%mm3, %%mm2\n\t"
@@ -182,7 +182,7 @@ static void FFT_8_3DNOW(complex_t *x)
"pfmul %4, %%mm0\n\t"
"movq 40(%3), %%mm5\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm5, %%mm5\n\t"
#else
"punpckldq %%mm5, %%mm1\n\t"
@@ -205,7 +205,7 @@ static void FFT_8_3DNOW(complex_t *x)
/* x[3] x[7] */
__asm__ volatile(
"movq %1, %%mm0\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %3, %%mm1\n\t"
#else
"movq %3, %%mm1\n\t"
@@ -218,7 +218,7 @@ static void FFT_8_3DNOW(complex_t *x)
"movq 56(%4), %%mm3\n\t"
"pxor %%mm7, %%mm3\n\t"
"pfadd %%mm3, %%mm2\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm2, %%mm2\n\t"
#else
"punpckldq %%mm2, %%mm5\n\t"
@@ -331,7 +331,7 @@ static void FFT_128P_3DNOW(complex_t *a)
}
static void
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
imdct_do_512_3dnowex
#else
imdct_do_512_3dnow
@@ -371,14 +371,14 @@ imdct_do_512_3dnow
"punpckldq %4, %%mm1\n\t" /* mm1 = xcos[j] | xsin[j] */
"movq %%mm0, %%mm2\n\t"
"pfmul %%mm1, %%mm0\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd %%mm1, %%mm1\n\t"
#else
"punpckldq %%mm1, %%mm5\n\t"
"punpckhdq %%mm5, %%mm1\n\t"
#endif
"pfmul %%mm1, %%mm2\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pfpnacc %%mm2, %%mm0\n\t"
#else
"pxor %%mm7, %%mm0\n\t"
@@ -445,7 +445,7 @@ imdct_do_512_3dnow
__asm__ volatile (
"movq %1, %%mm0\n\t" /* ac3_buf[i].re | ac3_buf[i].im */
"movq %%mm0, %%mm1\n\t" /* ac3_buf[i].re | ac3_buf[i].im */
-#if !HAVE_3DNOWEXT
+#if !HAVE_AMD3DNOWEXT
"punpckldq %%mm1, %%mm2\n\t"
"punpckhdq %%mm2, %%mm1\n\t"
#else
@@ -455,7 +455,7 @@ imdct_do_512_3dnow
"punpckldq %2, %%mm3\n\t" /* ac3_xsin[i] | ac3_xcos[i] */
"pfmul %%mm3, %%mm0\n\t"
"pfmul %%mm3, %%mm1\n\t"
-#if !HAVE_3DNOWEXT
+#if !HAVE_AMD3DNOWEXT
"pxor %%mm7, %%mm0\n\t"
"pfacc %%mm1, %%mm0\n\t"
"punpckldq %%mm0, %%mm1\n\t"
@@ -543,7 +543,7 @@ imdct_do_512_3dnow
"movd (%1), %%mm1\n\t"
"punpckldq (%2), %%mm0\n\t"
"punpckldq 508(%2), %%mm1\n\t"
-#if HAVE_3DNOWEXT
+#if HAVE_AMD3DNOWEXT
"pswapd (%3), %%mm3\n\t"
"pswapd -512(%3), %%mm4\n\t"
#else
diff --git a/liba52/liba52_changes.diff b/liba52/liba52_changes.diff
index 9840a05f02..9a559a5036 100644
--- a/liba52/liba52_changes.diff
+++ b/liba52/liba52_changes.diff
@@ -1412,7 +1412,7 @@
+void (*a52_imdct_512) (sample_t * data, sample_t * delay, sample_t bias);
+
+#ifdef RUNTIME_CPUDETECT
-+#undef HAVE_3DNOWEXT
++#undef HAVE_AMD3DNOWEXT
+#endif
typedef struct complex_s {
@@ -1853,8 +1853,8 @@
+// Stuff below this line is borrowed from libac3
+#include "srfftp.h"
+#if defined(ARCH_X86) || defined(ARCH_X86_64)
-+#ifndef HAVE_3DNOW
-+#define HAVE_3DNOW 1
++#ifndef HAVE_AMD3DNOW
++#define HAVE_AMD3DNOW 1
+#endif
+#include "srfftp_3dnow.h"
+
@@ -1862,9 +1862,9 @@
+const i_cmplx_t x_minus_plus_3dnow __attribute__ ((aligned (8))) = {{ 0x80000000UL, 0x00000000UL }};
+const complex_t HSQRT2_3DNOW __attribute__ ((aligned (8))) = { 0.707106781188, 0.707106781188 };
+