[Mplayer-cvslog] CVS: main/libmpcodecs vf_noise.c,1.6,1.7

Michael Niedermayer michael at mplayerhq.hu
Sun Aug 11 12:12:18 CEST 2002


Update of /cvsroot/mplayer/main/libmpcodecs
In directory mail:/var/tmp.root/cvs-serv22342

Modified Files:
	vf_noise.c 
Log Message:
optimization


Index: vf_noise.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_noise.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- vf_noise.c	11 Aug 2002 09:52:23 -0000	1.6
+++ vf_noise.c	11 Aug 2002 10:12:15 -0000	1.7
@@ -193,13 +193,13 @@
 /***************************************************************************/
 
 static inline void lineNoiseAvg_C(uint8_t *dst, uint8_t *src, int len, int8_t **shift){
-	int i, j, n;
+	int i;
+        int8_t *src2= (int8_t*)src;
 	
 	for(i=0; i<len; i++)
 	{
-	    for(j=0,n=0;j<3;j++)
-		n+=shift[j][i];
-	    dst[i]= src[i]+n*(128-abs(128-src[i]))/128;
+	    const int n= shift[0][i] + shift[1][i] + shift[2][i];
+	    dst[i]= src2[i]+((n*src2[i])>>7);
 	}
 }
 




More information about the MPlayer-cvslog mailing list