[FFmpeg-devel] Special optimization for PS3 Cell processor

Sakur Sakur.deagod
Wed May 9 20:04:27 CEST 2007

Hi Luca:
> Message: 6 Date: Wed, 09 May 2007 09:37:02 +0200 From: Luca Barbato 
> <lu_zero at gentoo.org> Subject: Re: [FFmpeg-devel] Special optimization 
> for PS3 Cell processor To: FFmpeg development discussions and patches 
> <ffmpeg-devel at mplayerhq.hu> Message-ID: <46417A1E.10105 at gentoo.org> 
> Content-Type: text/plain; charset=UTF-8 Sakur wrote:
>> > ----- IDCT put/add
>> > *vec_mradds(A,B,C)*:(for PPE)
>> > I am not sure if this is for ((A*B+214)>>15) + C.
>> > On SPE,there's no such a function,only spu_madd(A,B,C),also no
>> > saturation. Anyone know how to apply some tricks for this?
> /* vec_mradds (vector multiply round and add saturate) * ========== */ 
> static inline vec_short8 vec_mradds(vec_short8 a, vec_short8 b, 
> vec_short8 c) { vec_int4 round = (vec_int4)spu_splats(0x4000); 
> vec_short8 hi, lo; hi = (vec_short8)(spu_sl(spu_add(spu_mule(a, b), 
> round), 1)); lo = (vec_short8)(spu_rlmask(spu_add(spu_mulo(a, b), 
> round), -15)); return (vec_adds(spu_sel(hi, lo, ((vec_ushort8){0, 
> 0xFFFF, 0, 0xFFFF, 0, 0xFFFF, 0, 0xFFFF})), c)); } from vmx2spu.h
Really thanks for your help.  I am using the ffmpeg library  packed in 
gst-ffmpeg source,not knowing if it's the latest.  Could you inform me 
where is "vmxspu.h" located ? :)
>> > 
>> > P.S: According to some interesting test, the avi decoding performance on
>> > Cell PPE is only 20% of normal PC ,is that true?
> You have a system, test for yourself (I'm not really sure what you 
> mean with avi decoding, avi is a container). For h264 decoding it 
> behaves slightly worse than a G5 with the same clock more or less and 
> twice as fast as my G4, that has half of the clock right now. Given 
> that the PPU was expected to perform _REALLY_ poorly I'm quite 
> impressed, looks like ffmpeg code + gcc-4.3 strangely behave 
> relatively nicely.

    Very Sorry for the misleading. I mean avi docoding is  for AVI-xvid movie file streaming :).  It was a  test by another Gentoo guy,not rememberring the detail. Maybe I  wrongly remembered :).As far I see by now,tis not poor on my PS3FC5 ( I will change to Gentoo or Debian soon).
    Another question.  Does the latest CVS version contain workable spu support already. Any other things could I do to contribute for ffmpeg on Cell? Cell is a nice processor to program on.  


More information about the ffmpeg-devel mailing list