comparison postproc/swscale_altivec_template.c @ 15824:53231c701b29

width % 16 != 0 workaround by (Nicolas Plourde: nicolas plourde, gmail com>) cleanup by me indention fixed second one must be yv12touyvy instead of yv12toyuy2 replace slow modulo by bitwise and move %16!=0 code before the comment saying the code cant handle %16!=0
author michael
date Mon, 27 Jun 2005 07:40:24 +0000
parents 931eee818c52
children 401b440a6d76
comparison
equal deleted inserted replaced
15823:500f49f31630 15824:53231c701b29
397 const int chromStride = srcStride[1]; 397 const int chromStride = srcStride[1];
398 const int dstStride = dstStride_a[0]; 398 const int dstStride = dstStride_a[0];
399 const vector unsigned char yperm = vec_lvsl(0, ysrc); 399 const vector unsigned char yperm = vec_lvsl(0, ysrc);
400 const int vertLumPerChroma = 2; 400 const int vertLumPerChroma = 2;
401 register unsigned int y; 401 register unsigned int y;
402
403 if(width&15){
404 yv12toyuy2( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
405 return srcSliceH;
406 }
402 407
403 /* this code assume: 408 /* this code assume:
404 409
405 1) dst is 16 bytes-aligned 410 1) dst is 16 bytes-aligned
406 2) dstStride is a multiple of 16 411 2) dstStride is a multiple of 16
472 const int dstStride = dstStride_a[0]; 477 const int dstStride = dstStride_a[0];
473 const int vertLumPerChroma = 2; 478 const int vertLumPerChroma = 2;
474 const vector unsigned char yperm = vec_lvsl(0, ysrc); 479 const vector unsigned char yperm = vec_lvsl(0, ysrc);
475 register unsigned int y; 480 register unsigned int y;
476 481
482 if(width&15){
483 yv12touyvy( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
484 return srcSliceH;
485 }
486
477 /* this code assume: 487 /* this code assume:
478 488
479 1) dst is 16 bytes-aligned 489 1) dst is 16 bytes-aligned
480 2) dstStride is a multiple of 16 490 2) dstStride is a multiple of 16
481 3) width is a multiple of 16 491 3) width is a multiple of 16