diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-27 07:40:24 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2005-06-27 07:40:24 +0000 |
commit | 55f6ab49eb4fded988e2d893c7e7811768d182e7 (patch) | |
tree | bfd0ee51ec0e648e5652bd79d0eb1d022a745ba2 /postproc | |
parent | d477750980b6719d4ab31ef444bf72c6e25c3378 (diff) | |
download | mpv-55f6ab49eb4fded988e2d893c7e7811768d182e7.tar.bz2 mpv-55f6ab49eb4fded988e2d893c7e7811768d182e7.tar.xz |
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: svn://svn.mplayerhq.hu/mplayer/trunk@15825 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r-- | postproc/swscale_altivec_template.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/postproc/swscale_altivec_template.c b/postproc/swscale_altivec_template.c index f5c7b965f6..93ae41fcdf 100644 --- a/postproc/swscale_altivec_template.c +++ b/postproc/swscale_altivec_template.c @@ -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 |