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

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

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

revision 990, Fri Apr 18 20:06:58 2003 UTC revision 991, Sat Apr 19 11:26:47 2003 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_encraw.c,v 1.11.2.17 2003-04-18 20:06:58 chl Exp $   * $Id: xvid_encraw.c,v 1.11.2.18 2003-04-19 11:26:47 chl Exp $
23   *   *
24   ****************************************************************************/   ****************************************************************************/
25    
# Line 174  Line 174 
174    
175          double enctime;          double enctime;
176          double totalenctime = 0.;          double totalenctime = 0.;
177            float totalPSNR[3] = {0., 0., 0.};
178    
179          int totalsize;          int totalsize;
180          int result;          int result;
# Line 427  Line 428 
428                                             SSE2PSNR(sse[0], XDIM, YDIM), SSE2PSNR(sse[1], XDIM / 2,                                             SSE2PSNR(sse[0], XDIM, YDIM), SSE2PSNR(sse[1], XDIM / 2,
429                                                                                                                            YDIM / 2),                                                                                                                            YDIM / 2),
430                                             SSE2PSNR(sse[2], XDIM / 2, YDIM / 2));                                             SSE2PSNR(sse[2], XDIM / 2, YDIM / 2));
431    
432                                    totalPSNR[0] += SSE2PSNR(sse[0], XDIM, YDIM);
433                                    totalPSNR[1] += SSE2PSNR(sse[1], XDIM/2, YDIM/2);
434                                    totalPSNR[2] += SSE2PSNR(sse[2], XDIM/2, YDIM/2);
435                          }                          }
436    
437                  }                  }
# Line 483  Line 488 
488          if (input_num > 0) {          if (input_num > 0) {
489                  totalsize /= input_num;                  totalsize /= input_num;
490                  totalenctime /= input_num;                  totalenctime /= input_num;
491                    totalPSNR[0] /= input_num;
492                    totalPSNR[1] /= input_num;
493                    totalPSNR[2] /= input_num;
494          } else {          } else {
495                  totalsize = -1;                  totalsize = -1;
496                  totalenctime = -1;                  totalenctime = -1;
497          }          }
498    
499          printf("Avg: enctime(ms) =%7.2f, fps =%7.2f, length(bytes) = %7d\n",          printf("Avg: enctime(ms) =%7.2f, fps =%7.2f, length(bytes) = %7d, ",
500                     totalenctime, 1000 / totalenctime, (int) totalsize);                     totalenctime, 1000 / totalenctime, (int) totalsize);
501       if (ARG_STATS) {
502           printf("psnr y = %2.2f, psnr u = %2.2f, psnr v = %2.2f",
503                      totalPSNR[0],totalPSNR[1],totalPSNR[2]);
504            }
505            printf("\n");
506    
507    
508  /*****************************************************************************  /*****************************************************************************

Legend:
Removed from v.990  
changed lines
  Added in v.991

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