# HG changeset patch # User michael # Date 1003506644 0 # Node ID 7a89cb124e8138d2c8ffdef25cbf7e0c5c991ca0 # Parent 1d100b2d668c496d61199c39074795315bfcb5cd first line bug fixed (happend if the image was scaled down or 1:1) diff -r 1d100b2d668c -r 7a89cb124e81 postproc/swscale.c --- a/postproc/swscale.c Fri Oct 19 15:23:18 2001 +0000 +++ b/postproc/swscale.c Fri Oct 19 15:50:44 2001 +0000 @@ -98,7 +98,6 @@ #endif int canMMX2BeUsed=0; -static int test=0; int srcWidth= (dstw*s_xinc + 0x8000)>>16; #ifdef HAVE_MMX2 @@ -119,7 +118,7 @@ s_last_y1pos=-99; if(y==0){ - s_srcypos= s_yinc/2 - 0x8000; + s_srcypos=-0x8000; s_ypos=0; #ifdef HAVE_MMX2 // cant downscale !!! @@ -534,6 +533,12 @@ xpos+=s_xinc2; } #endif + // if this is the line before the first line + if(s_srcypos == s_xinc - 0x8000) + { + s_srcypos= s_yinc/2 - 0x8000; + continue; + } } diff -r 1d100b2d668c -r 7a89cb124e81 postproc/swscale_template.c --- a/postproc/swscale_template.c Fri Oct 19 15:23:18 2001 +0000 +++ b/postproc/swscale_template.c Fri Oct 19 15:50:44 2001 +0000 @@ -98,7 +98,6 @@ #endif int canMMX2BeUsed=0; -static int test=0; int srcWidth= (dstw*s_xinc + 0x8000)>>16; #ifdef HAVE_MMX2 @@ -119,7 +118,7 @@ s_last_y1pos=-99; if(y==0){ - s_srcypos= s_yinc/2 - 0x8000; + s_srcypos=-0x8000; s_ypos=0; #ifdef HAVE_MMX2 // cant downscale !!! @@ -534,6 +533,12 @@ xpos+=s_xinc2; } #endif + // if this is the line before the first line + if(s_srcypos == s_xinc - 0x8000) + { + s_srcypos= s_yinc/2 - 0x8000; + continue; + } }