[PD-dev] [GEM] Further CVS changes

chris clepper cclepper at artic.edu
Thu Jan 30 01:17:29 CET 2003

I added some more yuv processing to pix_add, diff, multiply, and 
subtract.  I'm not sure if it's possible for someone to check for 
functionality on Windows or Linux, but the compile needs to be 
checked at the very least.  I don't think anything will go wrong, but 
you never know.

Also, what are people's thoughts on optimizing the code?  For 
example, I rewrote, but haven't committed, the RGBA part of pix_gain 
to use ints rather than floats in the loop and it's twice as fast now 
on PPC.  A lot can be done with the pix_ code in terms of 
optimization.  Here's a breakdown of CPU use for various pix_gain 
functions on a 1ghz g4 processing DV_NTSC at 30fps:

pix_gain - original RGBA- 49% cpu use
pix_gain - int rewrite RGBA - 24%
pix_gain - yuv scalar - 14% cpu
pix_gain - yuv altivec - 2% cpu

Obviously these results show that performance gains can be huge if 
certain optimizations are done.  Is any one doing this for x86?  I 
see that there are two MMX functions that someone added, are there 
plans for more? It's probably a good idea to put structures in place, 
up front, to make sure that code compiles across platforms and there 
are not crashes on various processors.  Are #ifdefs enough at this 
point?  We (tigital and myself) are trying to figure out the best way 
to get this altivec code into CVS and have it not impact the x86 side 
of things.


More information about the Pd-dev mailing list