summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rMD-exp/src/cache_frame.c7
1 files changed, 3 insertions, 4 deletions
diff --git a/rMD-exp/src/cache_frame.c b/rMD-exp/src/cache_frame.c
index f1d3251..894de3b 100644
--- a/rMD-exp/src/cache_frame.c
+++ b/rMD-exp/src/cache_frame.c
@@ -34,14 +34,13 @@ void MakeChecksums(unsigned char *buf,int width,int height,int divisor,unsigned
int A=1,B=0;
for(j=0;j<height/divisor;j++){
for(m=0;m<width/divisor;m++){
- unsigned char cur=buf[i*(width*height/divisor)+j*width+k*width/divisor+m];
- A+=cur;
- B+=A+cur;
+ A+=buf[i*(width*height/divisor)+j*width+k*width/divisor+m];
+ B+=A;
}
}
A=A%65521;
B=B%65521;
- checksums[i*divisor+k]=A+B;
+ checksums[i*divisor+k]=B*65536+A;
}
}
}
© All Rights Reserved