]> Creatis software - gdcm.git/commitdiff
ENH: Compile now on C90 compilers
authormalaterre <malaterre>
Wed, 26 Oct 2005 20:51:54 +0000 (20:51 +0000)
committermalaterre <malaterre>
Wed, 26 Oct 2005 20:51:54 +0000 (20:51 +0000)
src/gdcmmpeg2/src/mpeg2dec/global.h
src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.c
src/gdcmmpeg2/src/mpeg2dec/mpeg2dec.h
src/gdcmmpeg2/src/mpeg2dec/store.c

index 10159af8015e9bca967200455f2d99390a9f1c9a..0d592ba852fec72d86eefd80843fefb11f977bb7 100644 (file)
@@ -118,6 +118,7 @@ void form_predictions _ANSI_ARGS_((int bx, int by, int macroblock_type,
 void Spatial_Prediction _ANSI_ARGS_((void));
 
 /* store.c */
+void FreeStaticBuffer _ANSI_ARGS_((void));
 void Write_Frame _ANSI_ARGS_((unsigned char *src[], int frame));
 
 #ifdef DISPLAY
index dbfe0f3f25cddabe7b122fa4550de87480d948dd..5211f3f702f3ae1718f9397954cd235084ee3aa2 100644 (file)
@@ -83,7 +83,7 @@ int my_fopenr(const char *path, const char *mode, istream *os)
   if(fd)
     {
     os->InFd = fd;
-    return 1; //success
+    return 1; /*success*/
     }
   else
     os->InFd = NULL;
@@ -96,7 +96,7 @@ int my_fopen(const char *path, const char *mode, ostream *os)
   if(fd)
     {
     os->OutFd = fd;
-    return 1; //success
+    return 1; /*success*/
     }
   else
     os->OutFd = NULL;
@@ -134,7 +134,6 @@ int my_fclose(ostream *fp)
 
 int my_printf(const char *format, ...)
 {
-  //return printf(format, ...);
   va_list argptr;
   int ret;
 
@@ -147,7 +146,6 @@ int my_printf(const char *format, ...)
 
 int my_sprintf(char *str, const char *format, ...)
 {
-  //return sprintf(str, format, ...);
   va_list argptr;
   int ret;
 
@@ -160,7 +158,6 @@ int my_sprintf(char *str, const char *format, ...)
 
 int my_fprintf(const char *format, ...)
 {
-  //return fprintf(stderr, format, ...);
   va_list argptr;
   int ret;
 
@@ -311,10 +308,10 @@ static void Initialize_Decoder()
 
 static void DeInitialize_Decoder()
 {
-  free(Clip-384); // WTF !!!
+  free(Clip-384); /* I love magic number */
 }
 
-/* mostly IMPLEMENTAION specific rouintes */
+/* mostly IMPLEMENTAION specific routines */
 static void Initialize_Sequence()
 {
   int cc, size;
@@ -438,16 +435,16 @@ char *argv[];              /* argument vector */
 "         -f        store/display interlaced video in frame format\n"
 "         -g        concatenated file format for substitution method (-x)\n"
 "         -in file  information & statistics report  (n: level)\n"
-"         -l  file  file name pattern for lower layer sequence\n"
-"                   (for spatial scalability)\n"
+"         -l  file  file name pattern for lower layer sequence\n");
+printf("                   (for spatial scalability)\n"
 "         -on file  output format (0:YUV 1:SIF 2:TGA 3:PPM 4:X11 5:X11HiQ)\n"
 "         -q        disable warnings to stderr\n"
 "         -r        use double precision reference IDCT\n"
 "         -t        enable low level tracing to stdout\n"
 "         -u  file  print user_data to stdio or file\n"
 "         -vn       verbose output (n: level)\n"
-"         -x  file  filename pattern of picture substitution sequence\n\n"
-"File patterns:  for sequential filenames, \"printf\" style, e.g. rec%%d\n"
+"         -x  file  filename pattern of picture substitution sequence\n\n");
+printf("File patterns:  for sequential filenames, \"printf\" style, e.g. rec%%d\n"
 "                 or rec%%d%%c for fieldwise storage\n"
 "Levels:        0:none 1:sequence 2:picture 3:slice 4:macroblock 5:block\n\n"
 "Example:       mpeg2decode -b bitstream.mpg -f -r -o0 rec%%d\n"
@@ -769,7 +766,7 @@ static void Deinitialize_Sequence()
 {
   int i;
 
-  /* First clenup the static buffer in store.c */
+  /* First cleanup the static buffer in store.c */
   FreeStaticBuffer();
 
   /* clear flags */
index 6cf7ebe741fb63a41667ea8380fc9bed3f697078..acca16872148904f5fc600fb397868934e8b142b 100644 (file)
@@ -137,12 +137,10 @@ typedef struct
   FILE* OutFd;
 } ostream;
 
-//int my_open(char *filename);
 int my_printf(const char *format, ...);
 int my_fprintf(const char *format, ...);
 int my_sprintf(char *str, const char *format, ...);
 void my_exit(int status);
-//ostream *my_fopen(const char *path, const char *mode);
 int my_fopenr(const char *path, const char *mode, istream *os);
 int my_fopen(const char *path, const char *mode, ostream *os);
 int my_fseek(ostream *stream, long offset, int whence);
index 61366c097915e3dc605ac4ba9180fde1e591b3ec..852b843593b4cd6ea0e67317f89a6b8e45c33a05 100644 (file)
@@ -53,7 +53,7 @@ static void conv420to422 _ANSI_ARGS_((unsigned char *src, unsigned char *dst));
 static unsigned char obfr[OBFRSIZE];
 static unsigned char *optr;
 static ostream *outfile;
-unsigned char *static_malloc[6] = {0,0,0,0,0,0}; //worse case there is 6 buffer in this impl unit.
+unsigned char *static_malloc[6] = {0,0,0,0,0,0}; /*worse case there is 6 buffer in this impl unit.*/
 
 void FreeStaticBuffer()
 {
@@ -160,12 +160,11 @@ int offset,incr,width,height;
 {
   int i, j;
   unsigned char *p;
+  ostream file;
 
   if (!Quiet_Flag)
     my_fprintf("saving %s\n",name);
 
-  //if ((outfile = open(name,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
-  ostream file;
   outfile = &file;
   if(!my_fopen(name, "wb", outfile))
   {
@@ -199,6 +198,7 @@ int offset, incr, height;
   int i,j;
   unsigned char *py, *pu, *pv;
   static unsigned char *u422, *v422;
+  ostream file;
 
   if (chroma_format==CHROMA444)
     Error("4:4:4 not supported for SIF format");
@@ -231,8 +231,6 @@ int offset, incr, height;
   if (!Quiet_Flag)
     my_fprintf("saving %s\n",outname);
 
-  //if ((outfile = open(outname,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
-  ostream file;
   outfile = &file;
   if(!my_fopen(outname, "wb", outfile))
   {
@@ -279,6 +277,7 @@ int tgaflag;
   static unsigned char tga24[14] = {0,0,2,0,0,0,0, 0,0,0,0,0,24,32};
   char header[FILENAME_LENGTH];
   static unsigned char *u422, *v422, *u444, *v444;
+  ostream file;
 
   if (chroma_format==CHROMA444)
   {
@@ -331,8 +330,6 @@ int tgaflag;
   if (!Quiet_Flag)
     my_fprintf("saving %s\n",outname);
 
-  //if ((outfile = open(outname,O_CREAT|O_TRUNC|O_WRONLY|O_BINARY,0666))==-1)
-  ostream file;
   outfile = &file;
   if(! my_fopen(outname, "wb", outfile))
   {