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

Luca Barbato lu_zero at gentoo.org
Wed May 26 15:01:19 CEST 2004


Romain Dolbeau wrote:
> Luca Barbato wrote:
> 
>> Asking the gcc developers, the solution is remove those unneeded 
>> casts, it works for every gcc with decent altivec support.
> 
> 
> ROTFL. The did say "decent altivec support" ? FSF gcc can't
> compile some of my code (after allocating  1GiB it explodes),
> and sometimes manage to screw up what is compiled.
> 
> They really should have borrowed the motorola/apple version
> of the code.
> 
<flame>
Do your homework

take a look at the altivec.h and you'll discover why that happens...

(already found in libmpeg2 and fixed ages ago btw=E)
</flame>
The problem with bigger and bigger intermediate files (and ram usage) is 
just due the fact there are many preprocessor expansion if you use 
nested altivec functions. The quick solution is split them a bit (2 
levels is the most you can get w/out depleting your ram), the better 
solution is improve the preprocessor or the macros in altivec.h

The problem with screw up result MAY be due something like having 
-fstrict-aliasing on when building code that uses type punning.

If you are sure that your code and the requested optimization are sane, 
please use the bugzilla to report the problem and not complain on a 
completely unrelated ml.

lu

-- 
Luca Barbato
Developer
Gentoo Linux				http://www.gentoo.org/~lu_zero





More information about the MPlayer-dev-eng mailing list