--- xvid_stat.c 2002/09/15 20:22:01 1.7 +++ xvid_stat.c 2002/09/21 11:55:53 1.11 @@ -19,7 +19,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA * - * $Id: xvid_stat.c,v 1.7 2002/09/15 20:22:01 edgomez Exp $ + * $Id: xvid_stat.c,v 1.11 2002/09/21 11:55:53 edgomez Exp $ * ****************************************************************************/ @@ -422,7 +422,7 @@ * Analyse the decoded frame and compare to original ****************************************************************************/ - framepsnr[filenr] = PSNR(XDIM,YDIM, in_buffer, XDIM, out_buffer, XDIM); + framepsnr[filenr] = PSNR(XDIM,YDIM*3/2, in_buffer, XDIM, out_buffer, XDIM); printf("dectime =%6.1f ms PSNR %5.2f\n",dectime, framepsnr[filenr]); @@ -497,12 +497,12 @@ /* Print all statistics */ printf("Avg. Q%1d %2s ",ARG_QUALITY, (ARG_QUANTI ? " q" : "br")); - printf("%04d ",MAX(ARG_QUANTI,ARG_BITRATE)); + printf("%04d ",(ARG_QUANTI)?ARG_QUANTI:ARG_BITRATE); printf("( %.2f bpp) ", (double)ARG_BITRATE*1000/XDIM/YDIM/ARG_FRAMERATE); printf("size %6d ",totalsize); printf("( %4d kbps ",(int)(totalsize*8*ARG_FRAMERATE/1000)); printf("/ %.2f bpp) ",(double)totalsize*8/XDIM/YDIM); - printf("enc: %6.1f fps, dec: %6.1f fps \n",1/totalenctime, 1/totaldectime); + printf("enc: %6.1f fps, dec: %6.1f fps \n",CLOCKS_PER_SEC/(totalenctime*1000), CLOCKS_PER_SEC/(totaldectime*1000)); printf("PSNR P(%d): %5.2f ( %5.2f , %5.2f ; %5.4f ) ",Pframes,Ppsnr,Pminpsnr,Pmaxpsnr,sqrt(Pvarpsnr/filenr)); printf("I(%d): %5.2f ( %5.2f , %5.2f ; %5.4f ) ",Iframes,Ipsnr,Iminpsnr,Imaxpsnr,sqrt(Ivarpsnr/filenr)); printf("\n");