diff options
author | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-02 19:21:02 +0000 |
---|---|---|
committer | michael <michael@b3059339-0415-0410-9bf9-f77b7e298cf2> | 2001-11-02 19:21:02 +0000 |
commit | 65047706ac94a1222f386fde146fd50ff3f6f43d (patch) | |
tree | 1055ac8fa4f51bd7996b192967da99d21b31ab42 /postproc | |
parent | e6365f7f26a9a4f6cd9c6c51bf3af424fea35d9a (diff) |
right green line bugfix for width not %8==0 (untested -vo vesa doesnt work)
git-svn-id: svn://svn.mplayerhq.hu/mplayer/trunk@2639 b3059339-0415-0410-9bf9-f77b7e298cf2
Diffstat (limited to 'postproc')
-rw-r--r-- | postproc/swscale.c | 13 | ||||
-rw-r--r-- | postproc/swscale_template.c | 13 |
2 files changed, 24 insertions, 2 deletions
diff --git a/postproc/swscale.c b/postproc/swscale.c index 58fc837e0d..8aa0c38340 100644 --- a/postproc/swscale.c +++ b/postproc/swscale.c @@ -1399,7 +1399,7 @@ static int old_s_xinc= -1; int srcWidth= (dstw*s_xinc + 0x8000)>>16; int dstUVw= fullUVIpol ? dstw : dstw/2; - +int i; #ifdef HAVE_MMX2 canMMX2BeUsed= (s_xinc <= 0x10000 && (dstw&31)==0 && (srcWidth&15)==0) ? 1 : 0; @@ -1422,6 +1422,17 @@ else s_xinc2= s_xinc; s_last_y1pos=-99; s_srcypos= s_yinc/2 - 0x8000; s_ypos=0; + + // clean the buffers so that no green stuff is drawen if the width is not sane (%8=0) + for(i=dstw-2; i<dstw+20; i++) + { + pix_buf_uv[0][i] = pix_buf_uv[1][i] + = pix_buf_uv[0][2048+i] = pix_buf_uv[1][2048+i] = 128; + pix_buf_uv[0][i/2] = pix_buf_uv[1][i/2] + = pix_buf_uv[0][2048+i/2] = pix_buf_uv[1][2048+i/2] = 128; + pix_buf_y[0][i]= pix_buf_y[1][i]= 0; + } + #ifdef HAVE_MMX2 // cant downscale !!! if((old_s_xinc != s_xinc || old_dstw!=dstw) && canMMX2BeUsed) diff --git a/postproc/swscale_template.c b/postproc/swscale_template.c index 58fc837e0d..8aa0c38340 100644 --- a/postproc/swscale_template.c +++ b/postproc/swscale_template.c @@ -1399,7 +1399,7 @@ static int old_s_xinc= -1; int srcWidth= (dstw*s_xinc + 0x8000)>>16; int dstUVw= fullUVIpol ? dstw : dstw/2; - +int i; #ifdef HAVE_MMX2 canMMX2BeUsed= (s_xinc <= 0x10000 && (dstw&31)==0 && (srcWidth&15)==0) ? 1 : 0; @@ -1422,6 +1422,17 @@ else s_xinc2= s_xinc; s_last_y1pos=-99; s_srcypos= s_yinc/2 - 0x8000; s_ypos=0; + + // clean the buffers so that no green stuff is drawen if the width is not sane (%8=0) + for(i=dstw-2; i<dstw+20; i++) + { + pix_buf_uv[0][i] = pix_buf_uv[1][i] + = pix_buf_uv[0][2048+i] = pix_buf_uv[1][2048+i] = 128; + pix_buf_uv[0][i/2] = pix_buf_uv[1][i/2] + = pix_buf_uv[0][2048+i/2] = pix_buf_uv[1][2048+i/2] = 128; + pix_buf_y[0][i]= pix_buf_y[1][i]= 0; + } + #ifdef HAVE_MMX2 // cant downscale !!! if((old_s_xinc != s_xinc || old_dstw!=dstw) && canMMX2BeUsed) |