diff options
author | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-29 01:36:39 +0000 |
---|---|---|
committer | iovar <iovar@f606c939-3180-4ac9-a4b8-4b8779d57d0a> | 2006-10-29 01:36:39 +0000 |
commit | 3606df694f1ec074a4ca322a3c8e39e498960951 (patch) | |
tree | 2a32d9cb8568f03e3c95a1c6d15c7447fc597704 /rMD-exp/src/load_cache.c | |
parent | 5076dbf5c8974316119d6bad42c413a3e3bf5ec9 (diff) |
removed checksums(replaced with per -byte comparison) ,due to fundamental problem in the method.caching scheme is complete(for now). divisor is always 16
git-svn-id: https://recordmydesktop.svn.sourceforge.net/svnroot/recordmydesktop/trunk@125 f606c939-3180-4ac9-a4b8-4b8779d57d0a
Diffstat (limited to 'rMD-exp/src/load_cache.c')
-rw-r--r-- | rMD-exp/src/load_cache.c | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/rMD-exp/src/load_cache.c b/rMD-exp/src/load_cache.c index 1c5b29a..9ef75a6 100644 --- a/rMD-exp/src/load_cache.c +++ b/rMD-exp/src/load_cache.c @@ -31,7 +31,7 @@ void LoadBlock(unsigned char *dest,unsigned char *source,int blockno,int width, int j, block_i=blockno/divisor,//place on the grid block_k=blockno%divisor; - + for(j=0;j<height/divisor;j++)//we copy rows memcpy( &dest[block_i*(width*height/divisor)+j*width+block_k*width/divisor], &source[j*width/divisor], @@ -66,7 +66,7 @@ void *LoadCache(void *pdata){ thread_exit=-1; pthread_exit(&thread_exit); } - + if(!((ProgData *)pdata)->args.nosound){ afp=fopen(((ProgData *)pdata)->cache_data->audiodata,"rb"); if(afp==NULL){ @@ -74,26 +74,17 @@ void *LoadCache(void *pdata){ pthread_exit(&thread_exit); } } - //recalculate the divisor since it is not saved - while(((((ProgData *)pdata)->brwin.rgeom.width* - ((ProgData *)pdata)->brwin.rgeom.width ) - /pow(divisor,2)) - <=1024){ - divisor/=2; - if(divisor==2) - break; - } //these two are likely to be the same, but not guaranteed, especially on //low resolutions blockszy=(yuv->y_width*yuv->y_height )/pow(divisor,2); blockszuv=(yuv->uv_width*yuv->uv_height)/pow(divisor/2,2); //this will be used now to define if we proccess audio or video - //on any given loop. + //on any given loop. ((ProgData *)pdata)->avd=0; //If sound finishes first,we go on with the video. //If video ends we will do one more run to flush audio in the ogg file - + while(((ProgData *)pdata)->running){ //video load and encoding if(((ProgData *)pdata)->avd<=0 || ((ProgData *)pdata)->args.nosound || audio_end){ @@ -103,7 +94,7 @@ void *LoadCache(void *pdata){ SyncEncodeImageBuffer((ProgData *)pdata); } else if(gzread(ifp,frame.header,sizeof(FrameHeader))==sizeof(FrameHeader)){ - //sync + //sync missing_frames+=frame.header->current_total-(extra_frames+frame.header->frameno); fprintf(stdout,"\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b\b" @@ -192,4 +183,4 @@ void *LoadCache(void *pdata){ } - + |