diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-12-08 14:09:17 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-12-08 14:09:17 +0000 |
commit | 2d2449959edc3b6dfef3b43980fcd10c202455e4 (patch) | |
tree | 6efbb1bbf50d6bd61daabd220915625d89315aca /recordmydesktop | |
parent | e22b4a99483a13ec44d5151c6f825516ebfb9c04 (diff) |
reverted to 1.5
memcmp isn't faster after all (it just doesn't register at gprof)
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@224 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'recordmydesktop')
-rw-r--r-- | recordmydesktop/src/cache_frame.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/recordmydesktop/src/cache_frame.c b/recordmydesktop/src/cache_frame.c index 725a1df..7f8c826 100644 --- a/recordmydesktop/src/cache_frame.c +++ b/recordmydesktop/src/cache_frame.c @@ -35,10 +35,12 @@ int CompareBlocks(unsigned char *incoming,unsigned char *old,int blockno,int wid *old_reg=&(old[block_i*(width*height/divisor)+block_k*width/divisor]); for(j=0;j<height/divisor;j++){ - if(memcmp(incoming_reg,old_reg,width/divisor)) - return 1; - incoming_reg+=width; - old_reg+=width; + for(i=0;i<width/divisor;i++){ + if((*(incoming_reg++))!=(*(old_reg++))) + return 1; + } + incoming_reg+=(width-width/divisor); + old_reg+=(width-width/divisor); } return 0; |