# HG changeset patch # User michael # Date 1024235676 0 # Node ID e10e3264c19c4d96f29bca2fb0ffaeb2c1098cfb # Parent 751a5775ac352312335e30dde90903e32b48eda9 higher quality mode diff -r 751a5775ac35 -r e10e3264c19c libmpcodecs/vf_noise.c --- a/libmpcodecs/vf_noise.c Sun Jun 16 13:45:52 2002 +0000 +++ b/libmpcodecs/vf_noise.c Sun Jun 16 13:54:36 2002 +0000 @@ -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 && posuniform=1; pos= strchr(args, 't'); if(pos && postemporal=1; + pos= strchr(args, 'h'); + if(pos && posquality=1; if(fp->strength) initNoise(fp); }