19 |
* along with this program; if not, write to the Free Software |
* along with this program; if not, write to the Free Software |
20 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
21 |
* |
* |
22 |
* $Id: xvid_stat.c,v 1.13 2002-09-27 20:58:02 edgomez Exp $ |
* $Id: xvid_stat.c,v 1.15 2002-09-28 14:53:40 edgomez Exp $ |
23 |
* |
* |
24 |
****************************************************************************/ |
****************************************************************************/ |
25 |
|
|
198 |
|
|
199 |
double Ipsnr=0.,Imaxpsnr=0.,Iminpsnr=999.,Ivarpsnr=0.; |
double Ipsnr=0.,Imaxpsnr=0.,Iminpsnr=999.,Ivarpsnr=0.; |
200 |
double Ppsnr=0.,Pmaxpsnr=0.,Pminpsnr=999.,Pvarpsnr=0.; |
double Ppsnr=0.,Pmaxpsnr=0.,Pminpsnr=999.,Pvarpsnr=0.; |
|
double Bpsnr=0.,Bmaxpsnr=0.,Bminpsnr=999.,Bvarpsnr=0.; |
|
201 |
|
|
202 |
char filename[256]; |
char filename[256]; |
203 |
|
|
276 |
****************************************************************************/ |
****************************************************************************/ |
277 |
|
|
278 |
if (XDIM <= 0 || XDIM >= 2048 || YDIM <=0 || YDIM >= 2048 ) { |
if (XDIM <= 0 || XDIM >= 2048 || YDIM <=0 || YDIM >= 2048 ) { |
279 |
fprintf(stderr, |
fprintf(stderr, "Trying to retreive width and height from PGM header\n"); |
|
"Trying to retreive width and height from PGM header\n", |
|
|
XDIM, |
|
|
YDIM); |
|
280 |
ARG_INPUTTYPE = 1; /* pgm */ |
ARG_INPUTTYPE = 1; /* pgm */ |
281 |
} |
} |
282 |
|
|
291 |
} |
} |
292 |
|
|
293 |
if ( ARG_FRAMERATE <= 0) { |
if ( ARG_FRAMERATE <= 0) { |
294 |
fprintf(stderr,"Wrong Fraterate %s \n",argv[5]); |
fprintf(stderr,"Wrong Framerate %s \n",argv[5]); |
295 |
return -1; |
return -1; |
296 |
} |
} |
297 |
|
|
499 |
printf("Avg. Q%1d %2s ",ARG_QUALITY, (ARG_QUANTI ? " q" : "br")); |
printf("Avg. Q%1d %2s ",ARG_QUALITY, (ARG_QUANTI ? " q" : "br")); |
500 |
printf("%04d ",(ARG_QUANTI)?ARG_QUANTI:ARG_BITRATE); |
printf("%04d ",(ARG_QUANTI)?ARG_QUANTI:ARG_BITRATE); |
501 |
printf("( %.2f bpp) ", (double)ARG_BITRATE*1000/XDIM/YDIM/ARG_FRAMERATE); |
printf("( %.2f bpp) ", (double)ARG_BITRATE*1000/XDIM/YDIM/ARG_FRAMERATE); |
502 |
printf("size %6d ",totalsize); |
printf("size %6d ", (int)totalsize); |
503 |
printf("( %4d kbps ",(int)(totalsize*8*ARG_FRAMERATE/1000)); |
printf("( %4d kbps ",(int)(totalsize*8*ARG_FRAMERATE/1000)); |
504 |
printf("/ %.2f bpp) ",(double)totalsize*8/XDIM/YDIM); |
printf("/ %.2f bpp) ",(double)totalsize*8/XDIM/YDIM); |
505 |
printf("enc: %6.1f fps, dec: %6.1f fps \n",1000/totalenctime, 1000/totaldectime); |
printf("enc: %6.1f fps, dec: %6.1f fps \n",1000/totalenctime, 1000/totaldectime); |