[Mplayer-cvslog] CVS: main/libmpcodecs vf_denoise3d.c,1.2,1.3

Arpi of Ize arpi at mplayerhq.hu
Sun Feb 9 03:07:32 CET 2003


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

Modified Files:
	vf_denoise3d.c 
Log Message:
simpler/faster LowPass() macro


Index: vf_denoise3d.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_denoise3d.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_denoise3d.c	30 Jan 2003 23:54:25 -0000	1.2
+++ vf_denoise3d.c	9 Feb 2003 02:07:11 -0000	1.3
@@ -68,8 +68,20 @@
     free(vf->priv->Line);
 }
 
+//#define LowPass(Prev, Curr, Coef) (((Prev)*Coef[Prev - Curr] + (Curr)*(65536-(Coef[Prev - Curr]))) / 65536)
+//#define LowPass(Prev, Curr, Coef) ((  Prev*Coef[Prev-Curr] + Curr*(65536-(Coef[Prev-Curr]))  )/65536)
+//#define LowPass(Prev, Curr, Coef) ((  Prev*Coef[Prev-Curr] + Curr*65536 - Curr*Coef[Prev-Curr]  )/65536)
+//#define LowPass(Prev, Curr, Coef) (((int)(Curr)) + ((  (int)Prev*Coef[Prev-Curr] - (int)Curr*Coef[Prev-Curr]  )>>16) )
+//#define LowPass(Prev, Curr, Coef) (Curr + ((  Prev*Coef[Prev-Curr] - Curr*Coef[Prev-Curr]  )>>16) )
+//#define LowPass(Prev, Curr, Coef) (Curr + ((  (Prev-Curr)*(Coef[Prev-Curr])  )>>16) )
 
-#define LowPass(Prev, Curr, Coef) (((Prev)*Coef[Prev - Curr] + (Curr)*(65536-(Coef[Prev - Curr]))) / 65536)
+//#define LowPass(Prev, Curr, Coef) (Curr + (((Prev - Curr)*Coef[Prev - Curr]) / 65536))
+#define LowPass(Prev, Curr, Coef) (Curr + ((((unsigned int)(Prev - Curr))*Coef[Prev - Curr]) / 65536))
+//#define LowPass(Prev, Curr, Coef) (Curr + ((((unsigned int)(Prev - Curr))*Coef[((unsigned int)(Prev - Curr))]) / 65536))
+//#define LowPass(Prev, Curr, Coef) (Curr + ((((unsigned char)(Prev - Curr))*Coef[Prev - Curr]) / 65536))
+//#define LowPass(Prev, Curr, Coef) (Curr + (( ((((int)(Prev))-((int)(Curr)))) *Coef[Prev - Curr]) / 65536))
+//#define LowPass(Prev, Curr, Coef) (Curr + (((unsigned int)((Prev - Curr)*Coef[Prev - Curr])) / 65536))
+//#define LowPass(Prev, Curr, Coef) (Curr + (((Prev - Curr)*Coef[Prev - Curr]) >> 16))
 
 static void deNoise(unsigned char *Frame,        // mpi->planes[x]
                     unsigned char *FramePrev,    // pmpi->planes[x]



More information about the MPlayer-cvslog mailing list