[MPlayer-users] Re: altivec

Magnus Damm damm at opensource.se
Wed Oct 15 18:56:47 CEST 2003


Hi there,

Lets take it step by step. 

1. Is it possible to compile mplayer with altivec disabled?
   I know that you want to have altivec enabled, but just to make sure
   the problem is altivec-specific. I compile with altivec enabled under
   Linux without any problems.
2. It looks like the files are compiled with "-maltivec -mabi=altivec".
   This is normal under Linux, but the Darwin (OS X) variant of GCC
   should use "-faltivec". But someone reported that some version of
   GCC under Darwin accepted by ignored "-maltivec -mabi=altivec",
   and that will sure mess up the configure script.

Try applying the attached patch and see if gcc will be passed
"-faltivec" instead of "-maltivec -mabi=altivec" after you have 
re-run configure. And see if that solved some of the problems.

Thanks.

/ magnus


On Wed, 15 Oct 2003 12:32:04 +0200
Christoph Nägeli <chn at kbw.ch> wrote:

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> Hi,
> 
> To answer your (Magnus Damm) question about the version. I first tried 
> the MPlayer-1.0pre2, but that didn't work so I now use the newest cvs 
> version.
> I still have problems compiling mplayer with altivec support.
> 
> First I tried on my PowerBook G4 with gcc-3.3 (August Update from 
> Apple) on MacOS 10.2.8
> I configured it normaly and then tried to compile it. The first problem 
> seems to be with the 'dcbzl' assembler instruction.
> gcc output looks like this:
> 
> gcc -Wall -O4 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe 
> -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN 
> -Wl,-bind_at_load -DCONFIG_DARWIN -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 
> -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o libpostproc/postprocess.o 
> libpostproc/postprocess.c
> In file included from libpostproc/postprocess.c:492:
> libpostproc/postprocess_template.c: In function `postProcess_C':
> libpostproc/postprocess_template.c:2791: warning: unused variable 
> `mbWidth'
> libpostproc/postprocess.c: At top level:
> libpostproc/postprocess.c:118: warning: `clip_tab' defined but not used
> gcc: -bind_at_load: linker input file unused because linking not done
> gcc -Wall -O4 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe 
> -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN 
> -Wl,-bind_at_load -DCONFIG_DARWIN -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 
> -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ppc/dsputil_ppc.o 
> ppc/dsputil_ppc.c
> avcodec.h:211: warning: `Motion_Est_QTab' defined but not used
> {standard input}:67:dcbzl instruction is only for 64-bit 
> implementations (not allowed without -force_cpusubtype_ALL option)
> {standard input}:93:dcbzl instruction is only for 64-bit 
> implementations (not allowed without -force_cpusubtype_ALL option)
> {standard input}:144:dcbzl instruction is only for 64-bit 
> implementations (not allowed without -force_cpusubtype_ALL option)
> .......
> 
> I thought about removing the -force_cpusubtype_ALL, so I used grep to 
> find that expression in the mplayer directory (incl. subdirectories) 
> but I couldn't find it.
> After that I modified the header file dsputil_ppc.h that it always 
> defines NO_DCBZL. That worked for this problem (I don't use the dcbzl 
> instruction on a G4 anyway).
> 
> 
> The next problem is then this:
> 
> gcc -Wall -O4 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe 
> -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN 
> -Wl,-bind_at_load -DCONFIG_DARWIN -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 
> -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o ppc/dsputil_altivec.o 
> ppc/dsputil_altivec.c
> ppc/dsputil_altivec.c: In function `pix_abs16x16_x2_altivec':
> ppc/dsputil_altivec.c:52: error: syntax error before "unsigned"
> ppc/dsputil_altivec.c:53: error: `vector' undeclared (first use in this 
> function)
> ppc/dsputil_altivec.c:53: error: (Each undeclared identifier is 
> reported only once
> ppc/dsputil_altivec.c:53: error: for each function it appears in.)
> ppc/dsputil_altivec.c:59: error: `sad' undeclared (first use in this 
> function)
> ......
> 
> I think the modifier (?, word?) vector is unknown to the compiler.
> I remembered that on 7 Oct, there was a message from Steven M. Schultz 
> on this mailing list about the same problem.
> I read the all the mails about that and he wrote that he manually 
> edited the config.h file
> 
> #undef HAVE_ALTIVEC
> =>
> #define HAVE_ALTIVEC
> 
> But that didn't solve the it, now it appears even earlier in 
> imgrespample.c...
> 
> gcc -Wall -O4 -mcpu=7450 -mtune=7450 -maltivec -mabi=altivec -pipe 
> -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN 
> -Wl,-bind_at_load -DCONFIG_DARWIN -D_LARGEFILE_SOURCE 
> -D_FILE_OFFSET_BITS=64 -DHAVE_AV_CONFIG_H -I.. -D_FILE_OFFSET_BITS=64 
> -D_LARGEFILE_SOURCE -D_GNU_SOURCE -c -o imgresample.o imgresample.c
> imgresample.c:276: error: parse error before "vector"
> imgresample.c:276: warning: no semicolon at end of struct or union
> imgresample.c:278: error: parse error before '}' token
> imgresample.c:278: warning: type defaults to `int' in declaration of 
> `vec_uc_t'
> .....
> 
> He said he would post this message to the ffmpeg mailing list so I also 
> had a look at the ffmpeg mailing list but I couldn't find any message 
> about this...
> 
> I was wondering these problems exists on other ppc's, too.
> I also tried it on a PowerMac G5 1.8 and there was the same problem 
> with the dcbzl instruction...
> I didn't modify the header since if I disable dcbzl manually with the 
> NO_DCBZL then the g5 uses the dcbz instruction and that shouldn't be 
> for performance reasons (the g5 runs MacOS 10.2.8, too with august 
> update of gcc (3.3)).
> 
> 
> The last thing I did was compiling mplayer on a iBook (=> no altivec / 
> same settings).
> That works without modifying any file.
> 
> 
> Any ideas what else I should try?
> Or why my compiler doesn't understand the vector modifier (altivec 
> specific things)?
> 
> Regards
> Christoph
> 
> 
> On Mittwoch, Oktober 15, 2003, at 12:52  Uhr, Magnus Damm wrote:
> >
> > Date: Tue, 14 Oct 2003 23:43:38 +0200
> > From: Magnus Damm <damm at opensource.se>
> > To: "MPlayer user's list." <mplayer-users at mplayerhq.hu>
> > Subject: Re: [MPlayer-users] altivec
> > Message-ID: <20031014234338.73081636.damm at opensource.se>
> > In-Reply-To: <51E85392-FE40-11D7-9B35-000A95772E90 at kbw.ch>
> > References: <51E85392-FE40-11D7-9B35-000A95772E90 at kbw.ch>
> > Content-Type: text/plain; charset=ISO-8859-1
> > MIME-Version: 1.0
> > Content-Transfer-Encoding: 8bit
> > Precedence: list
> > Reply-To: "MPlayer user's list." <mplayer-users at mplayerhq.hu>
> > Message: 3
> >
> > Hi there,
> >
> > I think the gcc version included with MacOS X supports altivec without
> > that file. If you run Linux on your Mac (like I do) you will notice 
> > that
> > the altivec implementation used by gcc under Linux includes a 
> > altivec.h.
> > So you don't need it if you run OS X. And under Linux it's shipped 
> > with gcc.
> >
> > Did you use MPlayer-1.0pre2? If you are experiencing problems with 
> > enabling
> > altivec under OS X, please report back to the list.
> >
> > Thanks.
> >
> > / magnus
> >
> > On Tue, 14 Oct 2003 14:17:03 +0200
> > Christoph Nägeli <chn at kbw.ch> wrote:
> >
> >> [Automatic answer: RTFM (read DOCS, FAQ), also read 
> >> DOCS/bugreports.html]
> >> Hello,
> >>
> >> The configuration script runs a test looking for a file called
> >> altivec.h.
> >> Where can I get that file? I found documentation about this file in 
> >> the
> >> gcc documentation but I couldn't find the file itself.
> >> Do I have to download it? If yes, where?
> >>
> >> Regards
> >> Christoph
> >>
> >> _______________________________________________
> >> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
> >> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
> >> http://mplayerhq.hu/mailman/listinfo/mplayer-users
> 
> 
> _______________________________________________
> RTFM!!!  http://www.MPlayerHQ.hu/DOCS
> Search:  http://www.MPlayerHQ.hu/cgi-bin/htsearch
> http://mplayerhq.hu/mailman/listinfo/mplayer-users
-------------- next part --------------
A non-text attachment was scrubbed...
Name: mplayer-cvs_main_20031008-configure-osx.patch
Type: application/octet-stream
Size: 623 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/mplayer-users/attachments/20031015/dd16d994/attachment.obj>


More information about the MPlayer-users mailing list