]> Creatis software - gdcm.git/blobdiff - src/jpeg/libijg/jcapimin.c
ENH: ok making too many mistakes time to go to bed
[gdcm.git] / src / jpeg / libijg / jcapimin.c
index 54fb8c58c5656947c285fc8d98d5c23815aec1eb..7bb6e7b410fba4d4eca4b26c13236ea39fad6f75 100644 (file)
@@ -32,12 +32,12 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
   int i;
 
   /* Guard against version mismatches between library and caller. */
-  cinfo->mem = NULL;           /* so jpeg_destroy knows mem mgr not called */
+  cinfo->mem = NULL;    /* so jpeg_destroy knows mem mgr not called */
   if (version != JPEG_LIB_VERSION)
     ERREXIT2(cinfo, JERR_BAD_LIB_VERSION, JPEG_LIB_VERSION, version);
   if (structsize != SIZEOF(struct jpeg_compress_struct))
     ERREXIT2(cinfo, JERR_BAD_STRUCT_SIZE, 
-            (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
+       (int) SIZEOF(struct jpeg_compress_struct), (int) structsize);
 
   /* For debugging purposes, we zero the whole master structure.
    * But the application has already set the err pointer, and may have set
@@ -73,7 +73,7 @@ jpeg_CreateCompress (j_compress_ptr cinfo, int version, size_t structsize)
 
   cinfo->script_space = NULL;
 
-  cinfo->input_gamma = 1.0;    /* in case application forgets */
+  cinfo->input_gamma = 1.0;  /* in case application forgets */
 
   /* OK, I'm ready */
   cinfo->global_state = CSTATE_START;
@@ -161,15 +161,15 @@ jpeg_finish_compress (j_compress_ptr cinfo)
     (*cinfo->master->prepare_for_pass) (cinfo);
     for (iMCU_row = 0; iMCU_row < cinfo->total_iMCU_rows; iMCU_row++) {
       if (cinfo->progress != NULL) {
-       cinfo->progress->pass_counter = (long) iMCU_row;
-       cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
-       (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
+  cinfo->progress->pass_counter = (long) iMCU_row;
+  cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows;
+  (*cinfo->progress->progress_monitor) ((j_common_ptr) cinfo);
       }
       /* We bypass the main controller and invoke coef controller directly;
        * all work is being done from the coefficient buffer.
        */
-      if (! (*cinfo->coef->compress_data) (cinfo, (JSAMPIMAGE) NULL))
-       ERREXIT(cinfo, JERR_CANT_SUSPEND);
+      if (! (*cinfo->codec->compress_data) (cinfo, (JSAMPIMAGE) NULL))
+  ERREXIT(cinfo, JERR_CANT_SUSPEND);
     }
     (*cinfo->master->finish_pass) (cinfo);
   }
@@ -190,7 +190,7 @@ jpeg_finish_compress (j_compress_ptr cinfo)
 
 GLOBAL(void)
 jpeg_write_marker (j_compress_ptr cinfo, int marker,
-                  const JOCTET *dataptr, unsigned int datalen)
+       const JOCTET *dataptr, unsigned int datalen)
 {
   JMETHOD(void, write_marker_byte, (j_compress_ptr info, int val));
 
@@ -201,7 +201,7 @@ jpeg_write_marker (j_compress_ptr cinfo, int marker,
     ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
 
   (*cinfo->marker->write_marker_header) (cinfo, marker, datalen);
-  write_marker_byte = cinfo->marker->write_marker_byte;        /* copy for speed */
+  write_marker_byte = cinfo->marker->write_marker_byte;  /* copy for speed */
   while (datalen--) {
     (*write_marker_byte) (cinfo, *dataptr);
     dataptr++;
@@ -236,14 +236,14 @@ jpeg_write_m_byte (j_compress_ptr cinfo, int val)
  * To produce a pair of files containing abbreviated tables and abbreviated
  * image data, one would proceed as follows:
  *
- *             initialize JPEG object
- *             set JPEG parameters
- *             set destination to table file
- *             jpeg_write_tables(cinfo);
- *             set destination to image file
- *             jpeg_start_compress(cinfo, FALSE);
- *             write data...
- *             jpeg_finish_compress(cinfo);
+ *    initialize JPEG object
+ *    set JPEG parameters
+ *    set destination to table file
+ *    jpeg_write_tables(cinfo);
+ *    set destination to image file
+ *    jpeg_start_compress(cinfo, FALSE);
+ *    write data...
+ *    jpeg_finish_compress(cinfo);
  *
  * jpeg_write_tables has the side effect of marking all tables written
  * (same as jpeg_suppress_tables(..., TRUE)).  Thus a subsequent start_compress