logo       

Re: Playing MPEG with 1_rc0a-0 badly broken on PPC (all pink video): msg#00096

video.xine.devel

Subject: Re: Playing MPEG with 1_rc0a-0 badly broken on PPC (all pink video)

Hi Michael,

On Sat, 9 Aug 2003, Michael Roitzsch wrote:

> > After much investigation, I traced the problem to the following
> > change made on July 12:
> >
> [snip]
> > + dnl
> > + dnl Multipass compilation
> > + dnl
> [snap]
>
> Are you absolutely sure about that? I am asking because this patch does
> not change anything in the compilation except when one of the following
> conditions are met:
>
> * you are using icc instead of gcc (which is impossible on PPC)

Using gcc.

> * you are doing a "make pass1" or a "make pass2"
> (You see you have to explicitly request multipass compilation.)

Not doing that.

> * you have the environment variable $MULTIPASS_CFLAGS set

Not set.

> To be sure about what's going on here, could you please do this:
> - revert the patch (as you already did)

To be clear, I didn't actually use a cvs command to revert the patch.
I just manually edited the xine-lib/configure.ac, xine-lib/Makefile.am,
and xine-lib/misc/Makefile.common files to remove the multipass stuff
(I didn't touch the part of the patch related to icc). Thus the actual
changes I made are:

--------------------------------------------------------------------------------
diff -ur xine-lib-080903.dist/configure.ac xine-lib-080903.mod/configure.ac
--- xine-lib-080903.dist/configure.ac 2003-08-07 05:26:53.000000000 -0400
+++ xine-lib-080903.mod/configure.ac 2003-08-09 12:40:42.000000000 -0400
@@ -949,13 +949,6 @@
AC_TRY_CFLAGS("-fno-rename-registers", W32_NO_OPTIMIZE="$W32_NO_OPTIMIZE
-fno-rename-registers",)
AC_SUBST(W32_NO_OPTIMIZE)
dnl
- dnl Multipass compilation
- dnl
- AC_TRY_CFLAGS("-fprofile-arcs", PASS1_CFLAGS="$PASS1_CFLAGS
-fprofile_arcs",)
- AC_TRY_CFLAGS("-fbranch-probabilities", PASS2_CFLAGS="$PASS2_CFLAGS
-fbranch-probabilities",)
- AC_SUBST(PASS1_CFLAGS)
- AC_SUBST(PASS2_CFLAGS)
- dnl
dnl Warnings
dnl
CFLAGS="$CFLAGS -Wchar-subscripts -Wmissing-declarations
-Wmissing-prototypes"
@@ -975,7 +968,7 @@


dnl Common cflags for all platforms
-CFLAGS="$CFLAGS $wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE
\$(MULTIPASS_CFLAGS)"
+CFLAGS="$CFLAGS $wall -D_REENTRANT -D_FILE_OFFSET_BITS=64 -DXINE_COMPILE"
DEBUG_CFLAGS="$DEBUG_CFLAGS $wall -D_REENTRANT -D_FILE_OFFSET_BITS=64
-DXINE_COMPILE"

enable_w32dll="no"
diff -ur xine-lib-080903.dist/Makefile.am xine-lib-080903.mod/Makefile.am
--- xine-lib-080903.dist/Makefile.am 2003-07-12 08:31:14.000000000 -0400
+++ xine-lib-080903.mod/Makefile.am 2003-08-09 12:41:59.000000000 -0400
@@ -41,13 +41,6 @@
@cd doc && $(MAKE) $@


-pass1:
- @$(MAKE) MULTIPASS_CFLAGS='$(PASS1_CFLAGS)'
-
-pass2:
- @$(MAKE) MULTIPASS_CFLAGS='$(PASS2_CFLAGS)'
-
-
debug:
@list='$(SUBDIRS)'; for subdir in $$list; do \
(cd $$subdir && $(MAKE) $@) || exit;\
diff -ur xine-lib-080903.dist/misc/Makefile.common
xine-lib-080903.mod/misc/Makefile.common
--- xine-lib-080903.dist/misc/Makefile.common 2003-07-12 08:31:14.000000000
-0400
+++ xine-lib-080903.mod/misc/Makefile.common 2003-08-09 12:42:17.000000000
-0400
@@ -13,12 +13,6 @@
fi \
fi

-pass1:
- @$(MAKE) MULTIPASS_CFLAGS="$(PASS1_CFLAGS)"
-
-pass2:
- @$(MAKE) MULTIPASS_CFLAGS="$(PASS2_CFLAGS)"
-
debug:
@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"

--------------------------------------------------------------------------------

This was against a copy of a fresh cvs checkout of the latest xine-lib.

> - do a fresh ./configure and a "make clean all install"

Installed this into a clean install directory and it worked fine.

> - save the Makefile from xine-lib/src/libmpeg2 in a safe place

Did that.

> - apply the patch again

Just made another copy of the fresh cvs checkout of the latest xine-lib
(without my change to remove the multipass stuff).

> - rebuild the configure script with autoconf

Did that.

> - do another fresh ./configure and a "make clean all install"

Installed this into a clean install directory and it was broken
once again, although in a slightly different way. Now I get no
video at all (just a green screen).

> - take the new libmpeg2 Makefile and "diff -u" it against the old one
> - send us the diff

OK, here it is:

--------------------------------------------------------------------------------
--- xine-libmpeg2.good 2003-08-09 12:53:39.000000000 -0400
+++ xine-libmpeg2.bad 2003-08-09 13:19:36.000000000 -0400
@@ -163,8 +163,8 @@
OGG_LIBS =
OPENGL_LIBS = -lGL
PACKAGE = xine-lib
-PASS1_CFLAGS =
-PASS2_CFLAGS =
+PASS1_CFLAGS = -fprofile_arcs
+PASS2_CFLAGS = -fbranch-probabilities
PKG_CONFIG = /usr/bin/pkg-config
PNG_CFLAGS =
PNG_LIBS = -lpng
@@ -198,7 +198,7 @@
XINE_ACFLAGS = -I ${prefix}/share/aclocal
XINE_BIN_AGE =
XINE_BUILD_CC = gcc version 3.2.2 20030217 (Yellow Dog Linux 3.0 3.2.2-2a)
-XINE_BUILD_DATE = Sat 09 Aug 2003 12:51:07
+XINE_BUILD_DATE = Sat 09 Aug 2003 13:18:29
XINE_BUILD_OS = Linux 2.4.20-ben10-bill-smp ppc
XINE_DATADIR = /usr/local/install/xine-cvs/share/xine
XINE_FONTDIR = ${prefix}/share/xine/libxine1/fonts
@@ -293,7 +293,7 @@
CCLD = $(CC)
LINK = $(LIBTOOL) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \
$(AM_LDFLAGS) $(LDFLAGS) -o $@
-CFLAGS = -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wcast-align -Wpointer-arith -Wall -D_REENTRANT
-D_FILE_OFFSET_BITS=64 -DXINE_COMPILE -O3 -pipe -fomit-frame-pointer
-fexpensive-optimizations -fschedule-insns2 -fno-strict-aliasing -ffast-math
-funroll-loops -funroll-all-loops -finline-functions -Wa,-m7400
-I/usr/include/kde/artsc
+CFLAGS = -Wchar-subscripts -Wmissing-declarations -Wmissing-prototypes
-Wnested-externs -Wcast-align -Wpointer-arith -Wall -D_REENTRANT
-D_FILE_OFFSET_BITS=64 -DXINE_COMPILE $(MULTIPASS_CFLAGS) -O3 -pipe
-fomit-frame-pointer -fexpensive-optimizations -fschedule-insns2
-fno-strict-aliasing -ffast-math -funroll-loops -funroll-all-loops
-finline-functions -Wa,-m7400 -I/usr/include/kde/artsc
DIST_SOURCES = $(xineplug_decode_mpeg2_la_SOURCES)
HEADERS = $(noinst_HEADERS)

@@ -546,6 +546,12 @@
fi \
fi

+pass1:
+ @$(MAKE) MULTIPASS_CFLAGS="$(PASS1_CFLAGS)"
+
+pass2:
+ @$(MAKE) MULTIPASS_CFLAGS="$(PASS2_CFLAGS)"
+
debug:
@$(MAKE) CFLAGS="$(DEBUG_CFLAGS)"

--------------------------------------------------------------------------------

>From your previous explanation, I can see that the above changes
shouldn't really have an effect on the build process.

However, in comparing the working and non-working build directories,
I happened to notice another change that could be significant, namely
to the xine-lib/config.h file:

11c11
< #define ATTRIBUTE_ALIGNED_MAX 64
---
> /* #undef ATTRIBUTE_ALIGNED_MAX */

The non-working build is the one with ATTRIBUTE_ALIGNED_MAX commented
out.

I then went into the non-working build directory, edited config.h
to have:

#define ATTRIBUTE_ALIGNED_MAX 64

I then did a make clean, make, and make install into a clean install
directory, and the resulting installed xine-lib worked fine. So this
seems to be the underlying problem causing the bad video.

I do not know why the multipass compile changes cause the definition
of ATTRIBUTE_ALIGNED_MAX in config.h to be messed up.

-Bill


-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100003ave/direct;at.aspnet_072303_01/01


<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise