[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec/ppc dsputil_h264_template_altivec.c, 1.3, 1.4

Michael Niedermayer michaelni
Wed Feb 22 14:43:40 CET 2006


On Wed, Feb 22, 2006 at 11:50:42AM +0100, Luca Barbato wrote:
> Michael Niedermayer wrote:
> > 
> > hmm, this needs to be benchmarked (on a gcc which didnt misscompile it of
> > course) as it adds several instructions btw, has our ppc/alitvec maintainter
> > agreed to this?
> There aren't miscompile. Functiontype(cast) isn't supported on gcc-fsf
> since is a C++ism, so you have/should use a array cast, the problem is
> that functiontype casts of single items are equal as load of vector with
> all the element initialized with the item, array cast will produce a
> load of the single item in the first vector place and the rest zeroed.

and what is so terrible wrong with {5,5,5,5,5...} instead of (foobar faabur){5}

> I fixed the issue using inline produced costants since memory access is
> something you must avoid on altivec code as it costs lots more than
> other instructions, it should be faster even if they const are produced
> using 3 immediate instructions.

i think i would like to see some reference here which confirms that speed
and please keep in mind that global/static variables in PIC dont count,
neither do missaligned ones or otherwise gcc-bloatified ones (asm output
must be the same for both test cases except the memread / alternative)


More information about the ffmpeg-cvslog mailing list