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

Diff of /xvidcore/examples/xvid_decraw.c

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

revision 1.10.2.3, Thu Apr 15 10:04:55 2004 UTC revision 1.10.2.6, Sat Jul 24 11:38:12 2004 UTC
# Line 79  Line 79 
79   ****************************************************************************/   ****************************************************************************/
80    
81  static double msecond();  static double msecond();
 static int write_pgm(char *filename,  
                                          unsigned char *image);  
82  static int dec_init(int use_assembler);  static int dec_init(int use_assembler);
83  static int dec_main(unsigned char *istream,  static int dec_main(unsigned char *istream,
84                                          unsigned char *ostream,                                          unsigned char *ostream,
# Line 88  Line 86 
86                                          xvid_dec_stats_t *xvid_dec_stats);                                          xvid_dec_stats_t *xvid_dec_stats);
87  static int dec_stop();  static int dec_stop();
88  static void usage();  static void usage();
89  int write_image(char *prefix, unsigned char *image);  static int write_image(char *prefix, unsigned char *image);
90  int write_pnm(char *filename, unsigned char *image);  static int write_pnm(char *filename, unsigned char *image);
91  int write_tga(char *filename, unsigned char *image);  static int write_tga(char *filename, unsigned char *image);
92    
93  const char * type2str(int type)  const char * type2str(int type)
94  {  {
# Line 345  Line 343 
343                          sprintf(filename, "%sdec%05d", filepath, filenr);                          sprintf(filename, "%sdec%05d", filepath, filenr);
344                          if(write_image(filename, out_buffer)) {                          if(write_image(filename, out_buffer)) {
345                                  fprintf(stderr,                                  fprintf(stderr,
346                                                  "Error writing decoded PGM frame %s\n",                                                  "Error writing decoded frame %s\n",
347                                                  filename);                                                  filename);
348                          }                          }
349                  }                  }
# Line 469  Line 467 
467   *              output functions   *              output functions
468   ****************************************************************************/   ****************************************************************************/
469    
470  int write_image(char *prefix, unsigned char *image)  static int write_image(char *prefix, unsigned char *image)
471  {  {
472          char filename[1024];          char filename[1024];
473          char *ext;          char *ext;
# Line 497  Line 495 
495          return(ret);          return(ret);
496  }  }
497    
498  int write_tga(char *filename, unsigned char *image)  static int write_tga(char *filename, unsigned char *image)
499  {  {
500          FILE * f;          FILE * f;
501          char hdr[18];          char hdr[18];
# Line 578  Line 576 
576          return(0);          return(0);
577  }  }
578    
579  int write_pnm(char *filename, unsigned char *image)  static int write_pnm(char *filename, unsigned char *image)
580  {  {
581          FILE * f;          FILE * f;
582    
# Line 617  Line 615 
615    
616          return 0;          return 0;
617  }  }
618    
619  /*****************************************************************************  /*****************************************************************************
620   * Routines for decoding: init decoder, use, and stop decoder   * Routines for decoding: init decoder, use, and stop decoder
621   ****************************************************************************/   ****************************************************************************/
# Line 630  Line 629 
629          xvid_gbl_init_t   xvid_gbl_init;          xvid_gbl_init_t   xvid_gbl_init;
630          xvid_dec_create_t xvid_dec_create;          xvid_dec_create_t xvid_dec_create;
631    
632            /* Reset the structure with zeros */
633            memset(&xvid_gbl_init, 0, sizeof(xvid_gbl_init_t));
634            memset(&xvid_dec_create, 0, sizeof(xvid_dec_create_t));
635    
636          /*------------------------------------------------------------------------          /*------------------------------------------------------------------------
637           * XviD core initialization           * XviD core initialization
638           *----------------------------------------------------------------------*/           *----------------------------------------------------------------------*/
# Line 681  Line 684 
684          int ret;          int ret;
685    
686          xvid_dec_frame_t xvid_dec_frame;          xvid_dec_frame_t xvid_dec_frame;
687            memset(&xvid_dec_frame, 0, sizeof(xvid_dec_frame_t));
688    
689          /* Set version */          /* Set version */
690          xvid_dec_frame.version = XVID_VERSION;          xvid_dec_frame.version = XVID_VERSION;

Legend:
Removed from v.1.10.2.3  
changed lines
  Added in v.1.10.2.6

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