[MPlayer-dev-eng] Intel C++ 8.0 Compiler patch.

Reimar Döffinger Reimar.Doeffinger at stud.uni-karlsruhe.de
Fri Jan 14 11:30:29 CET 2005


Hi,
On Fri, Jan 14, 2005 at 10:20:38AM +0200, Jan Knutar wrote:
> I get image corruption with icc and libmpeg2

That was to be expected. Please test the attached patch. It disables
aliasing optimization with gcc 3.x and icc for mp3lib and libmpeg2.
What do others think about it? Okay to apply?
Could not test with icc...

Greetings,
Reimar Döffinger
-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.952
diff -u -r1.952 configure
--- configure	14 Jan 2005 09:55:36 -0000	1.952
+++ configure	14 Jan 2005 10:15:08 -0000
@@ -6449,6 +6462,16 @@
 EOF
 fi
 
+if test -z "$BAD_ALIASING_CFLAGS" ; then
+  if [ "$cc_vendor" = "gnu" ] && [ "$_cc_major" -ge 3 ] ; then
+    BAD_ALIASING_CFLAGS="$CFLAGS -fno-strict-aliasing"
+  elif [ "$cc_vendor" = "intel" ] ; then
+    BAD_ALIASING_CFLAGS="$CFLAGS -fno-alias -fno-fnalias"
+  else
+    BAD_ALIASING_CFLAGS="$CFLAGS"
+  fi
+fi
+
 echocheck "automatic gdb attach"
 if test "$_crash_debug" = yes ; then
   _def_crash_debug='#define CRASH_DEBUG 1'
@@ -6647,6 +6670,7 @@
 # OPTFLAGS = -O4 $_profile $_debug $_march $_mcpu $_pipe -fomit-frame-pointer -ffast-math
 EXTRA_INC = $_inc_extra $_inc_gtk
 OPTFLAGS = -I../libvo -I../../libvo $_inc_x11 $CFLAGS \$(EXTRA_INC)
+OPTFLAGS_ALIASING = $BAD_ALIASING_CFLAGS
 STRIPBINARIES = $_stripbinaries
 HELP_FILE = $_mp_help
 
Index: mp3lib/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/mp3lib/Makefile,v
retrieving revision 1.39
diff -u -r1.39 Makefile
--- mp3lib/Makefile	28 Oct 2004 01:15:53 -0000	1.39
+++ mp3lib/Makefile	14 Jan 2005 10:15:08 -0000
@@ -7,7 +7,7 @@
 ifeq ($(TARGET_ARCH_SGI_MIPS),yes)
 OPTFLAGS := $(OPTFLAGS:-O4=-O0)
 endif
-CFLAGS  = -I.. $(OPTFLAGS) $(EXTRA_INC)
+CFLAGS  = -I.. $(OPTFLAGS_ALIASING) $(EXTRA_INC)
 ifeq ($(TARGET_ARCH_X86),yes)
 SRCS += decode_i586.c
 OBJS += decode_i586.o
Index: libmpeg2/Makefile
===================================================================
RCS file: /cvsroot/mplayer/main/libmpeg2/Makefile,v
retrieving revision 1.17
diff -u -r1.17 Makefile
--- libmpeg2/Makefile	22 Nov 2004 10:21:47 -0000	1.17
+++ libmpeg2/Makefile	14 Jan 2005 10:15:08 -0000
@@ -7,7 +7,7 @@
 
 OBJS	= $(SRCS:.c=.o)
 INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC)
-CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
+CFLAGS  = $(OPTFLAGS_ALIASING) $(INCLUDE) -DMPG12PLAY
 
 ifeq ($(TARGET_ARCH_X86),yes)
 SRCS += idct_mmx.c motion_comp_mmx.c


More information about the MPlayer-dev-eng mailing list