]> git.saurik.com Git - wxWidgets.git/blobdiff - src/jpeg/jdinput.c
Removed code duplication introduced during wxUniv merge in 1.132
[wxWidgets.git] / src / jpeg / jdinput.c
index 0c2ac8f120bca16bff13b989d8879ac9db85a011..942a99c1417d8cfb95b5f81a430fefca298b4d56 100644 (file)
@@ -15,7 +15,6 @@
 #include "jinclude.h"
 #include "jpeglib.h"
 
-
 /* Private state */
 
 typedef struct {
@@ -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;
 }
+