[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 1426, Tue Apr 13 21:20:45 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.13 2004-04-13 21:20:45 suxen_drol Exp $   * $Id: xvid_decraw.c,v 1.14 2004-04-15 19:44:05 edgomez Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 79  Line 79 
79   ****************************************************************************/   ****************************************************************************/
80    
81  static double msecond();  static double msecond();
82    static int write_pgm(char *filename,
83                                             unsigned char *image);
84  static int dec_init(int use_assembler, int debug_level);  static int dec_init(int use_assembler, int debug_level);
85  static int dec_main(unsigned char *istream,  static int dec_main(unsigned char *istream,
86                                          unsigned char *ostream,                                          unsigned char *ostream,
# Line 86  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  static int write_image(char *prefix, unsigned char *image);  int write_image(char *prefix, unsigned char *image);
92  static int write_tga(char *filename, unsigned char *image);  int write_pnm(char *filename, unsigned char *image);
93  static int write_pnm(char *filename, unsigned char *image);  int write_tga(char *filename, unsigned char *image);
   
94    
95  const char * type2str(int type)  const char * type2str(int type)
96  {  {
# Line 187  Line 188 
188    
189  #if defined(_MSC_VER)  #if defined(_MSC_VER)
190          if (ARG_INPUTFILE==NULL) {          if (ARG_INPUTFILE==NULL) {
191                  fprintf(stderr, "Warning: MSVC build does not read correctly from stdin. Use the -i switch.\n\n");                  fprintf(stderr, "Warning: MSVC build does not read EOF correctly from stdin. Use the -i switch.\n\n");
192          }          }
193  #endif  #endif
194    
# Line 350  Line 351 
351                          sprintf(filename, "%sdec%05d", filepath, filenr);                          sprintf(filename, "%sdec%05d", filepath, filenr);
352                          if(write_image(filename, out_buffer)) {                          if(write_image(filename, out_buffer)) {
353                                  fprintf(stderr,                                  fprintf(stderr,
354                                                  "Error writing decoded frame %s\n",                                                  "Error writing decoded PGM frame %s\n",
355                                                  filename);                                                  filename);
356                          }                          }
357                  }                  }
# Line 413  Line 414 
414                  printf("Nothing was decoded!\n");                  printf("Nothing was decoded!\n");
415          }          }
416    
   
417  /*****************************************************************************  /*****************************************************************************
418   *      XviD PART  Stop   *      XviD PART  Stop
419   ****************************************************************************/   ****************************************************************************/
# Line 476  Line 476 
476   *              output functions   *              output functions
477   ****************************************************************************/   ****************************************************************************/
478    
479  static int write_image(char *prefix, unsigned char *image)  int write_image(char *prefix, unsigned char *image)
480  {  {
481          char filename[1024];          char filename[1024];
482          char *ext;          char *ext;
# Line 504  Line 504 
504          return(ret);          return(ret);
505  }  }
506    
507  static int write_tga(char *filename, unsigned char *image)  int write_tga(char *filename, unsigned char *image)
508  {  {
509          FILE * f;          FILE * f;
510          char hdr[18];          char hdr[18];

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

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