[xiph-commits] r14346 - trunk/theora-exp/examples
tterribe at svn.xiph.org
tterribe at svn.xiph.org
Fri Jan 4 10:05:58 PST 2008
Author: tterribe
Date: 2008-01-04 10:05:57 -0800 (Fri, 04 Jan 2008)
New Revision: 14346
Modified:
trunk/theora-exp/examples/dump_video.c
trunk/theora-exp/examples/rehuff.c
Log:
Fix a warning in rehuff and make dump_video work properly with --fps-only.
Modified: trunk/theora-exp/examples/dump_video.c
===================================================================
--- trunk/theora-exp/examples/dump_video.c 2008-01-04 18:02:21 UTC (rev 14345)
+++ trunk/theora-exp/examples/dump_video.c 2008-01-04 18:05:57 UTC (rev 14346)
@@ -146,16 +146,16 @@
static void video_write(void){
int pli;
int i;
-
/*Uncomment the following to do normal, non-striped decoding.
th_ycbcr_buffer ycbcr;
th_decode_ycbcr_out(td,ycbcr);*/
- if(!raw)fprintf(outfile, "FRAME\n");
-
- for(pli=0;pli<3;pli++){
- for(i=0;i<ycbcr[pli].height;i++){
- fwrite(ycbcr[pli].data+ycbcr[pli].ystride*i, 1,
- ycbcr[pli].width, outfile);
+ if(outfile){
+ if(!raw)fprintf(outfile, "FRAME\n");
+ for(pli=0;pli<3;pli++){
+ for(i=0;i<ycbcr[pli].height;i++){
+ fwrite(ycbcr[pli].data+ycbcr[pli].ystride*i, 1,
+ ycbcr[pli].width, outfile);
+ }
}
}
}
@@ -413,8 +413,7 @@
}
}
/* dumpvideo frame, and get new one */
- else
- if(outfile)video_write();
+ else video_write();
videobuf_ready=0;
}
Modified: trunk/theora-exp/examples/rehuff.c
===================================================================
--- trunk/theora-exp/examples/rehuff.c 2008-01-04 18:02:21 UTC (rev 14345)
+++ trunk/theora-exp/examples/rehuff.c 2008-01-04 18:05:57 UTC (rev 14346)
@@ -307,7 +307,7 @@
}
}
}
- fprintf(stderr,"After FPC: %lli wasted bits.\n",ret);
+ fprintf(stderr,"After FPC: %lli wasted bits.\n",(long long)ret);
return ret;
}
@@ -351,7 +351,7 @@
if(_vecs[vi].idx!=old_idx)converged=0;
ret+=_vecs[vi].dist;
}
- fprintf(stderr,"After K-means: %lli wasted bits.\n",ret);
+ fprintf(stderr,"After K-means: %lli wasted bits.\n",(long long int)ret);
*_converged=converged;
return ret;
}
More information about the commits
mailing list