[MPlayer-dev-eng] [PATCH] better detction for sparc cpu's and compile fix for libmpeg2

Diego Biurrun diego at biurrun.de
Thu Aug 26 14:53:44 CEST 2004


jb13 at gomerbud.com writes:
> On Sat, Aug 14, 2004 at 06:19:36PM +0200, Diego Biurrun wrote:
> > jb13 at gomerbud.com writes:
> > > --- libmpeg2/motion_comp.c	2 Aug 2004 11:20:38 -0000	1.7
> > > +++ libmpeg2/motion_comp.c	5 Aug 2004 01:55:51 -0000
> > > @@ -55,10 +55,12 @@
> > >      else
> > >  #endif
> > >  #ifdef ARCH_SPARC
> > > +#ifdef HAVE_VIS
> > 
> > I think
> > 
> > #if defined(ARCH_SPARC) && defined(HAVE_VIS)
> > 
> > would be better, but we already have the other style in that file.
> 
> maybe you'll like this better?
> 
> --- libmpeg2/motion_comp.c	14 Aug 2004 15:17:39 -0000	1.8
> +++ libmpeg2/motion_comp.c	16 Aug 2004 09:24:29 -0000
> @@ -54,13 +54,11 @@
>  	mpeg2_mc = mpeg2_mc_alpha;
>      else
>  #endif
> -#ifdef ARCH_SPARC
> -#ifdef HAVE_VIS
> +#ifdef HAVE_VIS /* For UltraSparc */
>      if (accel & MPEG2_ACCEL_SPARC_VIS)
>  	mpeg2_mc = mpeg2_mc_vis;
>      else
>  #endif
> -#endif
>  	mpeg2_mc = mpeg2_mc_c;
>  }

If nobody objects I'll apply the following patch in the next few days.
It makes the #ifdef more consistent in that file.

Diego


--- libmpeg2/motion_comp.c	14 Aug 2004 15:17:39 -0000	1.8
+++ libmpeg2/motion_comp.c	26 Aug 2004 12:52:15 -0000
@@ -42,25 +42,21 @@
 	mpeg2_mc = mpeg2_mc_mmx;
     else
 #endif
-#ifdef ARCH_PPC
-#ifdef HAVE_ALTIVEC
+#if defined(ARCH_PPC) && defined(HAVE_ALTIVEC)
     if (accel & MPEG2_ACCEL_PPC_ALTIVEC)
 	mpeg2_mc = mpeg2_mc_altivec;
     else
 #endif
-#endif
 #ifdef ARCH_ALPHA
     if (accel & MPEG2_ACCEL_ALPHA)
 	mpeg2_mc = mpeg2_mc_alpha;
     else
 #endif
-#ifdef ARCH_SPARC
-#ifdef HAVE_VIS
+#if defined(ARCH_SPARC) && defined(HAVE_VIS)
     if (accel & MPEG2_ACCEL_SPARC_VIS)
 	mpeg2_mc = mpeg2_mc_vis;
     else
 #endif
-#endif
 	mpeg2_mc = mpeg2_mc_c;
 }
 




More information about the MPlayer-dev-eng mailing list