[Mplayer-cvslog] CVS: main/postproc swscale.c,1.36,1.37
Michael Niedermayer
michael at mplayer.dev.hu
Sun Nov 4 14:50:23 CET 2001
Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv1068/postproc
Modified Files:
swscale.c
Log Message:
green line fix for dstw%8!=0
Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -r1.36 -r1.37
--- swscale.c 4 Nov 2001 03:07:02 -0000 1.36
+++ swscale.c 4 Nov 2001 13:50:20 -0000 1.37
@@ -11,6 +11,7 @@
#include "swscale.h"
#include "../mmx_defs.h"
#undef MOVNTQ
+#undef PAVGB
//#undef HAVE_MMX2
//#undef HAVE_MMX
@@ -1399,10 +1400,15 @@
static int old_s_xinc= -1;
#endif
-int srcWidth= (dstw*s_xinc + 0x8000)>>16;
-int dstUVw= fullUVIpol ? dstw : dstw/2;
+int srcWidth;
+int dstUVw;
int i;
+if(((dstw + 7)&(~7)) >= dststride) dstw&= ~7;
+
+srcWidth= (dstw*s_xinc + 0x8000)>>16;
+dstUVw= fullUVIpol ? dstw : dstw/2;
+
#ifdef HAVE_MMX2
canMMX2BeUsed= (s_xinc <= 0x10000 && (dstw&31)==0 && (srcWidth&15)==0) ? 1 : 0;
#endif
@@ -1420,6 +1426,7 @@
// force calculation of the horizontal interpolation of the first line
if(y==0){
+// printf("dstw %d, srcw %d, mmx2 %d\n", dstw, srcWidth, canMMX2BeUsed);
s_last_ypos=-99;
s_last_y1pos=-99;
s_srcypos= s_yinc/2 - 0x8000;
@@ -1429,9 +1436,9 @@
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][2048+i] = pix_buf_uv[1][2048+i] = 128*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_uv[0][2048+i/2] = pix_buf_uv[1][2048+i/2] = 128*128;
pix_buf_y[0][i]= pix_buf_y[1][i]= 0;
}
More information about the MPlayer-cvslog
mailing list