[MPlayer-dev-eng] [PATCH] workaround for altivec const vars in gcc-3.4 (postproc/swscale_altivec_template.c)

Diego Biurrun diego at biurrun.de
Tue Jul 6 17:12:58 CEST 2004


Michael, have you had a look at this patch?

Diego

Luca Barbato writes:
> Michael Niedermayer wrote:
> > rejected
> As I thought.
> > 
> > this should be done with 
> > #if __GNUC__ ... &&  __GNUC_MINOR__ ...
> > #define const_vector vector 
> > 
> > or even better add a check for this to configure
> 
> Asking the gcc developers, the solution is remove those unneeded casts, 
> it works for every gcc with decent altivec support.
> 
> I hope that's ok as is now.
> 
> --- postproc/swscale_altivec_template.c	6 Apr 2004 00:25:47 -0000	1.2
> +++ postproc/swscale_altivec_template.c	26 May 2004 02:23:00 -0000
> @@ -26,11 +26,9 @@
>  static const vector unsigned int altivec_vectorShiftInt19 =
>    (vector unsigned int)(19, 19, 19, 19);
>  #else
> -static const vector signed int vzero =
> -  (vector signed int){0,0,0,0};
> +static const vector signed int vzero = {0,0,0,0};
>  static const vector unsigned int altivec_vectorShiftInt19 =
> -  (vector unsigned int){19, 19, 19, 19};
> -
> +  {19, 19, 19, 19};
>  #endif
>  
>  static inline void
> 




More information about the MPlayer-dev-eng mailing list