# HG changeset patch # User michael # Date 1004495342 0 # Node ID 3b05a6b4d870b4c2499a8f82bee6f6915ea9a0ef # Parent bd52b78f12dcb99c3638a12c96cf052bba80408e c speedup (x1, rk1 filters) diff -r bd52b78f12dc -r 3b05a6b4d870 postproc/postprocess.c --- a/postproc/postprocess.c Wed Oct 31 01:30:28 2001 +0000 +++ b/postproc/postprocess.c Wed Oct 31 02:29:02 2001 +0000 @@ -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>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++; diff -r bd52b78f12dc -r 3b05a6b4d870 postproc/postprocess_template.c --- a/postproc/postprocess_template.c Wed Oct 31 01:30:28 2001 +0000 +++ b/postproc/postprocess_template.c Wed Oct 31 02:29:02 2001 +0000 @@ -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>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++;