]> Creatis software - gdcm.git/blobdiff - src/jpeg/libijg/jcapistd.c
ENH: update jpeg lib with ls patch and 2 bugfix patch
[gdcm.git] / src / jpeg / libijg / jcapistd.c
index c0320b1b190f5b3b14e9f903bcd0a5cba8c84ef2..ee2a8496e09e24e29c02d7b192559d8894c680a9 100644 (file)
@@ -41,7 +41,7 @@ jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
     ERREXIT1(cinfo, JERR_BAD_STATE, cinfo->global_state);
 
   if (write_all_tables)
-    jpeg_suppress_tables(cinfo, FALSE);        /* mark all tables to be written */
+    jpeg_suppress_tables(cinfo, FALSE);  /* mark all tables to be written */
 
   /* (Re)initialize error mgr and destination modules */
   (*cinfo->err->reset_error_mgr) ((j_common_ptr) cinfo);
@@ -75,7 +75,7 @@ jpeg_start_compress (j_compress_ptr cinfo, boolean write_all_tables)
 
 GLOBAL(JDIMENSION)
 jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
-                     JDIMENSION num_lines)
+          JDIMENSION num_lines)
 {
   JDIMENSION row_ctr, rows_left;
 
@@ -118,7 +118,7 @@ jpeg_write_scanlines (j_compress_ptr cinfo, JSAMPARRAY scanlines,
 
 GLOBAL(JDIMENSION)
 jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
-                    JDIMENSION num_lines)
+         JDIMENSION num_lines)
 {
   JDIMENSION lines_per_iMCU_row;
 
@@ -145,12 +145,12 @@ jpeg_write_raw_data (j_compress_ptr cinfo, JSAMPIMAGE data,
     (*cinfo->master->pass_startup) (cinfo);
 
   /* Verify that at least one iMCU row has been passed. */
-  lines_per_iMCU_row = cinfo->max_v_samp_factor * DCTSIZE;
+  lines_per_iMCU_row = cinfo->max_v_samp_factor * cinfo->data_unit;
   if (num_lines < lines_per_iMCU_row)
     ERREXIT(cinfo, JERR_BUFFER_SIZE);
 
   /* Directly compress the row. */
-  if (! (*cinfo->coef->compress_data) (cinfo, data)) {
+  if (! (*cinfo->codec->compress_data) (cinfo, data)) {
     /* If compressor did not consume the whole row, suspend processing. */
     return 0;
   }