Fixups in jpeg lib for multiplely defined symbolsa under VisualAge for OS/2
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@17495 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -15,6 +15,10 @@
|
||||
#include "jinclude.h"
|
||||
#include "jpeglib.h"
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
/* Visual Age fixups for multiple declarations */
|
||||
# define start_input_pass start_input_pass2 /* already in jcmaint.c */
|
||||
#endif
|
||||
|
||||
/* Private state */
|
||||
|
||||
@@ -124,16 +128,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 +150,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 +169,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 +194,7 @@ per_scan_setup (j_decompress_ptr cinfo)
|
||||
cinfo->MCU_membership[cinfo->blocks_in_MCU++] = ci;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -379,3 +383,9 @@ jinit_input_controller (j_decompress_ptr cinfo)
|
||||
inputctl->pub.eoi_reached = FALSE;
|
||||
inputctl->inheaders = TRUE;
|
||||
}
|
||||
|
||||
#if defined(__VISAGECPP__)
|
||||
# ifdef start_input_pass2
|
||||
# undef start_input_pass2
|
||||
# endif
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user