[MPlayer-dev-eng] [PATCH] mplayer compilation with icc
Joey Parrish
joey at yunamusic.com
Mon Aug 19 21:59:00 CEST 2002
Hello,
Attached below is a patch of everything I had to do to get
mplayer to compile with icc. There are some bits that are
fairly cheap, but this is not to be committed. It is just
a starting place to get it compiled so that someone can see
which parts of the code are problematic for icc. (The hunks
that apply to liba52 and libao2 I do not like.) I hope that
someone can help me figure out better ways to handle parts
of the code like these.
Big list of changes for this patch:
- -O3 is the highest -O flag, -O4 changed to -O3 for icc
- -DUSING_ICC added to CFLAGS to allow ICC specific code
- -g flag seems to hate me. (mplayer behaved like a gcc
2.96 copy using icc -g) -g removed from Makefiles
- won't always link functions that are static inline,
static inline removed in some places.
- -W flag has nothing to do with warnings, removed from Makefiles
- certain -f flags don't exist, they are removed from Makefiles
- 3dnow opts don't compile in liba52, ifdef'd out for icc
- strangely worded statement in libao2, reworded.
(possibly wrong. FIXME)
- functions inside of functions are invalid in icc. replaced
with #define's. (possibly wrong. FIXME.)
- libmpcodecs/native/RTjpegN.c, something weird about icc
not liking MMX code there. #ifdef'd out for icc.
- if __GNUC__ is not defined, gcc's byteswap.h does not define
all the needed byteswap functions. #define __GNUC__ 3 added
to libmpdvdkit/bswap.h
- inb and outb not found at link, defined as inline asm for icc.
- under icc, __int8, __int16, __int32, __int64 are already typedef'd.
Any comments, suggestions, improvements, etc. are very very welcome.
--Joey
--
"All you need is love." --Darth Vader
-------------- next part --------------
diff -ur main.cvs/configure main.dev/configure
--- main.cvs/configure Wed Aug 14 16:43:48 2002
+++ main.dev/configure Thu Aug 15 20:23:22 2002
@@ -4005,6 +4005,12 @@
EOF
fi
+
+# for icc, -W does not mean warning, and there is no -O4
+if test "$_cc" == "icc" ; then
+ CFLAGS="-O3 -DUSING_ICC"
+fi
+
if darwin ; then
# use gnu style cpp on Darwin
CFLAGS="$CFLAGS -no-cpp-precomp -DSYS_DARWIN"
diff -ur main.cvs/drivers/Makefile main.dev/drivers/Makefile
--- main.cvs/drivers/Makefile Wed Dec 26 09:49:45 2001
+++ main.dev/drivers/Makefile Thu Aug 15 20:09:40 2002
@@ -1,7 +1,7 @@
KERNEL_INCLUDES = /usr/src/linux/include
INCLUDES = -I$(KERNEL_INCLUDES)
-CFLAGS = -g -O2 -Wall -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
+CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
MDIR = /lib/modules/$(VERSION)/misc
@@ -15,7 +15,7 @@
$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
mga_vid_test: mga_vid_test.c
- $(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c
+ $(CC) -O $(INCLUDES) -o $@ $@.c
install: mga_vid.o
if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi
diff -ur main.cvs/drivers/radeon/Makefile main.dev/drivers/radeon/Makefile
--- main.cvs/drivers/radeon/Makefile Wed Jan 2 03:37:37 2002
+++ main.dev/drivers/radeon/Makefile Thu Aug 15 20:10:26 2002
@@ -12,8 +12,8 @@
CPPFLAGS := -D__KERNEL__ -I$(KERNEL_INCLUDES)
-CFLAGS := $(CPPFLAGS) -Wall -Wstrict-prototypes -Wno-trigraphs -O2 \
- -fomit-frame-pointer -fno-strict-aliasing -fno-common -ffast-math\
+CFLAGS := $(CPPFLAGS) -O2 \
+ -fomit-frame-pointer -fno-strict-aliasing -fno-common \
-D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
AFLAGS := -D__ASSEMBLY__ $(CPPFLAGS)
diff -ur main.cvs/input/Makefile main.dev/input/Makefile
--- main.cvs/input/Makefile Thu Feb 21 18:17:12 2002
+++ main.dev/input/Makefile Thu Aug 15 20:10:36 2002
@@ -6,7 +6,7 @@
SRCS=input.c joystick.c lirc.c
OBJS=$(SRCS:.c=.o)
-CFLAGS = $(OPTFLAGS) -I. -I.. $(EXTRA_INC) -Wall
+CFLAGS = $(OPTFLAGS) -I. -I.. $(EXTRA_INC)
.SUFFIXES: .c .o
diff -ur main.cvs/liba52/imdct.c main.dev/liba52/imdct.c
--- main.cvs/liba52/imdct.c Sun Feb 3 04:27:26 2002
+++ main.dev/liba52/imdct.c Thu Aug 15 20:44:53 2002
@@ -393,10 +393,12 @@
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 };
+#if !defined(USING_ICC)
#undef HAVE_3DNOWEX
#include "imdct_3dnow.h"
#define HAVE_3DNOWEX
#include "imdct_3dnow.h"
+#endif
void
imdct_do_512_sse(sample_t data[],sample_t delay[], sample_t bias)
@@ -949,6 +951,7 @@
imdct_512 = imdct_do_512_sse;
}
else
+#if !defined(USING_ICC)
if(mm_accel & MM_ACCEL_X86_3DNOWEXT)
{
fprintf (stderr, "Using 3DNowEx optimized IMDCT transform\n");
@@ -961,6 +964,7 @@
imdct_512 = imdct_do_512_3dnow;
}
else
+#endif
#endif // arch_x86
fprintf (stderr, "No accelerated IMDCT transform found\n");
imdct_256 = imdct_do_256;
diff -ur main.cvs/libao2/pl_format.c main.dev/libao2/pl_format.c
--- main.cvs/libao2/pl_format.c Thu May 30 06:53:51 2002
+++ main.dev/libao2/pl_format.c Thu Aug 15 20:42:16 2002
@@ -173,7 +173,9 @@
void* in_data=ao_plugin_data.data;
void* out_data=pl_format.data;
int len=(ao_plugin_data.len)>>(pl_format.in&NBITS_MASK);
- ao_plugin_data.len=(int)(((double)ao_plugin_data.len)*=pl_format.sz_mult);
+// ao_plugin_data.len=(int)(((double)ao_plugin_data.len)*=pl_format.sz_mult);
+ ao_plugin_data.len*=pl_format.sz_mult;
+ ao_plugin_data.len=(int)((double)ao_plugin_data.len);
// Change to little endian (Is this true for sun ?)
if((pl_format.in&END_MASK)!=LE){
diff -ur main.cvs/libdha/AsmMacros.h main.dev/libdha/AsmMacros.h
--- main.cvs/libdha/AsmMacros.h Tue Jan 15 02:33:09 2002
+++ main.dev/libdha/AsmMacros.h Thu Aug 15 20:12:39 2002
@@ -63,7 +63,7 @@
* Modified for readability by Nick Kurshev
*/
-#if defined(__GNUC__)
+#if defined(__GNUC__) || defined(USING_ICC)
#if defined(__alpha__)
#include "sysdep/AsmMacros_alpha.h"
#elif defined(__ia64__)
diff -ur main.cvs/libdha/Makefile main.dev/libdha/Makefile
--- main.cvs/libdha/Makefile Wed Aug 14 16:44:56 2002
+++ main.dev/libdha/Makefile Thu Aug 15 20:12:45 2002
@@ -14,7 +14,7 @@
SRCS=libdha.c mtrr.c pci.c pci_names.c
OBJS=$(SRCS:.c=.o)
-CFLAGS = $(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+CFLAGS = $(OPTFLAGS) -fPIC -I. -I..
LIBS =
ifeq ($(TARGET_OS),OpenBSD)
ifeq ($(TARGET_ARCH_X86),yes)
diff -ur main.cvs/libdha/kernelhelper/Makefile main.dev/libdha/kernelhelper/Makefile
--- main.cvs/libdha/kernelhelper/Makefile Sat Feb 2 00:34:44 2002
+++ main.dev/libdha/kernelhelper/Makefile Thu Aug 15 20:13:04 2002
@@ -1,6 +1,6 @@
KERNEL_INCLUDES = /usr/src/linux/include
INCLUDES = -I$(KERNEL_INCLUDES)
-CFLAGS = -g -O2 -Wall -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
+CFLAGS = -O2 -D__KERNEL__ -DMODULE -include $(KERNEL_INCLUDES)/linux/modversions.h
VERSION = $(shell grep UTS_RELEASE $(KERNEL_INCLUDES)/linux/version.h | cut -d '"' -f2)
MDIR = /lib/modules/$(VERSION)/misc
@@ -10,7 +10,7 @@
$(CC) $(CFLAGS) $(INCLUDES) -c $(basename $@).c
test: test.c
- $(CC) -g -O -Wall $(INCLUDES) -o $@ $@.c
+ $(CC) -O $(INCLUDES) -o $@ $@.c
install: dhahelper.o
if test ! -d $(MDIR) ; then mkdir -p $(MDIR) ; fi
diff -ur main.cvs/libfame/Makefile main.dev/libfame/Makefile
--- main.cvs/libfame/Makefile Sat Jun 1 15:23:10 2002
+++ main.dev/libfame/Makefile Thu Aug 15 20:13:53 2002
@@ -7,7 +7,7 @@
SRCS = cpuflags.c fame.c fame_decoder_mpeg.c fame_encoder_mpeg.c fame_malloc.c fame_monitor.c fame_motion.c fame_motion_fourstep.c fame_motion_none.c fame_motion_pmvfast.c fame_profile_mpeg.c fame_profile_mpeg1.c fame_profile_mpeg4_shape.c fame_profile_mpeg4_simple.c fame_profile_stats.c fame_rate.c fame_rate_1param.c fame_rate_simple.c fame_shape.c fame_syntax_mpeg1.c fame_syntax_mpeg4.c
OBJS = $(SRCS:.c=.o)
-CFLAGS = -fexpensive-optimizations -funroll-loops $(OPTFLAGS) -DPACKAGE=\"libfame\" -DVERSION=\"0.9.0\" -I.
+CFLAGS = $(OPTFLAGS) -DPACKAGE=\"libfame\" -DVERSION=\"0.9.0\" -I.
ifeq ($(TARGET_MMX),yes)
CFLAGS += -DHAS_MMX
diff -ur main.cvs/libmpcodecs/Makefile main.dev/libmpcodecs/Makefile
--- main.cvs/libmpcodecs/Makefile Mon Aug 5 12:23:22 2002
+++ main.dev/libmpcodecs/Makefile Thu Aug 15 20:13:59 2002
@@ -28,7 +28,7 @@
SRCS2=$(ENCODER_SRCS)
OBJS2=$(SRCS2:.c=.o)
-CFLAGS = -Wall $(OPTFLAGS) -I. -Inative -I.. -I../libmpdemux -I../loader $(EXTRA_INC)
+CFLAGS = $(OPTFLAGS) -I. -Inative -I.. -I../libmpdemux -I../loader $(EXTRA_INC)
.SUFFIXES: .c .o
diff -ur main.cvs/libmpcodecs/ad_vorbis.c main.dev/libmpcodecs/ad_vorbis.c
--- main.cvs/libmpcodecs/ad_vorbis.c Fri Jun 28 11:40:02 2002
+++ main.dev/libmpcodecs/ad_vorbis.c Thu Aug 15 20:35:44 2002
@@ -42,11 +42,11 @@
ogg_packet op;
vorbis_comment vc;
struct ov_struct_st *ov;
- int error(void) {
- vorbis_comment_clear(&vc);
- vorbis_info_clear(&ov->vi);
- free(ov);
- return 0;
+#define error() { \
+ vorbis_comment_clear(&vc); \
+ vorbis_info_clear(&ov->vi); \
+ free(ov); \
+ return 0; \
}
/// Init the decoder with the 3 header packets
ov = (struct ov_struct_st*)malloc(sizeof(struct ov_struct_st));
@@ -57,20 +57,20 @@
/// Header
if(vorbis_synthesis_headerin(&ov->vi,&vc,&op) <0) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: initial (identification) header broken!\n");
- return error();
+ error();
}
op.bytes = ds_get_packet(sh->ds,&op.packet);
op.b_o_s = 0;
/// Comments
if(vorbis_synthesis_headerin(&ov->vi,&vc,&op) <0) {
mp_msg(MSGT_DECAUDIO,MSGL_ERR,"OggVorbis: comment header broken!\n");
- return error();
+ error();
}
op.bytes = ds_get_packet(sh->ds,&op.packet);
//// Codebook
if(vorbis_synthesis_headerin(&ov->vi,&vc,&op)<0) {
mp_msg(MSGT_DECAUDIO,MSGL_WARN,"OggVorbis: codebook header broken!\n");
- return error();;
+ error();
} else { /// Print the infos
char **ptr=vc.user_comments;
while(*ptr){
diff -ur main.cvs/libmpcodecs/native/RTjpegN.c main.dev/libmpcodecs/native/RTjpegN.c
--- main.cvs/libmpcodecs/native/RTjpegN.c Fri Jun 7 17:43:27 2002
+++ main.dev/libmpcodecs/native/RTjpegN.c Thu Aug 15 20:40:01 2002
@@ -27,7 +27,7 @@
#include <string.h>
#include "config.h"
-#ifdef HAVE_MMX
+#if defined(HAVE_MMX) && !defined(USING_ICC)
#define MMX
#endif
diff -ur main.cvs/libmpdvdkit/Makefile main.dev/libmpdvdkit/Makefile
--- main.cvs/libmpdvdkit/Makefile Fri Jun 7 17:41:27 2002
+++ main.dev/libmpdvdkit/Makefile Thu Aug 15 20:14:42 2002
@@ -20,8 +20,7 @@
# -funroll-loops removed, triggered gcc 3.0.4 (3.x?) bug
CFLAGS= -I. $(OPTFLAGS) $(EXTRA_INC)\
-D_LARGEFILE64_SOURCE \
- -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_GNU_SOURCE \
- -ffast-math -fomit-frame-pointer
+ -DSYS_LINUX -D_FILE_OFFSET_BITS=64 -D__USE_UNIX98 -D_REENTRANT -D_GNU_SOURCE
.c.o:
$(CC) $(CFLAGS) -c -o $@ $<
diff -ur main.cvs/libmpdvdkit/bswap.h main.dev/libmpdvdkit/bswap.h
--- main.cvs/libmpdvdkit/bswap.h Tue Jul 9 22:01:33 2002
+++ main.dev/libmpdvdkit/bswap.h Thu Aug 15 21:07:17 2002
@@ -22,6 +22,10 @@
//#include <config.h>
+#if defined(USING_ICC)
+#define __GNUC__ 3
+#endif
+
#if defined(WORDS_BIGENDIAN)
/* All bigendian systems are fine, just ignore the swaps. */
#define B2N_16(x) (void)(x)
diff -ur main.cvs/libvo/aclib.c main.dev/libvo/aclib.c
--- main.cvs/libvo/aclib.c Wed Apr 10 00:23:13 2002
+++ main.dev/libvo/aclib.c Thu Aug 15 21:00:18 2002
@@ -114,7 +114,7 @@
#endif // CAN_COMPILE_X86_ASM
-inline void * fast_memcpy(void * to, const void * from, size_t len)
+void * fast_memcpy(void * to, const void * from, size_t len)
{
#ifdef RUNTIME_CPUDETECT
#ifdef CAN_COMPILE_X86_ASM
@@ -147,7 +147,7 @@
return to;
}
-inline void * mem2agpcpy(void * to, const void * from, size_t len)
+void * mem2agpcpy(void * to, const void * from, size_t len)
{
#ifdef RUNTIME_CPUDETECT
#ifdef CAN_COMPILE_X86_ASM
diff -ur main.cvs/libvo/aclib_template.c main.dev/libvo/aclib_template.c
--- main.cvs/libvo/aclib_template.c Wed Apr 17 14:11:52 2002
+++ main.dev/libvo/aclib_template.c Thu Aug 15 21:00:27 2002
@@ -133,7 +133,7 @@
#define MIN_LEN 0x40 /* 64-byte blocks */
#endif
-static inline void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
+void * RENAME(fast_memcpy)(void * to, const void * from, size_t len)
{
void *retval;
size_t i;
@@ -363,7 +363,7 @@
/**
* special copy routine for mem -> agp/pci copy (based upon fast_memcpy)
*/
-static inline void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len)
+void * RENAME(mem2agpcpy)(void * to, const void * from, size_t len)
{
void *retval;
size_t i;
diff -ur main.cvs/linux/Makefile main.dev/linux/Makefile
--- main.cvs/linux/Makefile Fri Mar 29 15:24:36 2002
+++ main.dev/linux/Makefile Thu Aug 15 20:15:08 2002
@@ -12,7 +12,7 @@
endif
endif
-CFLAGS = $(OPTFLAGS) -I. -I.. -Wall
+CFLAGS = $(OPTFLAGS) -I. -I..
# -I/usr/X11R6/include/
.SUFFIXES: .c .o
diff -ur main.cvs/linux/lrmi.c main.dev/linux/lrmi.c
--- main.cvs/linux/lrmi.c Mon Oct 15 11:59:35 2001
+++ main.dev/linux/lrmi.c Thu Aug 15 21:20:32 2002
@@ -11,6 +11,25 @@
Original location: http://cvs.debian.org/lrmi/
*/
+#include "config.h"
+
+#if defined(USING_ICC)
+static __inline unsigned char
+inb (unsigned short int port)
+{
+ unsigned char _v;
+
+ __asm__ __volatile__ ("inb %w1,%0":"=a" (_v):"Nd" (port));
+ return _v;
+}
+
+static __inline void
+outb (unsigned char value, unsigned short int port)
+{
+ __asm__ __volatile__ ("outb %b0,%w1": :"a" (value), "Nd" (port));
+}
+#endif
+
#include <stdio.h>
#include <string.h>
#include <sys/io.h>
diff -ur main.cvs/loader/Makefile main.dev/loader/Makefile
--- main.cvs/loader/Makefile Sat Apr 27 20:30:04 2002
+++ main.dev/loader/Makefile Thu Aug 15 20:15:44 2002
@@ -16,8 +16,8 @@
# -fno-omit-frame-pointer works around this gcc-3.0 bug. gcc-2.95.2 is OK.
# Note: -D_FILE_OFFSET_BITS=32 is required to disable using mmap64(),
# as it's broken in glibc 2.1.2 (bad header) and 2.1.3 (bad code)
-WARN_FLAGS = -Wmissing-prototypes -Wimplicit-function-declaration
-CFLAGS=-I. -I.. $(OPTFLAGS) -U_FILE_OFFSET_BITS $(EXTRA_INC) $(WARN_FLAGS) -fno-omit-frame-pointer
+WARN_FLAGS =
+CFLAGS=-I. -I.. $(OPTFLAGS) -U_FILE_OFFSET_BITS $(EXTRA_INC) $(WARN_FLAGS)
#CFLAGS=-I. -I.. -O $(WARN_FLAGS) -g #-fno-omit-frame-pointer
all: libloader.a
diff -ur main.cvs/loader/dshow/Makefile main.dev/loader/dshow/Makefile
--- main.cvs/loader/dshow/Makefile Wed Nov 21 21:16:31 2001
+++ main.dev/loader/dshow/Makefile Thu Aug 15 20:16:00 2002
@@ -23,7 +23,7 @@
$(AR) r $(LIBNAME) $(OBJS)
test: test.c $(LIBNAME)
- $(CC) test.c -Wall $(CFLAGS) -o test -L. -lDS_Filter -L.. -lloader $(ARCH_LIBS) -lstdc++
+ $(CC) test.c $(CFLAGS) -o test -L. -lDS_Filter -L.. -lloader $(ARCH_LIBS) -lstdc++
all: $(LIBNAME)
diff -ur main.cvs/loader/wine/basetsd.h main.dev/loader/wine/basetsd.h
--- main.cvs/loader/wine/basetsd.h Sat Feb 24 14:30:28 2001
+++ main.dev/loader/wine/basetsd.h Thu Aug 15 20:34:16 2002
@@ -28,16 +28,16 @@
/* Type model indepent typedefs */
+#if !defined(USING_ICC)
typedef char __int8;
-typedef unsigned char __uint8;
-
typedef short __int16;
-typedef unsigned short __uint16;
-
typedef int __int32;
-typedef unsigned int __uint32;
-
typedef long long __int64;
+#endif
+
+typedef unsigned char __uint8;
+typedef unsigned short __uint16;
+typedef unsigned int __uint32;
typedef unsigned long long __uint64;
#if defined(_WIN64)
diff -ur main.cvs/loader/wine/poppack.h main.dev/loader/wine/poppack.h
--- main.cvs/loader/wine/poppack.h Sat Feb 24 14:30:33 2001
+++ main.dev/loader/wine/poppack.h Thu Aug 15 20:25:42 2002
@@ -1,7 +1,7 @@
#ifdef __WINE_PSHPACK_H
#undef __WINE_PSHPACK_H
-#if defined(__GNUC__) || defined(__SUNPRO_C)
+#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(USING_ICC)
#pragma pack()
#elif defined(__SUNPRO_CC)
#warning "Assumes default alignment is 4"
diff -ur main.cvs/loader/wine/pshpack1.h main.dev/loader/wine/pshpack1.h
--- main.cvs/loader/wine/pshpack1.h Sat Feb 24 14:30:33 2001
+++ main.dev/loader/wine/pshpack1.h Thu Aug 15 20:24:42 2002
@@ -1,7 +1,7 @@
#ifndef __WINE_PSHPACK_H
#define __WINE_PSHPACK_H 1
-#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(USING_ICC)
//#pragma pack(1)
#elif !defined(RC_INVOKED)
#error "1 as alignment isn't supported by the compiler"
diff -ur main.cvs/loader/wine/pshpack2.h main.dev/loader/wine/pshpack2.h
--- main.cvs/loader/wine/pshpack2.h Sat Feb 24 14:30:33 2001
+++ main.dev/loader/wine/pshpack2.h Thu Aug 15 20:26:25 2002
@@ -1,7 +1,7 @@
#ifndef __WINE_PSHPACK_H
#define __WINE_PSHPACK_H 2
-#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_C) || defined(__SUNPRO_CC) || defined(USING_ICC)
//#pragma pack(2)
#elif !defined(RC_INVOKED)
#error "2 as alignment isn't supported by the compiler"
diff -ur main.cvs/loader/wine/pshpack4.h main.dev/loader/wine/pshpack4.h
--- main.cvs/loader/wine/pshpack4.h Sat Feb 24 14:30:33 2001
+++ main.dev/loader/wine/pshpack4.h Thu Aug 15 20:26:33 2002
@@ -1,7 +1,7 @@
#ifndef __WINE_PSHPACK_H
#define __WINE_PSHPACK_H 4
-#if defined(__GNUC__) || defined(__SUNPRO_CC)
+#if defined(__GNUC__) || defined(__SUNPRO_CC) || defined(USING_ICC)
//#pragma pack(4)
#elif defined(__SUNPRO_C)
//#pragma pack()
diff -ur main.cvs/loader/wine/windef.h main.dev/loader/wine/windef.h
--- main.cvs/loader/wine/windef.h Tue Jun 4 15:11:15 2002
+++ main.dev/loader/wine/windef.h Thu Aug 15 20:29:29 2002
@@ -112,6 +112,9 @@
#define __cdecl __attribute__((__cdecl__))
# define __RESTORE_ES __asm__ __volatile__("pushl %ds\n\tpopl %es")
# endif
+# elif defined(USING_ICC)
+# define __stdcall
+# define __cdecl
# else
// # error You need gcc >= 2.7 to build Wine on a 386
# endif
diff -ur main.cvs/mp3lib/decode_i586.c main.dev/mp3lib/decode_i586.c
--- main.cvs/mp3lib/decode_i586.c Fri Jan 18 22:47:32 2002
+++ main.dev/mp3lib/decode_i586.c Thu Aug 15 20:57:04 2002
@@ -26,7 +26,7 @@
#include "../mangle.h"
#define real float /* ugly - but only way */
-static long buffs[1088];
+long buffs[1088];
static long bo=1;
int synth_1to1_pent(real *bandPtr, int channel, short *samples)
diff -ur main.cvs/mplayer.c main.dev/mplayer.c
--- main.cvs/mplayer.c Wed Aug 14 18:02:42 2002
+++ main.dev/mplayer.c Thu Aug 15 20:32:54 2002
@@ -3021,33 +3021,34 @@
unsigned char* packet=NULL;
int len,timestamp;
// Get a sub packet from the dvd or a vobsub and make a timestamp relative to sh_video->timer
- int get_sub_packet(void) {
- // Vobsub
- len = 0;
- if(vo_vobsub) {
- if(d_video->pts+sub_delay>=0) {
- // The + next_frame_time is there because we'll display the sub at the next frame
- len = vobsub_get_packet(vo_vobsub,d_video->pts+sub_delay+next_frame_time,(void**)&packet,×tamp);
- if(len > 0) {
- timestamp -= (d_video->pts + sub_delay - sh_video->timer)*90000;
- mp_dbg(MSGT_CPLAYER,MSGL_V,"\rVOB sub: len=%d v_pts=%5.3f v_timer=%5.3f sub=%5.3f ts=%d \n",len,d_video->pts,sh_video->timer,timestamp / 90000.0);
- }
- }
- } else {
- // DVD sub
- len = ds_get_packet_sub(d_dvdsub,(unsigned char**)&packet);
- if(len > 0) {
- timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - d_video->pts);
- mp_dbg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d v_pts=%5.3f s_pts=%5.3f ts=%d \n",len,d_video->pts,d_dvdsub->pts,timestamp);
- }
- }
- return len;
+#define get_sub_packet() { \
+ /* Vobsub */ \
+ len = 0; \
+ if(vo_vobsub) { \
+ if(d_video->pts+sub_delay>=0) { \
+ /* The + next_frame_time is there because we'll display the sub at the next frame */ \
+ len = vobsub_get_packet(vo_vobsub,d_video->pts+sub_delay+next_frame_time,(void**)&packet,×tamp); \
+ if(len > 0) { \
+ timestamp -= (d_video->pts + sub_delay - sh_video->timer)*90000; \
+ mp_dbg(MSGT_CPLAYER,MSGL_V,"\rVOB sub: len=%d v_pts=%5.3f v_timer=%5.3f sub=%5.3f ts=%d \n",len,d_video->pts,sh_video->timer,timestamp / 90000.0); \
+ } \
+ } \
+ } else { \
+ /* DVD sub */ \
+ len = ds_get_packet_sub(d_dvdsub,(unsigned char**)&packet); \
+ if(len > 0) { \
+ timestamp = 90000*(sh_video->timer + d_dvdsub->pts + sub_delay - d_video->pts); \
+ mp_dbg(MSGT_CPLAYER,MSGL_V,"\rDVD sub: len=%d v_pts=%5.3f s_pts=%5.3f ts=%d \n",len,d_video->pts,d_dvdsub->pts,timestamp); \
+ } \
+ } \
}
current_module="spudec";
spudec_heartbeat(vo_spudec,90000*sh_video->timer);
- while(get_sub_packet()>0 && packet){
+ get_sub_packet();
+ while(len>0 && packet){
if(timestamp < 0) timestamp = 0;
spudec_assemble(vo_spudec,packet,len,timestamp);
+ get_sub_packet();
}
/* detect wether the sub has changed or not */
diff -ur main.cvs/postproc/Makefile main.dev/postproc/Makefile
--- main.cvs/postproc/Makefile Sat Jun 29 10:01:23 2002
+++ main.dev/postproc/Makefile Thu Aug 15 20:17:06 2002
@@ -7,7 +7,7 @@
OBJS=$(SRCS:.c=.o)
CS_TEST_OBJS=cs_test.o rgb2rgb.o ../cpudetect.o ../mp_msg.o
-CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. -Wall $(EXTRA_INC)
+CFLAGS = $(OPTFLAGS) $(MLIB_INC) -I. -I.. $(EXTRA_INC)
# -I/usr/X11R6/include/
.SUFFIXES: .c .o
diff -ur main.cvs/vidix/Makefile main.dev/vidix/Makefile
--- main.cvs/vidix/Makefile Mon Jan 7 03:28:21 2002
+++ main.dev/vidix/Makefile Thu Aug 15 20:17:19 2002
@@ -7,7 +7,7 @@
SRCS = vidixlib.c
OBJS = $(SRCS:.c=.o)
-CFLAGS = $(OPTFLAGS) -W -Wall
+CFLAGS = $(OPTFLAGS)
.SUFFIXES: .c .o
diff -ur main.cvs/vidix/drivers/Makefile main.dev/vidix/drivers/Makefile
--- main.cvs/vidix/drivers/Makefile Fri Jul 5 10:37:51 2002
+++ main.dev/vidix/drivers/Makefile Thu Aug 15 20:17:46 2002
@@ -9,37 +9,37 @@
RADEON_SRCS=radeon_vid.c
RADEON_OBJS=radeon_vid.o
RADEON_LIBS=-L../../libdha -ldha -lm
-RADEON_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+RADEON_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
RAGE128_VID=rage128_vid.so
RAGE128_SRCS=radeon_vid.c
RAGE128_OBJS=rage128_vid.o
RAGE128_LIBS=-L../../libdha -ldha
-RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W -DRAGE128
+RAGE128_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DRAGE128
PM3_VID=pm3_vid.so
PM3_SRCS=pm3_vid.c
PM3_OBJS=pm3_vid.o
PM3_LIBS=-L../../libdha -ldha
-PM3_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+PM3_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
MACH64_VID=mach64_vid.so
MACH64_SRCS=mach64_vid.c
MACH64_OBJS=mach64_vid.o
MACH64_LIBS=-L../../libdha -ldha
-MACH64_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W -DRAGE128
+MACH64_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DRAGE128
MGA_VID=mga_vid.so
MGA_SRCS=mga_vid.c
MGA_OBJS=mga_vid.o
MGA_LIBS=-L../../libdha -ldha -lm
-MGA_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W
+MGA_CFLAGS=$(OPTFLAGS) -fPIC -I. -I..
MGA_CRTC2_VID=mga_crtc2_vid.so
MGA_CRTC2_SRCS=mga_vid.c
MGA_CRTC2_OBJS=mga_crtc2_vid.o
MGA_CRTC2_LIBS=-L../../libdha -ldha -lm
-MGA_CRTC2_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -Wall -W -DCRTC2
+MGA_CRTC2_CFLAGS=$(OPTFLAGS) -fPIC -I. -I.. -DCRTC2
all: $(RADEON_VID) $(RAGE128_VID) $(MACH64_VID) $(NVIDIA_VID) $(GENFB_VID) $(MGA_VID) $(MGA_CRTC2_VID) $(PM3_VID)
More information about the MPlayer-dev-eng
mailing list