[MPlayer-users] cpu_state.c on OS/X fails to compile

Steven M. Schultz sms at 2BSD.COM
Fri Jun 13 08:22:40 CEST 2003


On Fri, 13 Jun 2003, Damion de Soto wrote:

> [Automatic answer: RTFM (read DOCS, FAQ), also read DOCS/bugreports.html]
> they look exactly like the errors Jessica Blank was getting when trying 
> to compile for OS/X just a few days ago.
> 

	I know what the problem is!

	Since I have been able to build and run 'mpeg2dec' + 'libmpeg2'
	from the CVS version of the libmpeg2 project I went and took a
	look at a newer libmpeg2

Hi -

> 	I'm not quite sure what's not right with libmpeg2/cpu_state.c but
> 	it is failing to compile on a G4 OS/X system tonight:
> 
> gcc -c -O4   -pipe -ffast-math -fomit-frame-pointer -no-cpp-precomp -DSYS_DARWIN -DCONFIG_DARWIN -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -I. -I../libvo -I..   -DMPG12PLAY -faltivec -o cpu_state.o cpu_state.c
> {standard input}:33:Parameter syntax error (parameter 1)
> {standard input}:34:Parameter syntax error (parameter 1)

	I have an idea what's not right now ;)

	Looking at the latest libmpeg2 (0.3.2) from mpeg2dec I see that
	cpu_state.c has some macros defined:

#ifdef ARCH_PPC
#ifdef HAVE_ALTIVEC_H   /* gnu */
#define LI(a,b) "li " #a "," #b "\n\t"
#define STVX0(a,b,c) "stvx " #a ",0," #c "\n\t"
#define STVX(a,b,c) "stvx " #a "," #b "," #c "\n\t"
#define LVX0(a,b,c) "lvx " #a ",0," #c "\n\t"
#define LVX(a,b,c) "lvx " #a "," #b "," #c "\n\t"
#else                   /* apple */
#define LI(a,b) "li r" #a "," #b "\n\t"
#define STVX0(a,b,c) "stvx v" #a ",0,r" #c "\n\t"
#define STVX(a,b,c) "stvx v" #a ",r" #b ",r" #c "\n\t"
#define LVX0(a,b,c) "lvx v" #a ",0,r" #c "\n\t"
#define LVX(a,b,c) "lvx v" #a ",r" #b ",r" #c "\n\t"
#endif

	and the assembly code is written using those macros.

	Updating libmpeg2/cpu_state.c will fix the problem but it's too
	late tonight to start that project.   	

	Perhaps one of the MPlayer developers can take a look at updating
	libmpeg2?  

	Cheers,
	Steven Schultz



More information about the MPlayer-users mailing list