[MPlayer-dev-eng] altivec support for netbsd/powerpc platforms

matthew green mrg at eterna.com.au
Mon Mar 29 17:27:28 CEST 2004


hi folks.


i have working altivecified mplayer on netbsd/macppc.  :-)  it was
just a simple patch to `configure'.  i had to disable the support
for pre- GCC 3.4.  3.2 and prior always crashed for me in the past
and 3.3.3 still does building the mpeg2 altivec source.  with GCC
3.4 it all worked however, and my mplayer runs *way* faster than
before.  some movies i was only able to watch with -hardframedrop
(10-20% of video frames?) now play with 35% spare cpu.  given that
X is using 1/2 the cpu, mplayer is 2-2.5x faster!


below are two changes.  the simple config patch to enable altivec
support on netbsd, and another C-sequence point issue that GCC
complained about.  could you folks commit both of these?  thanks!


.mrg.

-------------- next part --------------
Index: configure
===================================================================
RCS file: /cvsroot/mplayer/main/configure,v
retrieving revision 1.840
diff -p -u -r1.840 configure
--- configure	27 Mar 2004 20:19:57 -0000	1.840
+++ configure	29 Mar 2004 15:15:38 -0000
@@ -876,6 +876,17 @@ EOF
 	    _altivec=yes
 	fi
     fi
+    if netbsd ; then
+	case $cc_version in
+	    2*|3.0*|3.1*|3.2*)
+	      ;;
+	    *)
+	      if [ `sysctl -n machdep.altivec` -eq 1 ]; then
+	    _altivec=yes
+	      fi
+	      ;;
+	esac
+    fi
     if test "$_altivec" = yes; then
         echores "$proc altivec"
     else
Index: libmpdemux/demux_viv.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpdemux/demux_viv.c,v
retrieving revision 1.26
diff -p -u -r1.26 demux_viv.c
--- libmpdemux/demux_viv.c	15 Dec 2003 22:39:32 -0000	1.26
+++ libmpdemux/demux_viv.c	29 Mar 2004 15:15:45 -0000
@@ -714,6 +714,7 @@ if (demuxer->audio->id >= -1){
 		sh->ds=demuxer->audio;
 		demuxer->audio->id=1;
 nosound:
+	;
 }
 }
 


More information about the MPlayer-dev-eng mailing list