[Mplayer-cvslog] CVS: main/postproc postprocess.c,1.32,1.33
Michael Niedermayer
michael at mplayer.dev.hu
Wed Oct 31 03:29:22 CET 2001
Update of /cvsroot/mplayer/main/postproc
In directory mplayer:/var/tmp.root/cvs-serv10107/postproc
Modified Files:
postprocess.c
Log Message:
c speedup (x1, rk1 filters)
Index: postprocess.c
===================================================================
RCS file: /cvsroot/mplayer/main/postproc/postprocess.c,v
retrieving revision 1.32
retrieving revision 1.33
diff -u -r1.32 -r1.33
--- postprocess.c 30 Oct 2001 21:14:02 -0000 1.32
+++ postprocess.c 31 Oct 2001 02:29:02 -0000 1.33
@@ -670,20 +670,19 @@
// const int l8= stride + l7;
// const int l9= stride + l8;
int x;
+ const int QP15= QP + (QP>>2);
src+= stride*3;
for(x=0; x<BLOCK_SIZE; x++)
{
- if(ABS(src[l4]-src[l5]) < QP + QP/4)
+ const int v = (src[x+l5] - src[x+l4]);
+ if(ABS(v) < QP15)
{
- int v = (src[l5] - src[l4]);
-
- src[l3] +=v/8;
- src[l4] +=v/2;
- src[l5] -=v/2;
- src[l6] -=v/8;
+ src[x+l3] +=v>>3;
+ src[x+l4] +=v>>1;
+ src[x+l5] -=v>>1;
+ src[x+l6] -=v>>3;
}
- src++;
}
#endif
@@ -803,18 +802,19 @@
int b= src[l4] - src[l5];
int c= src[l5] - src[l6];
- int d= MAX(ABS(b) - (ABS(a) + ABS(c))/2, 0);
+ int d= ABS(b) - ((ABS(a) + ABS(c))>>1);
+ d= MAX(d, 0);
if(d < QP)
{
int v = d * SIGN(-b);
- src[l2] +=v/8;
- src[l3] +=v/4;
- src[l4] +=3*v/8;
- src[l5] -=3*v/8;
- src[l6] -=v/4;
- src[l7] -=v/8;
+ src[l2] +=v>>3;
+ src[l3] +=v>>2;
+ src[l4] +=(3*v)>>3;
+ src[l5] -=(3*v)>>3;
+ src[l6] -=v>>2;
+ src[l7] -=v>>3;
}
src++;
More information about the MPlayer-cvslog
mailing list