From 3606df694f1ec074a4ca322a3c8e39e498960951 Mon Sep 17 00:00:00 2001 From: iovar Date: Sun, 29 Oct 2006 01:36:39 +0000 Subject: 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 --- rMD-exp/src/load_cache.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'rMD-exp/src/load_cache.c') 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;jargs.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){ } - + -- cgit v1.2.3