diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-23 17:11:17 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-23 17:11:17 +0000 |
commit | 21f5377d66e8c8166e2b061d46a438cdb3ca45a5 (patch) | |
tree | 35cb6f61a36b57516ffc4a56da15db2b639681d4 | |
parent | bd2093121ef6d96efda7a5526133795789d6e86a (diff) |
corrected checksum
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@112 f606c939-3180-4ac9-a4b8-4b8779d57d0a
-rw-r--r-- | rMD-exp/src/cache_frame.c | 7 |
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; } } } |