[Mplayer-cvslog] CVS: main/postproc swscale.c, 1.140, 1.141 rgb2rgb_template.c, 1.67, 1.68

Richard Felker CVS syncmail at mplayerhq.hu
Sat May 1 22:15:23 CEST 2004


CVS change done by Richard Felker CVS

Update of /cvsroot/mplayer/main/postproc
In directory mail:/var2/tmp/cvs-serv7458/postproc

Modified Files:
	swscale.c rgb2rgb_template.c 
Log Message:
this isn't actually stupid, but it's not valid C and gcc 3.5 rejects it as such

Index: swscale.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/swscale.c,v
retrieving revision 1.140
retrieving revision 1.141
diff -u -r1.140 -r1.141
--- swscale.c	26 Apr 2004 19:38:17 -0000	1.140
+++ swscale.c	1 May 2004 20:15:21 -0000	1.141
@@ -356,7 +356,7 @@
 			((uint8_t*)dest)[3]= r[Y2];\
 			((uint8_t*)dest)[4]= g[Y2];\
 			((uint8_t*)dest)[5]= b[Y2];\
-			((uint8_t*)dest)+=6;\
+			dest+=6;\
 		}\
 		break;\
 	case IMGFMT_BGR24:\
@@ -367,7 +367,7 @@
 			((uint8_t*)dest)[3]= b[Y2];\
 			((uint8_t*)dest)[4]= g[Y2];\
 			((uint8_t*)dest)[5]= r[Y2];\
-			((uint8_t*)dest)+=6;\
+			dest+=6;\
 		}\
 		break;\
 	case IMGFMT_RGB16:\
@@ -449,7 +449,7 @@
 				acc+= acc + g[((buf0[i+6]*yalpha1+buf1[i+6]*yalpha)>>19) + d128[6]];\
 				acc+= acc + g[((buf0[i+7]*yalpha1+buf1[i+7]*yalpha)>>19) + d128[7]];\
 				((uint8_t*)dest)[0]= acc;\
-				((uint8_t*)dest)++;\
+				dest++;\
 			}\
 \
 /*\
@@ -539,7 +539,7 @@
 			((uint8_t*)dest)[3]= r[Y2];
 			((uint8_t*)dest)[4]= g[Y2];
 			((uint8_t*)dest)[5]= b[Y2];
-			((uint8_t*)dest)+=6;
+			dest+=6;
 		}
 		break;
 	case IMGFMT_BGR24:
@@ -550,7 +550,7 @@
 			((uint8_t*)dest)[3]= b[Y2];
 			((uint8_t*)dest)[4]= g[Y2];
 			((uint8_t*)dest)[5]= r[Y2];
-			((uint8_t*)dest)+=6;
+			dest+=6;
 		}
 		break;
 	case IMGFMT_RGB16:
@@ -645,7 +645,7 @@
 				acc+= acc + g[Y2+d128[(i+1)&7]];
 				if((i&7)==6){
 					((uint8_t*)dest)[0]= acc;
-					((uint8_t*)dest)++;
+					dest++;
 				}
 			}
 		}

Index: rgb2rgb_template.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/rgb2rgb_template.c,v
retrieving revision 1.67
retrieving revision 1.68
diff -u -r1.67 -r1.68
--- rgb2rgb_template.c	10 Oct 2003 00:19:16 -0000	1.67
+++ rgb2rgb_template.c	1 May 2004 20:15:21 -0000	1.68
@@ -388,7 +388,7 @@
 #endif
 	while(s < end)
 	{
-		const int src= *((uint32_t*)s)++;
+		const int src= *s; s += 4;
 		*d++ = ((src&0xFF)>>3) + ((src&0xFC00)>>5) + ((src&0xF80000)>>8);
 //		*d++ = ((src>>3)&0x1F) + ((src>>5)&0x7E0) + ((src>>8)&0xF800);
 	}
@@ -450,7 +450,7 @@
 #endif
 	while(s < end)
 	{
-		const int src= *((uint32_t*)s)++;
+		const int src= *s; s += 4;
 		*d++ = ((src&0xF8)<<8) + ((src&0xFC00)>>5) + ((src&0xF80000)>>19);
 	}
 }
@@ -546,7 +546,7 @@
 #endif
 	while(s < end)
 	{
-		const int src= *((uint32_t*)s)++;
+		const int src= *s; s += 4;
 		*d++ = ((src&0xFF)>>3) + ((src&0xF800)>>6) + ((src&0xF80000)>>9);
 	}
 }
@@ -607,7 +607,7 @@
 #endif
 	while(s < end)
 	{
-		const int src= *((uint32_t*)s)++;
+		const int src= *s; s += 4;
 		*d++ = ((src&0xF8)<<7) + ((src&0xF800)>>6) + ((src&0xF80000)>>19);
 	}
 }




More information about the MPlayer-cvslog mailing list