]> git.saurik.com Git - wxWidgets.git/blobdiff - src/jpeg/jdinput.c
remove incorrect cast of wxString to char* (unnecessary and breaks wxUSE_STL build)
[wxWidgets.git] / src / jpeg / jdinput.c
index 0c2ac8f120bca16bff13b989d8879ac9db85a011..c89b75de580030f1ce4766f28c49c439cd98e571 100644 (file)
 #include "jinclude.h"
 #include "jpeglib.h"
 
-
 /* Private state */
 
 typedef struct {
   struct jpeg_input_controller pub; /* public fields */
 
-  boolean inheaders;           /* TRUE until first SOS is reached */
+  wxjpeg_boolean inheaders;            /* TRUE until first SOS is reached */
 } my_input_controller;
 
 typedef my_input_controller * my_inputctl_ptr;
@@ -124,16 +123,16 @@ per_scan_setup (j_decompress_ptr cinfo)
 {
   int ci, mcublks, tmp;
   jpeg_component_info *compptr;
-  
+
   if (cinfo->comps_in_scan == 1) {
-    
+
     /* Noninterleaved (single-component) scan */
     compptr = cinfo->cur_comp_info[0];
-    
+
     /* Overall image size in MCUs */
     cinfo->MCUs_per_row = compptr->width_in_blocks;
     cinfo->MCU_rows_in_scan = compptr->height_in_blocks;
-    
+
     /* For noninterleaved scan, always one block per MCU */
     compptr->MCU_width = 1;
     compptr->MCU_height = 1;
@@ -146,18 +145,18 @@ per_scan_setup (j_decompress_ptr cinfo)
     tmp = (int) (compptr->height_in_blocks % compptr->v_samp_factor);
     if (tmp == 0) tmp = compptr->v_samp_factor;
     compptr->last_row_height = tmp;
-    
+
     /* Prepare array describing MCU composition */
     cinfo->blocks_in_MCU = 1;
     cinfo->MCU_membership[0] = 0;
-    
+
   } else {
-    
+
     /* Interleaved (multi-component) scan */
     if (cinfo->comps_in_scan <= 0 || cinfo->comps_in_scan > MAX_COMPS_IN_SCAN)
       ERREXIT2(cinfo, JERR_COMPONENT_COUNT, cinfo->comps_in_scan,
               MAX_COMPS_IN_SCAN);
-    
+
     /* Overall image size in MCUs */
     cinfo->MCUs_per_row = (JDIMENSION)
       jdiv_round_up((long) cinfo->image_width,
@@ -165,9 +164,9 @@ per_scan_setup (j_decompress_ptr cinfo)
     cinfo->MCU_rows_in_scan = (JDIMENSION)
       jdiv_round_up((long) cinfo->image_height,
                    (long) (cinfo->max_v_samp_factor*DCTSIZE));
-    
+
     cinfo->blocks_in_MCU = 0;
-    
+
     for (ci = 0; ci < cinfo->comps_in_scan; ci++) {
       compptr = cinfo->cur_comp_info[ci];
       /* Sampling factors give # of blocks of component in each MCU */
@@ -190,7 +189,7 @@ per_scan_setup (j_decompress_ptr cinfo)
        cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
       }
     }
-    
+
   }
 }
 
@@ -256,7 +255,11 @@ start_input_pass (j_decompress_ptr cinfo)
   per_scan_setup(cinfo);
   latch_quant_tables(cinfo);
   (*cinfo->entropy->start_pass) (cinfo);
+#if defined(__VISAGECPP__)
+  (*cinfo->coef->start_input_pass2) (cinfo);
+#else
   (*cinfo->coef->start_input_pass) (cinfo);
+#endif
   cinfo->inputctl->consume_input = cinfo->coef->consume_data;
 }
 
@@ -379,3 +382,4 @@ jinit_input_controller (j_decompress_ptr cinfo)
   inputctl->pub.eoi_reached = FALSE;
   inputctl->inheaders = TRUE;
 }
+