[svn] / trunk / xvidcore / examples / xvid_decraw.c Repository:
ViewVC logotype

Diff of /trunk/xvidcore/examples/xvid_decraw.c

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

revision 1423, Mon Apr 12 14:05:08 2004 UTC revision 1432, Thu Apr 15 19:44:06 2004 UTC
# Line 20  Line 20 
20   *  along with this program; if not, write to the Free Software   *  along with this program; if not, write to the Free Software
21   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA   *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA
22   *   *
23   * $Id: xvid_decraw.c,v 1.12 2004-04-12 14:05:08 edgomez Exp $   * $Id: xvid_decraw.c,v 1.14 2004-04-15 19:44:05 edgomez Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 88  Line 88 
88                                          xvid_dec_stats_t *xvid_dec_stats);                                          xvid_dec_stats_t *xvid_dec_stats);
89  static int dec_stop();  static int dec_stop();
90  static void usage();  static void usage();
91    int write_image(char *prefix, unsigned char *image);
92    int write_pnm(char *filename, unsigned char *image);
93    int write_tga(char *filename, unsigned char *image);
94    
95  const char * type2str(int type)  const char * type2str(int type)
96  {  {
# Line 184  Line 186 
186                  }                  }
187          }          }
188    
189    #if defined(_MSC_VER)
190            if (ARG_INPUTFILE==NULL) {
191                    fprintf(stderr, "Warning: MSVC build does not read EOF correctly from stdin. Use the -i switch.\n\n");
192            }
193    #endif
194    
195  /*****************************************************************************  /*****************************************************************************
196   * Values checking   * Values checking
197   ****************************************************************************/   ****************************************************************************/
# Line 384  Line 392 
392                          sprintf(filename, "%sdec%05d", filepath, filenr);                          sprintf(filename, "%sdec%05d", filepath, filenr);
393                          if(write_image(filename, out_buffer)) {                          if(write_image(filename, out_buffer)) {
394                                  fprintf(stderr,                                  fprintf(stderr,
395                                                  "Error writing decoded PGM frame %s\n",                                                  "Error writing decoded frame %s\n",
396                                                  filename);                                                  filename);
397                          }                          }
398                  }                  }
# Line 397  Line 405 
405   *     Calculate totals and averages for output, print results   *     Calculate totals and averages for output, print results
406   ****************************************************************************/   ****************************************************************************/
407    
408            if (filenr>0) {
409          totalsize    /= filenr;          totalsize    /= filenr;
410          totaldectime /= filenr;          totaldectime /= filenr;
   
411          printf("Avg: dectime(ms) =%7.2f, fps =%7.2f, length(bytes) =%7d\n",          printf("Avg: dectime(ms) =%7.2f, fps =%7.2f, length(bytes) =%7d\n",
412                     totaldectime, 1000/totaldectime, (int)totalsize);                     totaldectime, 1000/totaldectime, (int)totalsize);
413            }else{
414                    printf("Nothing was decoded!\n");
415            }
416    
417  /*****************************************************************************  /*****************************************************************************
418   *      XviD PART  Stop   *      XviD PART  Stop

Legend:
Removed from v.1423  
changed lines
  Added in v.1432

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