[svn] / branches / dev-api-4 / xvidcore / examples / xvid_stat.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/examples/xvid_stat.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 548, Fri Sep 27 18:35:35 2002 UTC revision 561, Sat Sep 28 14:53:40 2002 UTC
# Line 19  Line 19 
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.12 2002-09-27 18:35:35 edgomez Exp $   * $Id: xvid_stat.c,v 1.15 2002-09-28 14:53:40 edgomez Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 198  Line 198 
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    
# Line 277  Line 276 
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    
# Line 295  Line 291 
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    
# Line 503  Line 499 
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);
# Line 558  Line 554 
554  #ifndef _MSC_VER  #ifndef _MSC_VER
555          struct timeval  tv;          struct timeval  tv;
556          gettimeofday(&tv, 0);          gettimeofday(&tv, 0);
557          return tv.tv_sec*10e3 + tv.tv_usec * 1.0e-3;          return tv.tv_sec*1.0e3 + tv.tv_usec * 1.0e-3;
558  #else  #else
559          clock_t clk;          clock_t clk;
560          clk = clock();          clk = clock();

Legend:
Removed from v.548  
changed lines
  Added in v.561

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4