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:
David Webster 2002-10-11 16:01:49 +00:00
parent 376ef4a1f4
commit 7bfbbc0efb
6 changed files with 88 additions and 13 deletions

View File

@ -21,6 +21,12 @@ LOCAL(void) transencode_master_selection
LOCAL(void) transencode_coef_controller
JPP((j_compress_ptr cinfo, jvirt_barray_ptr * coef_arrays));
#if defined(__VISAGECPP__)
/* Visual Age fixups for multiple declarations */
# define start_pass_coef start_pass_coef2 /* already in jccoeft.c */
# define compress_output compress_output2 /* already in jccoeft.c */
#endif
/*
* Compression initialization for writing raw-coefficient data.
@ -246,7 +252,6 @@ start_iMCU_row (j_compress_ptr cinfo)
coef->MCU_vert_offset = 0;
}
/*
* Initialize for a processing pass.
*/
@ -386,3 +391,12 @@ transencode_coef_controller (j_compress_ptr cinfo,
coef->dummy_buffer[i] = buffer + i;
}
}
#if defined(__VISAGECPP__)
# ifdef start_pass_coef2
# undef start_pass_coef2
# endif
# ifdef compress_output2
# undef compress_output2
# endif
#endif

View File

@ -12,6 +12,11 @@
#include "jinclude.h"
#include "jpeglib.h"
#if defined(__VISAGECPP__)
/* Visual Age fixups for multiple declarations */
# define null_convert null_convert2 /* already in jcmaint.c */
# define grayscale_convert grayscale_convert2 /* already in jcmaint.c */
#endif
/* Private subobject */
@ -394,3 +399,12 @@ jinit_color_deconverter (j_decompress_ptr cinfo)
else
cinfo->output_components = cinfo->out_color_components;
}
#if defined(__VISAGECPP__)
# ifdef null_convert2
# undef null_convert2
# endif
# ifdef grayscale_convert2
# undef grayscale_convert2
# endif
#endif

View File

@ -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

View File

@ -141,6 +141,12 @@ typedef my_main_controller * my_main_ptr;
#define CTX_POSTPONED_ROW 2 /* feeding postponed row group */
#if defined(__VISAGECPP__)
/* Visual Age fixups for multiple declarations */
# define start_pass_main start_pass_main2 /* already in jcmaint.c */
# define process_data_simple_main process_data_simple_main2 /* already in jcmaint.c */
#endif
/* Forward declarations */
METHODDEF(void) process_data_simple_main
JPP((j_decompress_ptr cinfo, JSAMPARRAY output_buf,
@ -512,3 +518,12 @@ jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer)
(JDIMENSION) (rgroup * ngroups));
}
}
#if defined(__VISAGECPP__)
# ifdef start_pass_main2
# undef start_pass_main2
# endif
# ifdef process_data_simple_main2
# undef process_data_simple_main2
# endif
#endif

View File

@ -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 */
@ -217,7 +221,7 @@ jpeg_calc_output_dimensions (j_decompress_ptr cinfo)
* For most steps we can mathematically guarantee that the initial value
* of x is within MAXJSAMPLE+1 of the legal range, so a table running from
* -(MAXJSAMPLE+1) to 2*MAXJSAMPLE+1 is sufficient. But for the initial
* limiting step (just after the IDCT), a wildly out-of-range value is
* limiting step (just after the IDCT), a wildly out-of-range value is
* possible if the input data is corrupt. To avoid any chance of indexing
* off the end of memory and getting a bad-pointer trap, we perform the
* post-IDCT limiting thus:
@ -555,3 +559,10 @@ jinit_master_decompress (j_decompress_ptr cinfo)
master_selection(cinfo);
}
#if defined(__VISAGECPP__)
# ifdef start_input_pass2
# undef start_input_pass2
# endif
#endif

View File

@ -142,6 +142,11 @@ struct jpeg_decomp_master {
boolean is_dummy_pass; /* True during 1st pass for 2-pass quant */
};
#if defined(__VISAGECPP__)
/* Visual Age fixups for multiple declarations */
# define start_input_pass start_input_pass2 /* already in jcmaint.c */
#endif
/* Input control module */
struct jpeg_input_controller {
JMETHOD(int, consume_input, (j_decompress_ptr cinfo));
@ -154,6 +159,12 @@ struct jpeg_input_controller {
boolean eoi_reached; /* True when EOI has been consumed */
};
#if defined(__VISAGECPP__)
# ifdef start_input_pass2
# undef start_input_pass2
# endif
#endif
/* Main buffer control (downsampled-data buffer) */
struct jpeg_d_main_controller {
JMETHOD(void, start_pass, (j_decompress_ptr cinfo, J_BUF_MODE pass_mode));