Revision bc0a603c libavcodec/ppc/dsputil_altivec.c
libavcodec/ppc/dsputil_altivec.c  

230  230 
int i; 
231  231 
int s; 
232  232 
const vector unsigned int zero = (const vector unsigned int)vec_splat_u32(0); 
233 
vector unsigned char perm1, perm2, *pix1v, *pix2v;


233 
vector unsigned char perm1, perm2, pix1v_low, pix1v_high, pix2v_low, pix2v_high;


234  234 
vector unsigned char t1, t2, t3,t4, t5; 
235  235 
vector unsigned int sad; 
236  236 
vector signed int sumdiffs; 
...  ...  
241  241 
for (i = 0; i < h; i++) { 
242  242 
/* Read potentially unaligned pixels into t1 and t2 */ 
243  243 
perm1 = vec_lvsl(0, pix1); 
244 
pix1v = (vector unsigned char *) pix1; 

244 
pix1v_high = vec_ld( 0, pix1); 

245 
pix1v_low = vec_ld(15, pix1); 

245  246 
perm2 = vec_lvsl(0, pix2); 
246 
pix2v = (vector unsigned char *) pix2; 

247 
t1 = vec_perm(pix1v[0], pix1v[1], perm1); 

248 
t2 = vec_perm(pix2v[0], pix2v[1], perm2); 

247 
pix2v_high = vec_ld( 0, pix2); 

248 
pix2v_low = vec_ld(15, pix2); 

249 
t1 = vec_perm(pix1v_high, pix1v_low, perm1); 

250 
t2 = vec_perm(pix2v_high, pix2v_low, perm2); 

249  251  
250  252 
/* Calculate a sum of abs differences vector */ 
251  253 
t3 = vec_max(t1, t2); 
Also available in: Unified diff