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

Michael Niedermayer michael at mplayerhq.hu
Sun Jun 16 15:54:39 CEST 2002


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

Modified Files:
	vf_noise.c 
Log Message:

higher quality mode


Index: vf_noise.c
===================================================================
RCS file: /cvsroot/mplayer/main/libmpcodecs/vf_noise.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- vf_noise.c	16 Jun 2002 13:45:52 -0000	1.2
+++ vf_noise.c	16 Jun 2002 13:54:36 -0000	1.3
@@ -49,6 +49,7 @@
 	int strength;
 	int uniform;
 	int temporal;
+	int quality;
 	int8_t *noise;
 }FilterParam;
 
@@ -105,7 +106,6 @@
 #ifdef HAVE_MMX
 static inline void lineNoise_MMX(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
 	int mmx_len= len&(~7);
-	shift&= ~7;
 	noise+=shift;
 
 	asm volatile(
@@ -135,7 +135,6 @@
 #ifdef HAVE_MMX2
 static inline void lineNoise_MMX2(uint8_t *dst, uint8_t *src, int8_t *noise, int len, int shift){
 	int mmx_len= len&(~7);
-	shift&= ~7;
 	noise+=shift;
 
 	asm volatile(
@@ -189,7 +188,7 @@
 			{
 				memcpy(dst, src, width);
 				dst+= dstStride;
-				src+= srcStride;	
+				src+= srcStride;
 			}
 		}
 		return;
@@ -200,6 +199,7 @@
 		if(fp->temporal)	shift=  rand()&(MAX_SHIFT  -1);
 		else			shift= nonTempRandShift[y];
 
+		if(fp->quality==0) shift&= ~7;
 		lineNoise(dst, src, noise, width, shift);
 		dst+= dstStride;
 		src+= srcStride;
@@ -209,7 +209,7 @@
 static int config(struct vf_instance_s* vf,
         int width, int height, int d_width, int d_height,
 	unsigned int flags, unsigned int outfmt){
-    
+
 	return vf_next_config(vf,width,height,d_width,d_height,flags,outfmt);
 }
 
@@ -299,6 +299,8 @@
 	if(pos && pos<max) fp->uniform=1;
 	pos= strchr(args, 't');
 	if(pos && pos<max) fp->temporal=1;
+	pos= strchr(args, 'h');
+	if(pos && pos<max) fp->quality=1;
 
 	if(fp->strength) initNoise(fp);
 }




More information about the MPlayer-cvslog mailing list