Commit 698f5c55 authored by michael's avatar michael

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


git-svn-id: file:///var/local/repositories/mplayer/trunk/postproc@15825 b3059339-0415-0410-9bf9-f77b7e298cf2
parent 45d2b8df
......@@ -400,6 +400,11 @@ static inline int yv12toyuy2_unscaled_altivec(SwsContext *c, uint8_t* src[], int
const int vertLumPerChroma = 2;
register unsigned int y;
if(width&15){
yv12toyuy2( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
return srcSliceH;
}
/* this code assume:
1) dst is 16 bytes-aligned
......@@ -474,6 +479,11 @@ static inline int yv12touyvy_unscaled_altivec(SwsContext *c, uint8_t* src[], int
const vector unsigned char yperm = vec_lvsl(0, ysrc);
register unsigned int y;
if(width&15){
yv12touyvy( ysrc, usrc, vsrc, dst,c->srcW,srcSliceH, lumStride, chromStride, dstStride);
return srcSliceH;
}
/* this code assume:
1) dst is 16 bytes-aligned
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment