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

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

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

trunk/xvidcore/examples/xvid_decraw.c revision 824, Sun Feb 9 19:32:52 2003 UTC branches/dev-api-4/xvidcore/examples/xvid_decraw.c revision 1116, Sat Aug 9 09:52:02 2003 UTC
# Line 3  Line 3 
3   *  XVID MPEG-4 VIDEO CODEC   *  XVID MPEG-4 VIDEO CODEC
4   *  - Console based decoding test application  -   *  - Console based decoding test application  -
5   *   *
6   *  Copyright(C) 2002 Christoph Lampert   *  Copyright(C) 2002-2003 Christoph Lampert
7     *               2002-2003 Edouard Gomez <ed.gomez@free.fr>
8   *   *
9   *  This program is free software; you can redistribute it and/or modify   *  This program is free software; you can redistribute it and/or modify
10   *  it under the terms of the GNU General Public License as published by   *  it under the terms of the GNU General Public License as published by
# Line 19  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.5 2003-02-09 19:32:52 edgomez Exp $   * $Id: xvid_decraw.c,v 1.7.2.4 2003-08-09 09:52:02 chl Exp $
24   *   *
25   ****************************************************************************/   ****************************************************************************/
26    
# Line 31  Line 32 
32   *  the speed for this is measured.   *  the speed for this is measured.
33   *   *
34   *  The program is plain C and needs no libraries except for libxvidcore,   *  The program is plain C and needs no libraries except for libxvidcore,
35   *  and maths-lib, so with UN*X you simply compile by   *  and maths-lib.
36   *   *
37   *   gcc xvid_decraw.c -lxvidcore -lm -o xvid_decraw   *  Use ./xvid_decraw -help for a list of options
  *  
  *  You have to specify the image dimensions (until the add the feature  
  *  to read this from the bitstream)  
  *  
  * Usage : xvid_decraw <-w width> <-h height> [OPTIONS]  
  * Options :  
  *  -asm           : use assembly optimizations (default=disabled)  
  *  -w integer     : frame width ([1.2048])  
  *  -h integer     : frame height ([1.2048])  
  *  -i string      : input filename (default=stdin)  
  *  -t integer     : input data type (raw=0, mp4u=1)  
  *  -d boolean     : save decoder output (0 False*, !=0 True)  
  *  -m boolean     : save mpeg4 raw stream to single files (0 False*, !=0 True)  
  *  -help          : This help message  
  * (* means default)  
38   *   *
39   ****************************************************************************/   ****************************************************************************/
40    
# Line 75  Line 61 
61  static int YDIM = 0;  static int YDIM = 0;
62  static int ARG_SAVEDECOUTPUT = 0;  static int ARG_SAVEDECOUTPUT = 0;
63  static int ARG_SAVEMPEGSTREAM = 0;  static int ARG_SAVEMPEGSTREAM = 0;
 static int ARG_STREAMTYPE = 0;  
64  static char *ARG_INPUTFILE = NULL;  static char *ARG_INPUTFILE = NULL;
65    
66    
67  static char filepath[256] = "./";  static char filepath[256] = "./";
68  static void *dec_handle = NULL;  static void *dec_handle = NULL;
69    
70  # define BUFFER_SIZE 10*XDIM*YDIM  # define BUFFER_SIZE (2*1024*1024)
   
 #define LONG_PACK(a,b,c,d) ((long) (((long)(a))<<24) | (((long)(b))<<16) | \  
                                    (((long)(c))<<8)  |((long)(d)))  
   
 #define SWAP(a) ( (((a)&0x000000ff)<<24) | (((a)&0x0000ff00)<<8) | \  
                   (((a)&0x00ff0000)>>8)  | (((a)&0xff000000)>>24) )  
71    
72  /*****************************************************************************  /*****************************************************************************
73   *               Local prototypes   *               Local prototypes
# Line 101  Line 80 
80  static int dec_main(unsigned char *istream,  static int dec_main(unsigned char *istream,
81                      unsigned char *ostream,                      unsigned char *ostream,
82                      int istream_size,                      int istream_size,
83                      int *ostream_size);                                          xvid_dec_stats_t *xvid_dec_stats);
84  static int dec_stop();  static int dec_stop();
85  static void usage();  static void usage();
86    
87    
88    const char * type2str(int type)
89    {
90        if (type==XVID_TYPE_IVOP)
91            return "I";
92        if (type==XVID_TYPE_PVOP)
93            return "P";
94        if (type==XVID_TYPE_BVOP)
95            return "B";
96        return "S";
97    }
98    
99  /*****************************************************************************  /*****************************************************************************
100   *        Main program   *        Main program
101   ****************************************************************************/   ****************************************************************************/
# Line 114  Line 105 
105          unsigned char *mp4_buffer = NULL;          unsigned char *mp4_buffer = NULL;
106          unsigned char *mp4_ptr    = NULL;          unsigned char *mp4_ptr    = NULL;
107          unsigned char *out_buffer = NULL;          unsigned char *out_buffer = NULL;
108          int bigendian = 0;          int still_left_in_buffer;
109            xvid_dec_stats_t xvid_dec_stats;
110    
111          double totaldectime;          double totaldectime;
112    
# Line 130  Line 122 
122          int i;          int i;
123    
124          printf("xvid_decraw - raw mpeg4 bitstream decoder ");          printf("xvid_decraw - raw mpeg4 bitstream decoder ");
125          printf("written by Christoph Lampert 2002\n\n");          printf("written by Christoph Lampert 2002-2003\n\n");
126    
127  /*****************************************************************************  /*****************************************************************************
128   * Command line parsing   * Command line parsing
# Line 141  Line 133 
133                  if (strcmp("-asm", argv[i]) == 0 ) {                  if (strcmp("-asm", argv[i]) == 0 ) {
134                          use_assembler = 1;                          use_assembler = 1;
135                  }                  }
136                  else if (strcmp("-w", argv[i]) == 0 && i < argc - 1 ) {                  else if (strcmp("-d", argv[i]) == 0) {
137                          i++;                          ARG_SAVEDECOUTPUT = 1;
                         XDIM = atoi(argv[i]);  
                 }  
                 else if (strcmp("-h", argv[i]) == 0 && i < argc - 1 ) {  
                         i++;  
                         YDIM = atoi(argv[i]);  
                 }  
                 else if (strcmp("-d", argv[i]) == 0 && i < argc - 1 ) {  
                         i++;  
                         ARG_SAVEDECOUTPUT = atoi(argv[i]);  
138                  }                  }
139                  else if (strcmp("-i", argv[i]) == 0 && i < argc - 1 ) {                  else if (strcmp("-i", argv[i]) == 0 && i < argc - 1 ) {
140                          i++;                          i++;
141                          ARG_INPUTFILE = argv[i];                          ARG_INPUTFILE = argv[i];
142                  }                  }
143                  else if (strcmp("-m", argv[i]) == 0 && i < argc - 1 ) {                  else if (strcmp("-m", argv[i]) == 0) {
144                          i++;                          ARG_SAVEMPEGSTREAM = 1;
                         ARG_SAVEMPEGSTREAM = atoi(argv[i]);  
145                  }                  }
146                  else if (strcmp("-t", argv[i]) == 0 && i < argc - 1 ) {                  else if (strcmp("-help", argv[i]) == 0) {
                         i++;  
                         ARG_STREAMTYPE = atoi(argv[i]);  
                 }  
                 else if (strcmp("-help", argv[i])) {  
147                          usage();                          usage();
148                          return(0);                          return(0);
149                  }                  }
# Line 180  Line 158 
158   * Values checking   * Values checking
159   ****************************************************************************/   ****************************************************************************/
160    
         if(XDIM <= 0 || XDIM > 2048 || YDIM <= 0 || YDIM > 2048) {  
                 usage();  
                 return -1;  
         }  
   
161          if ( ARG_INPUTFILE == NULL || strcmp(ARG_INPUTFILE, "stdin") == 0) {          if ( ARG_INPUTFILE == NULL || strcmp(ARG_INPUTFILE, "stdin") == 0) {
162                  in_file = stdin;                  in_file = stdin;
163          }          }
# Line 193  Line 166 
166                  in_file = fopen(ARG_INPUTFILE, "rb");                  in_file = fopen(ARG_INPUTFILE, "rb");
167                  if (in_file == NULL) {                  if (in_file == NULL) {
168                          fprintf(stderr, "Error opening input file %s\n", ARG_INPUTFILE);                          fprintf(stderr, "Error opening input file %s\n", ARG_INPUTFILE);
169                          return -1;                          return(-1);
170                  }                  }
171          }          }
172    
# Line 207  Line 180 
180          if (!mp4_buffer)          if (!mp4_buffer)
181                  goto free_all_memory;                  goto free_all_memory;
182    
         /* Memory for frame output */  
         out_buffer = (unsigned char *) malloc(XDIM*YDIM*4);  
         if (!out_buffer)  
                 goto free_all_memory;  
   
   
183  /*****************************************************************************  /*****************************************************************************
184   *        XviD PART  Start   *        XviD PART  Start
185   ****************************************************************************/   ****************************************************************************/
# Line 229  Line 196 
196   *                               Main loop   *                               Main loop
197   ****************************************************************************/   ****************************************************************************/
198    
199          totalsize = LONG_PACK('M','P','4','U');          /* Fill the buffer */
200          mp4_ptr = (unsigned char *)&totalsize;          still_left_in_buffer = fread(mp4_buffer, 1, BUFFER_SIZE, in_file);
         if(*mp4_ptr == 'M')  
                 bigendian = 1;  
         else  
                 bigendian = 0;  
   
         if(ARG_STREAMTYPE) {  
   
                 unsigned char header[4];  
   
                 /* MP4U format  : read header */  
                 if(feof(in_file))  
                         goto release_all;  
                 fread(header, 4, 1, in_file);  
   
                 if(header[0] != 'M' || header[1] != 'P' ||  
                    header[2] != '4' || header[3] != 'U') {  
                         fprintf(stderr, "Error, this not a mp4u container file\n");  
                         goto release_all;  
                 }  
   
         }  
         else {  
                 fread(mp4_buffer, BUFFER_SIZE, 1, in_file);  
         }  
201    
202          totaldectime = 0;          totaldectime = 0;
203          totalsize = 0;          totalsize = 0;
# Line 267  Line 210 
210                  int used_bytes = 0;                  int used_bytes = 0;
211                  double dectime;                  double dectime;
212    
                 /* Read data from input file */  
                 if(ARG_STREAMTYPE) {  
   
                         /* MP4U container */  
   
                         /* Read stream size first */  
                         if(feof(in_file))  
                                 break;  
                         fread(&mp4_size, sizeof(long), 1, in_file);  
   
                         /* Mp4U container is big endian */  
                         if(!bigendian)  
                                 mp4_size = SWAP(mp4_size);  
   
                         /* Read mp4_size_bytes */  
                         if(feof(in_file))  
                                 break;  
                         fread(mp4_buffer, mp4_size, 1, in_file);  
   
213                          /*                          /*
214                           * When reading mp4u, we don't have to care about buffer                   * If the buffer is half empty or there are no more bytes in it
215                           * filling as we know exactly how much bytes there are in                   * then fill it.
                          * next frame  
216                           */                           */
217                          mp4_ptr = mp4_buffer;                  if (mp4_ptr > mp4_buffer + BUFFER_SIZE/2 ||
218                            still_left_in_buffer <= 0) {
                 }  
                 else {  
   
                         /* Real raw stream */  
   
                         /* buffer more than half empty -> Fill it */  
                         if (mp4_ptr > mp4_buffer + BUFFER_SIZE/2) {  
219                                  int rest = (mp4_buffer + BUFFER_SIZE - mp4_ptr);                                  int rest = (mp4_buffer + BUFFER_SIZE - mp4_ptr);
220    
221                                  /* Move data if needed */                                  /* Move data if needed */
# Line 312  Line 228 
228                                  /* read new data */                                  /* read new data */
229                                  if(feof(in_file))                                  if(feof(in_file))
230                                          break;                                          break;
                                 fread(mp4_buffer + rest, BUFFER_SIZE - rest, 1, in_file);  
231    
232                          }                          still_left_in_buffer = fread(mp4_buffer + rest,
233                                                                                     1,
234                                                                                     BUFFER_SIZE - rest,
235                                                                                     in_file);
236    
237                  }                  }
238    
239    
240                    /* This loop is needed to handle VOL/NVOP reading */
241                    do {
242    
243                  /* Decode frame */                  /* Decode frame */
244                  dectime = msecond();                  dectime = msecond();
245                  status = dec_main(mp4_ptr, out_buffer, mp4_size, &used_bytes);                          used_bytes = dec_main(mp4_ptr, out_buffer, mp4_size, &xvid_dec_stats);
246                  dectime = msecond() - dectime;                  dectime = msecond() - dectime;
247    
248                  if (status) {                          /* Resize image buffer if needed */
249                          break;                          if(xvid_dec_stats.type == XVID_TYPE_VOL) {
250    
251                                    /* Free old output buffer*/
252                                    if(out_buffer) free(out_buffer);
253    
254                                    /* Copy witdh and height from the vol structure */
255                                    XDIM = xvid_dec_stats.data.vol.width;
256                                    YDIM = xvid_dec_stats.data.vol.height;
257    
258                                    /* Allocate the new buffer */
259                                    if((out_buffer = (unsigned char*)malloc(XDIM*YDIM*4)) == NULL)
260                                            goto free_all_memory;
261                  }                  }
262    
263                  /*                          /* Update buffer pointers */
264                   * Only needed for real raw stream, mp4u uses                          if(used_bytes > 0) {
                  * mp4_ptr = mp4_buffer for each frame  
                  */  
265                  mp4_ptr += used_bytes;                  mp4_ptr += used_bytes;
266                                    still_left_in_buffer -= used_bytes;
267    
268                  /* Updated data */                                  /* Total size */
269                  totalsize += used_bytes;                  totalsize += used_bytes;
270                            }
271    
272                    }while(xvid_dec_stats.type <= 0 && still_left_in_buffer > 0);
273    
274                    /* Negative buffer would mean we went too far */
275            if(still_left_in_buffer <= 0)
276                break;
277    
278            /* Updated data - Count only usefull decode time */
279                  totaldectime += dectime;                  totaldectime += dectime;
280    
                 /* Prints some decoding stats */  
                 printf("Frame %5d: dectime =%6.1f ms length=%7d bytes \n",  
                        filenr, dectime, used_bytes);  
281    
282                  /* Save individual mpeg4 strean if required */          printf("Frame %5d: type = %s, dectime(ms) =%6.1f, length(bytes) =%7d\n",
283                               filenr, type2str(xvid_dec_stats.type), dectime, used_bytes);
284    
285                    /* Save individual mpeg4 stream if required */
286                  if (ARG_SAVEMPEGSTREAM) {                  if (ARG_SAVEMPEGSTREAM) {
287                          FILE *filehandle = NULL;                          FILE *filehandle = NULL;
288    
# Line 353  Line 294 
294                                          filename);                                          filename);
295                          }                          }
296                          else {                          else {
297                                  fwrite(mp4_buffer, used_bytes, 1, filehandle);                                  fwrite(mp4_buffer, 1, used_bytes, filehandle);
298                                  fclose(filehandle);                                  fclose(filehandle);
299                          }                          }
300                  }                  }
301    
   
302                  /* Save output frame if required */                  /* Save output frame if required */
303                  if (ARG_SAVEDECOUTPUT) {                  if (ARG_SAVEDECOUTPUT) {
304                          sprintf(filename, "%sdec%05d.pgm", filepath, filenr);                          sprintf(filename, "%sdec%05d.pgm", filepath, filenr);
# Line 373  Line 313 
313    
314          } while ( (status>=0) && (filenr<ABS_MAXFRAMENR) );          } while ( (status>=0) && (filenr<ABS_MAXFRAMENR) );
315    
316    /*****************************************************************************
317     *     Flush decoder buffers
318     ****************************************************************************/
319    
320            do {
321    
322                    /* Fake vars */
323                    int used_bytes;
324                    double dectime;
325    
326            do {
327                        dectime = msecond();
328                        used_bytes = dec_main(NULL, out_buffer, -1, &xvid_dec_stats);
329                        dectime = msecond() - dectime;
330            }while(used_bytes>=0 && xvid_dec_stats.type <= 0);
331    
332            if (used_bytes < 0) {   /* XVID_ERR_END */
333                break;
334            }
335    
336                    /* Updated data - Count only usefull decode time */
337                    totaldectime += dectime;
338    
339                    /* Prints some decoding stats */
340            printf("Frame %5d: type = %s, dectime(ms) =%6.1f, length(bytes) =%7d\n",
341                               filenr, type2str(xvid_dec_stats.type), dectime, used_bytes);
342    
343                    /* Save output frame if required */
344                    if (ARG_SAVEDECOUTPUT) {
345                            sprintf(filename, "%sdec%05d.pgm", filepath, filenr);
346                            if(write_pgm(filename, out_buffer)) {
347                                    fprintf(stderr,
348                                                    "Error writing decoded PGM frame %s\n",
349                                                    filename);
350                            }
351                    }
352    
353                    filenr++;
354    
355            }while(1);
356    
357  /*****************************************************************************  /*****************************************************************************
358   *     Calculate totals and averages for output, print results   *     Calculate totals and averages for output, print results
# Line 381  Line 361 
361          totalsize    /= filenr;          totalsize    /= filenr;
362          totaldectime /= filenr;          totaldectime /= filenr;
363    
364          printf("Avg: dectime %5.2f ms, %5.2f fps, mp4 stream size =%d\n",          printf("Avg: dectime(ms) =%7.2f, fps =%7.2f, length(bytes) =%7d\n",
365                  totaldectime, 1000/totaldectime, (int)totalsize);                  totaldectime, 1000/totaldectime, (int)totalsize);
366    
367  /*****************************************************************************  /*****************************************************************************
# Line 399  Line 379 
379          free(out_buffer);          free(out_buffer);
380          free(mp4_buffer);          free(mp4_buffer);
381    
382          return 0;          return(0);
383  }  }
384    
385  /*****************************************************************************  /*****************************************************************************
# Line 409  Line 389 
389  static void usage()  static void usage()
390  {  {
391    
392          fprintf(stderr, "Usage : xvid_decraw <-w width> <-h height> [OPTIONS]\n");          fprintf(stderr, "Usage : xvid_decraw [OPTIONS]\n");
393          fprintf(stderr, "Options :\n");          fprintf(stderr, "Options :\n");
394          fprintf(stderr, " -asm           : use assembly optimizations (default=disabled)\n");          fprintf(stderr, " -asm           : use assembly optimizations (default=disabled)\n");
         fprintf(stderr, " -w integer     : frame width ([1.2048])\n");  
         fprintf(stderr, " -h integer     : frame height ([1.2048])\n");  
395          fprintf(stderr, " -i string      : input filename (default=stdin)\n");          fprintf(stderr, " -i string      : input filename (default=stdin)\n");
396          fprintf(stderr, " -t integer     : input data type (raw=0, mp4u=1)\n");          fprintf(stderr, " -t integer     : input data type (raw=0, mp4u=1)\n");
397          fprintf(stderr, " -d boolean     : save decoder output (0 False*, !=0 True)\n");          fprintf(stderr, " -d             : save decoder output\n");
398          fprintf(stderr, " -m boolean     : save mpeg4 raw stream to individual files (0 False*, !=0 True)\n");          fprintf(stderr, " -m             : save mpeg4 raw stream to individual files\n");
399          fprintf(stderr, " -help          : This help message\n");          fprintf(stderr, " -help          : This help message\n");
400          fprintf(stderr, " (* means default)\n");          fprintf(stderr, " (* means default)\n");
401    
# Line 434  Line 412 
412  #ifndef WIN32  #ifndef WIN32
413          struct timeval  tv;          struct timeval  tv;
414          gettimeofday(&tv, 0);          gettimeofday(&tv, 0);
415          return (double)tv.tv_sec*1.0e3 + (double)tv.tv_usec*1.0e-3;          return((double)tv.tv_sec*1.0e3 + (double)tv.tv_usec*1.0e-3);
416  #else  #else
417          clock_t clk;          clock_t clk;
418          clk = clock();          clk = clock();
419          return clk * 1000 / CLOCKS_PER_SEC;          return(clk * 1000 / CLOCKS_PER_SEC);
420  #endif  #endif
421  }  }
422    
# Line 483  Line 461 
461                  /* Close file */                  /* Close file */
462                  fclose(filehandle);                  fclose(filehandle);
463    
464                  return 0;                  return(0);
465          }          }
466          else          else
467                  return 1;                  return(1);
468  }  }
469    
470  /*****************************************************************************  /*****************************************************************************
# Line 497  Line 475 
475  static int  static int
476  dec_init(int use_assembler)  dec_init(int use_assembler)
477  {  {
478          int xerr;          int ret;
479    
480            xvid_gbl_init_t   xvid_gbl_init;
481            xvid_dec_create_t xvid_dec_create;
482    
483          XVID_INIT_PARAM xinit;          /*------------------------------------------------------------------------
484          XVID_DEC_PARAM xparam;           * XviD core initialization
485             *----------------------------------------------------------------------*/
486    
487            /* Version */
488            xvid_gbl_init.version = XVID_VERSION;
489    
490            /* Assembly setting */
491                  if(use_assembler)                  if(use_assembler)
492  #ifdef ARCH_IA64  #ifdef ARCH_IS_IA64
493                          xinit.cpu_flags = XVID_CPU_FORCE | XVID_CPU_IA64;                  xvid_gbl_init.cpu_flags = XVID_CPU_FORCE | XVID_CPU_IA64;
494  #else  #else
495                          xinit.cpu_flags = 0;          xvid_gbl_init.cpu_flags = 0;
496  #endif  #endif
497                  else                  else
498                          xinit.cpu_flags = XVID_CPU_FORCE;                  xvid_gbl_init.cpu_flags = XVID_CPU_FORCE;
499    
500            xvid_global(NULL, 0, &xvid_gbl_init, NULL);
501    
502            /*------------------------------------------------------------------------
503             * XviD encoder initialization
504             *----------------------------------------------------------------------*/
505    
506          xvid_init(NULL, 0, &xinit, NULL);          /* Version */
507          xparam.width = XDIM;          xvid_dec_create.version = XVID_VERSION;
         xparam.height = YDIM;  
508    
509          xerr = xvid_decore(NULL, XVID_DEC_CREATE, &xparam, NULL);          /*
510          dec_handle = xparam.handle;           * Image dimensions -- set to 0, xvidcore will resize when ever it is
511             * needed
512             */
513            xvid_dec_create.width = 0;
514            xvid_dec_create.height = 0;
515    
516            ret = xvid_decore(NULL, XVID_DEC_CREATE, &xvid_dec_create, NULL);
517    
518            dec_handle = xvid_dec_create.handle;
519    
520          return xerr;          return(ret);
521  }  }
522    
523  /* decode one frame  */  /* decode one frame  */
# Line 526  Line 525 
525  dec_main(unsigned char *istream,  dec_main(unsigned char *istream,
526           unsigned char *ostream,           unsigned char *ostream,
527           int istream_size,           int istream_size,
528           int *ostream_size)                   xvid_dec_stats_t *xvid_dec_stats)
529  {  {
530    
531          int xerr;          int ret;
532          XVID_DEC_FRAME xframe;  
533            xvid_dec_frame_t xvid_dec_frame;
534    
535            /* Set version */
536            xvid_dec_frame.version = XVID_VERSION;
537            xvid_dec_stats->version = XVID_VERSION;
538    
539            /* No general flags to set */
540            xvid_dec_frame.general          = 0;
541    
542          xframe.bitstream = istream;          /* Input stream */
543          xframe.length = istream_size;          xvid_dec_frame.bitstream        = istream;
544          xframe.image = ostream;          xvid_dec_frame.length           = istream_size;
         xframe.stride = XDIM;  
         xframe.colorspace = XVID_CSP_YV12;  
545    
546          xerr = xvid_decore(dec_handle, XVID_DEC_DECODE, &xframe, NULL);          /* Output frame structure */
547            xvid_dec_frame.output.plane[0]  = ostream;
548            xvid_dec_frame.output.stride[0] = XDIM;
549            xvid_dec_frame.output.csp       = XVID_CSP_I420;
550    
551          *ostream_size = xframe.length;          ret = xvid_decore(dec_handle, XVID_DEC_DECODE, &xvid_dec_frame, xvid_dec_stats);
552    
553          return xerr;          return(ret);
554  }  }
555    
556  /* close decoder to release resources */  /* close decoder to release resources */
557  static int  static int
558  dec_stop()  dec_stop()
559  {  {
560          int xerr;          int ret;
561    
562          xerr = xvid_decore(dec_handle, XVID_DEC_DESTROY, NULL, NULL);          ret = xvid_decore(dec_handle, XVID_DEC_DESTROY, NULL, NULL);
563    
564          return xerr;          return(ret);
565  }  }

Legend:
Removed from v.824  
changed lines
  Added in v.1116

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