changeset 1680:f6d2a4bc9bb5

Enable mediaLib support for Solaris on UltraSPARC CPUs
author jkeil
date Fri, 24 Aug 2001 16:20:04 +0000
parents 73c8f54305b1
children 445ea1ce4180
files Makefile configure libmpeg2/Makefile libvo/Makefile
diffstat 4 files changed, 31 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Fri Aug 24 16:12:28 2001 +0000
+++ b/Makefile	Fri Aug 24 16:20:04 2001 +0000
@@ -20,7 +20,7 @@
 OBJS = $(SRCS:.c=.o)
 CFLAGS = $(OPTFLAGS) -Iloader -Ilibvo $(CSS_INC) $(EXTRA_INC) # -Wall
 A_LIBS = -Lmp3lib -lMP3 -Llibac3 -lac3 $(ALSA_LIB) $(ESD_LIB)
-VO_LIBS = -Llibvo -lvo $(X_LIBS)
+VO_LIBS = -Llibvo -lvo $(MLIB_LIB) $(X_LIBS)
 
 PARTS = mp3lib libac3 libmpeg2 opendivx libavcodec encore libvo libao2 drivers drivers/syncfb
 
--- a/configure	Fri Aug 24 16:12:28 2001 +0000
+++ b/configure	Fri Aug 24 16:20:04 2001 +0000
@@ -451,7 +451,7 @@
 _xdpms=no
 _3dfx=no
 _syncfb=no
-_mlib=no
+_mlib=no _mlibdir=/opt/SUNWmlib
 _xmga=autodetect
 _dga=no
 _dga2=no
@@ -897,9 +897,18 @@
 $_cc $_extraincdir $_extralibdir -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_LARGEFILE64_SOURCE $TMPC -o $TMPO -ldvdread > /dev/null 2>&1 && \
  { _dvdread=yes;_largefiles=yes; }
 
+
+cat > $TMPC << EOF
+#include <mlib.h>
+int main( void ) { mlib_VideoColorYUV2ABGR420(0,0,0,0,0,0,0,0,0); return 0; }
+EOF
+$_cc $_extraincdir $_extralibdir -I$_mlibdir/include $TMPC -o $TMPO -L$_mlibdir/lib -lmlib 9>/dev/null 2>&1 && _mlib=yes;
+
+
 rm -f $TMPC $TMPO
 
 
+
 # ---
 # check availability of some header files
 
@@ -1253,6 +1262,10 @@
         _cssincdir=`echo $ac_option | cut -d '=' -f 2`
         _css='yes';
         ;;
+  --with-mlibdir=*)
+        _mlibdir=`echo $ac_option | cut -d '=' -f 2`
+	_mlib=yes
+        ;;
   --size-x=*)
 	_x=`echo $ac_option | cut -d '=' -f 2`
 	;;
@@ -1450,6 +1463,7 @@
 echo "Checking for ALSA Audio ... $_alsaver"
 echo "Checking for ESD Audio ... $_esd"
 echo "Checking for Sun Audio ... $_sun_audio"
+echo "Checking for Sun mediaLib ... $_mlib"
 echo "Checking for DeCSS support ... $_css"
 echo "Checking for DVDread support ... $_dvdread"
 echo "Checking for PNG support ... $_png"
@@ -1765,9 +1779,12 @@
 
 if [ $_mlib = yes ]; then
  _mlib='#define HAVE_MLIB'
+ _mlibinc="-I$_mlibdir/include"
+ _mliblib="-L$_mlibdir/lib -R$_mlibdir/lib -lmlib"
  _vosrc=$_vosrc' yuv2rgb_mlib.c'
 else
  _mlib='#undef HAVE_MLIB'
+ _mlibinc= _mliblib=
 fi
 
 # ---
@@ -1930,6 +1947,8 @@
 STREAM_SRCS = $_streamingsrcs
 DECORE_LIBS = $_decorelibs
 DIVX4LINUX=$_divx4linux
+MLIB_INC = $_mlibinc
+MLIB_LIB = $_mliblib
 
 # --- Some stuff for autoconfigure ----
 $_target_arch
@@ -2109,6 +2128,11 @@
 #define USE_MMX_IDCT
 #endif
 
+/* libmpeg2 uses a different feature test macro for mediaLib */
+#ifdef HAVE_MLIB
+#define	LIBMPEG2_MLIB
+#endif
+
 /* libvo options */
 #define SCREEN_SIZE_X $_x
 #define SCREEN_SIZE_Y $_y
--- a/libmpeg2/Makefile	Fri Aug 24 16:12:28 2001 +0000
+++ b/libmpeg2/Makefile	Fri Aug 24 16:20:04 2001 +0000
@@ -3,9 +3,11 @@
 
 include ../config.mak
 
-SRCS	= header.c idct.c idct_mmx.c motion_comp.c motion_comp_mmx.c slice.c stats.c decode.c
+SRCS	= header.c idct.c idct_mmx.c idct_mlib.c \
+		motion_comp.c motion_comp_mmx.c motion_comp_mlib.c \
+		slice.c stats.c decode.c
 OBJS	= $(SRCS:.c=.o)
-INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC)
+INCLUDE = -I. -I../libvo -I.. $(EXTRA_INC) $(MLIB_INC)
 CFLAGS  = $(OPTFLAGS) $(INCLUDE) -DMPG12PLAY
 
 .SUFFIXES: .c .o
--- a/libvo/Makefile	Fri Aug 24 16:12:28 2001 +0000
+++ b/libvo/Makefile	Fri Aug 24 16:20:04 2001 +0000
@@ -10,7 +10,7 @@
 SRCS += rgb15to16mmx.c yuv2rgb_mmx.c
 endif
 
-CFLAGS  = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) -DMPG12PLAY #-Wall
+CFLAGS  = $(OPTFLAGS) -I. -I.. $(SDL_INC) $(X11_INC) $(EXTRA_INC) $(MLIB_INC) -DMPG12PLAY #-Wall
 # -I/usr/X11R6/include/
 
 .SUFFIXES: .c .o