diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-17 13:28:44 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2007-02-17 13:28:44 +0000 |
commit | 099c9b26f4a2d4feb35f6f782ab8ecebf15e934c (patch) | |
tree | 7706d872042224cd578dadff76ae26d17849ef56 /libswscale | |
parent | 28f35b52f686fcbf8b1cda96b6147f7084860aad (diff) | |
download | mpv-099c9b26f4a2d4feb35f6f782ab8ecebf15e934c.tar.bz2 mpv-099c9b26f4a2d4feb35f6f782ab8ecebf15e934c.tar.xz |
negative stride and h_size-=8 fix
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@22247 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'libswscale')
-rw-r--r-- | libswscale/yuv2rgb_template.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/libswscale/yuv2rgb_template.c b/libswscale/yuv2rgb_template.c index 615f083a22..28ee24add2 100644 --- a/libswscale/yuv2rgb_template.c +++ b/libswscale/yuv2rgb_template.c @@ -133,7 +133,7 @@ static inline int RENAME(yuv420_rgb16)(SwsContext *c, uint8_t* src[], int srcStr } h_size= (c->dstW+7)&~7; - if(h_size*2 > dstStride[0]) h_size-=8; + if(h_size*2 > FFABS(dstStride[0])) h_size-=8; __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], @@ -228,7 +228,7 @@ static inline int RENAME(yuv420_rgb15)(SwsContext *c, uint8_t* src[], int srcStr } h_size= (c->dstW+7)&~7; - if(h_size*2 > dstStride[0]) h_size-=8; + if(h_size*2 > FFABS(dstStride[0])) h_size-=8; __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); //printf("%X %X %X %X %X %X %X %X %X %X\n", (int)&c->redDither, (int)&b5Dither, (int)src[0], (int)src[1], (int)src[2], (int)dst[0], @@ -317,7 +317,7 @@ static inline int RENAME(yuv420_rgb24)(SwsContext *c, uint8_t* src[], int srcStr } h_size= (c->dstW+7)&~7; - if(h_size*3 > dstStride[0]) h_size-=8; + if(h_size*3 > FFABS(dstStride[0])) h_size-=8; __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); @@ -463,7 +463,7 @@ static inline int RENAME(yuv420_rgb32)(SwsContext *c, uint8_t* src[], int srcStr } h_size= (c->dstW+7)&~7; - if(h_size*4 > dstStride[0]) h_size-=8; + if(h_size*4 > FFABS(dstStride[0])) h_size-=8; __asm__ __volatile__ ("pxor %mm4, %mm4;" /* zero mm4 */ ); |