[svn] / branches / release-1_0-branch / xvidcore / examples / xvid_decraw.c Repository:
ViewVC logotype

Diff of /branches/release-1_0-branch/xvidcore/examples/xvid_decraw.c

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

revision 1418, Sat Apr 10 10:05:47 2004 UTC revision 1430, Thu Apr 15 10:04:55 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.10.2.2 2004-04-10 10:05:47 edgomez Exp $   * $Id: xvid_decraw.c,v 1.10.2.3 2004-04-15 10:04:55 suxen_drol 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 178  Line 180 
180                  }                  }
181          }          }
182    
183    #if defined(_MSC_VER)
184            if (ARG_INPUTFILE==NULL) {
185                    fprintf(stderr, "Warning: MSVC build does not read EOF correctly from stdin. Use the -i switch.\n\n");
186            }
187    #endif
188    
189  /*****************************************************************************  /*****************************************************************************
190   * Values checking   * Values checking
191   ****************************************************************************/   ****************************************************************************/
# Line 378  Line 386 
386                          sprintf(filename, "%sdec%05d", filepath, filenr);                          sprintf(filename, "%sdec%05d", filepath, filenr);
387                          if(write_image(filename, out_buffer)) {                          if(write_image(filename, out_buffer)) {
388                                  fprintf(stderr,                                  fprintf(stderr,
389                                                  "Error writing decoded PGM frame %s\n",                                                  "Error writing decoded frame %s\n",
390                                                  filename);                                                  filename);
391                          }                          }
392                  }                  }
# Line 391  Line 399 
399   *     Calculate totals and averages for output, print results   *     Calculate totals and averages for output, print results
400   ****************************************************************************/   ****************************************************************************/
401    
402            if (filenr>0) {
403          totalsize    /= filenr;          totalsize    /= filenr;
404          totaldectime /= filenr;          totaldectime /= filenr;
   
405          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",
406                     totaldectime, 1000/totaldectime, (int)totalsize);                     totaldectime, 1000/totaldectime, (int)totalsize);
407            }else{
408                    printf("Nothing was decoded!\n");
409            }
410    
411  /*****************************************************************************  /*****************************************************************************
412   *      XviD PART  Stop   *      XviD PART  Stop

Legend:
Removed from v.1418  
changed lines
  Added in v.1430

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