"tools/git@developer.sourcefind.cn:OpenDAS/dlib.git" did not exist on "d7644ef2b7234520ddcfe882cf37fd62c2300581"
Commit 56d69eee authored by Davis King's avatar Davis King
Browse files

Just removed some typedefs because they cause name conflicts in

visual studio 2010.  So I just replaced the uses of the typedef
with the actual type.
parent fa25ae78
...@@ -238,7 +238,7 @@ default_decompress_parms (j_decompress_ptr cinfo) ...@@ -238,7 +238,7 @@ default_decompress_parms (j_decompress_ptr cinfo)
*/ */
GLOBAL(int) GLOBAL(int)
jpeg_read_header (j_decompress_ptr cinfo, boolean require_image) jpeg_read_header (j_decompress_ptr cinfo, int require_image)
{ {
int retcode; int retcode;
...@@ -330,7 +330,7 @@ jpeg_consume_input (j_decompress_ptr cinfo) ...@@ -330,7 +330,7 @@ jpeg_consume_input (j_decompress_ptr cinfo)
* Have we finished reading the input file? * Have we finished reading the input file?
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_input_complete (j_decompress_ptr cinfo) jpeg_input_complete (j_decompress_ptr cinfo)
{ {
/* Check for valid jpeg object */ /* Check for valid jpeg object */
...@@ -345,7 +345,7 @@ jpeg_input_complete (j_decompress_ptr cinfo) ...@@ -345,7 +345,7 @@ jpeg_input_complete (j_decompress_ptr cinfo)
* Is there more than one scan? * Is there more than one scan?
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_has_multiple_scans (j_decompress_ptr cinfo) jpeg_has_multiple_scans (j_decompress_ptr cinfo)
{ {
/* Only valid after jpeg_read_header completes */ /* Only valid after jpeg_read_header completes */
...@@ -365,7 +365,7 @@ jpeg_has_multiple_scans (j_decompress_ptr cinfo) ...@@ -365,7 +365,7 @@ jpeg_has_multiple_scans (j_decompress_ptr cinfo)
* a suspending data source is used. * a suspending data source is used.
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_finish_decompress (j_decompress_ptr cinfo) jpeg_finish_decompress (j_decompress_ptr cinfo)
{ {
if ((cinfo->global_state == DSTATE_SCANNING || if ((cinfo->global_state == DSTATE_SCANNING ||
......
...@@ -20,7 +20,7 @@ ...@@ -20,7 +20,7 @@
/* Forward declarations */ /* Forward declarations */
LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); LOCAL(int) output_pass_setup JPP((j_decompress_ptr cinfo));
/* /*
...@@ -34,7 +34,7 @@ LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo)); ...@@ -34,7 +34,7 @@ LOCAL(boolean) output_pass_setup JPP((j_decompress_ptr cinfo));
* a suspending data source is used. * a suspending data source is used.
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_start_decompress (j_decompress_ptr cinfo) jpeg_start_decompress (j_decompress_ptr cinfo)
{ {
if (cinfo->global_state == DSTATE_READY) { if (cinfo->global_state == DSTATE_READY) {
...@@ -91,7 +91,7 @@ jpeg_start_decompress (j_decompress_ptr cinfo) ...@@ -91,7 +91,7 @@ jpeg_start_decompress (j_decompress_ptr cinfo)
* If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN. * If suspended, returns FALSE and sets global_state = DSTATE_PRESCAN.
*/ */
LOCAL(boolean) LOCAL(int)
output_pass_setup (j_decompress_ptr cinfo) output_pass_setup (j_decompress_ptr cinfo)
{ {
if (cinfo->global_state != DSTATE_PRESCAN) { if (cinfo->global_state != DSTATE_PRESCAN) {
...@@ -224,7 +224,7 @@ jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data, ...@@ -224,7 +224,7 @@ jpeg_read_raw_data (j_decompress_ptr cinfo, JSAMPIMAGE data,
* Initialize for an output pass in buffered-image mode. * Initialize for an output pass in buffered-image mode.
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_start_output (j_decompress_ptr cinfo, int scan_number) jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
{ {
if (cinfo->global_state != DSTATE_BUFIMAGE && if (cinfo->global_state != DSTATE_BUFIMAGE &&
...@@ -249,7 +249,7 @@ jpeg_start_output (j_decompress_ptr cinfo, int scan_number) ...@@ -249,7 +249,7 @@ jpeg_start_output (j_decompress_ptr cinfo, int scan_number)
* a suspending data source is used. * a suspending data source is used.
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_finish_output (j_decompress_ptr cinfo) jpeg_finish_output (j_decompress_ptr cinfo)
{ {
if ((cinfo->global_state == DSTATE_SCANNING || if ((cinfo->global_state == DSTATE_SCANNING ||
......
...@@ -27,7 +27,7 @@ typedef struct { ...@@ -27,7 +27,7 @@ typedef struct {
FILE * infile; /* source stream */ FILE * infile; /* source stream */
JOCTET * buffer; /* start of buffer */ JOCTET * buffer; /* start of buffer */
boolean start_of_file; /* have we gotten any data yet? */ int start_of_file; /* have we gotten any data yet? */
} my_source_mgr; } my_source_mgr;
typedef my_source_mgr * my_src_ptr; typedef my_source_mgr * my_src_ptr;
...@@ -86,7 +86,7 @@ init_source (j_decompress_ptr cinfo) ...@@ -86,7 +86,7 @@ init_source (j_decompress_ptr cinfo)
* the front of the buffer rather than discarding it. * the front of the buffer rather than discarding it.
*/ */
METHODDEF(boolean) METHODDEF(int)
fill_input_buffer (j_decompress_ptr cinfo) fill_input_buffer (j_decompress_ptr cinfo)
{ {
my_src_ptr src = (my_src_ptr) cinfo->src; my_src_ptr src = (my_src_ptr) cinfo->src;
......
...@@ -69,7 +69,7 @@ METHODDEF(int) decompress_data ...@@ -69,7 +69,7 @@ METHODDEF(int) decompress_data
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
#endif #endif
#ifdef BLOCK_SMOOTHING_SUPPORTED #ifdef BLOCK_SMOOTHING_SUPPORTED
LOCAL(boolean) smoothing_ok JPP((j_decompress_ptr cinfo)); LOCAL(int) smoothing_ok JPP((j_decompress_ptr cinfo));
METHODDEF(int) decompress_smooth_data METHODDEF(int) decompress_smooth_data
JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf)); JPP((j_decompress_ptr cinfo, JSAMPIMAGE output_buf));
#endif #endif
...@@ -401,11 +401,11 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) ...@@ -401,11 +401,11 @@ decompress_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
* more accurately than they really are. * more accurately than they really are.
*/ */
LOCAL(boolean) LOCAL(int)
smoothing_ok (j_decompress_ptr cinfo) smoothing_ok (j_decompress_ptr cinfo)
{ {
my_coef_ptr coef = (my_coef_ptr) cinfo->coef; my_coef_ptr coef = (my_coef_ptr) cinfo->coef;
boolean smoothing_useful = FALSE; int smoothing_useful = FALSE;
int ci, coefi; int ci, coefi;
jpeg_component_info *compptr; jpeg_component_info *compptr;
JQUANT_TBL * qtable; JQUANT_TBL * qtable;
...@@ -470,11 +470,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) ...@@ -470,11 +470,11 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
JDIMENSION output_col; JDIMENSION output_col;
jpeg_component_info *compptr; jpeg_component_info *compptr;
inverse_DCT_method_ptr inverse_DCT; inverse_DCT_method_ptr inverse_DCT;
boolean first_row, last_row; int first_row, last_row;
JBLOCK workspace; JBLOCK workspace;
int *coef_bits; int *coef_bits;
JQUANT_TBL *quanttbl; JQUANT_TBL *quanttbl;
INT32 Q00,Q01,Q02,Q10,Q11,Q20, num; long Q00,Q01,Q02,Q10,Q11,Q20, num;
int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9; int DC1,DC2,DC3,DC4,DC5,DC6,DC7,DC8,DC9;
int Al, pred; int Al, pred;
...@@ -673,7 +673,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf) ...@@ -673,7 +673,7 @@ decompress_smooth_data (j_decompress_ptr cinfo, JSAMPIMAGE output_buf)
*/ */
GLOBAL(void) GLOBAL(void)
jinit_d_coef_controller (j_decompress_ptr cinfo, boolean need_full_buffer) jinit_d_coef_controller (j_decompress_ptr cinfo, int need_full_buffer)
{ {
my_coef_ptr coef; my_coef_ptr coef;
......
...@@ -21,8 +21,8 @@ typedef struct { ...@@ -21,8 +21,8 @@ typedef struct {
/* Private state for YCC->RGB conversion */ /* Private state for YCC->RGB conversion */
int * Cr_r_tab; /* => table for Cr to R conversion */ int * Cr_r_tab; /* => table for Cr to R conversion */
int * Cb_b_tab; /* => table for Cb to B conversion */ int * Cb_b_tab; /* => table for Cb to B conversion */
INT32 * Cr_g_tab; /* => table for Cr to G conversion */ long * Cr_g_tab; /* => table for Cr to G conversion */
INT32 * Cb_g_tab; /* => table for Cb to G conversion */ long * Cb_g_tab; /* => table for Cb to G conversion */
} my_color_deconverter; } my_color_deconverter;
typedef my_color_deconverter * my_cconvert_ptr; typedef my_color_deconverter * my_cconvert_ptr;
...@@ -58,8 +58,8 @@ typedef my_color_deconverter * my_cconvert_ptr; ...@@ -58,8 +58,8 @@ typedef my_color_deconverter * my_cconvert_ptr;
*/ */
#define SCALEBITS 16 /* speediest right-shift on some machines */ #define SCALEBITS 16 /* speediest right-shift on some machines */
#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) #define ONE_HALF ((long) 1 << (SCALEBITS-1))
#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5)) #define FIX(x) ((long) ((x) * (1L<<SCALEBITS) + 0.5))
/* /*
...@@ -71,7 +71,7 @@ build_ycc_rgb_table (j_decompress_ptr cinfo) ...@@ -71,7 +71,7 @@ build_ycc_rgb_table (j_decompress_ptr cinfo)
{ {
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert; my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
int i; int i;
INT32 x; long x;
SHIFT_TEMPS SHIFT_TEMPS
cconvert->Cr_r_tab = (int *) cconvert->Cr_r_tab = (int *)
...@@ -80,12 +80,12 @@ build_ycc_rgb_table (j_decompress_ptr cinfo) ...@@ -80,12 +80,12 @@ build_ycc_rgb_table (j_decompress_ptr cinfo)
cconvert->Cb_b_tab = (int *) cconvert->Cb_b_tab = (int *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(int)); (MAXJSAMPLE+1) * SIZEOF(int));
cconvert->Cr_g_tab = (INT32 *) cconvert->Cr_g_tab = (long *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(INT32)); (MAXJSAMPLE+1) * SIZEOF(long));
cconvert->Cb_g_tab = (INT32 *) cconvert->Cb_g_tab = (long *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(INT32)); (MAXJSAMPLE+1) * SIZEOF(long));
for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
/* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
...@@ -131,8 +131,8 @@ ycc_rgb_convert (j_decompress_ptr cinfo, ...@@ -131,8 +131,8 @@ ycc_rgb_convert (j_decompress_ptr cinfo,
register JSAMPLE * range_limit = cinfo->sample_range_limit; register JSAMPLE * range_limit = cinfo->sample_range_limit;
register int * Crrtab = cconvert->Cr_r_tab; register int * Crrtab = cconvert->Cr_r_tab;
register int * Cbbtab = cconvert->Cb_b_tab; register int * Cbbtab = cconvert->Cb_b_tab;
register INT32 * Crgtab = cconvert->Cr_g_tab; register long * Crgtab = cconvert->Cr_g_tab;
register INT32 * Cbgtab = cconvert->Cb_g_tab; register long * Cbgtab = cconvert->Cb_g_tab;
SHIFT_TEMPS SHIFT_TEMPS
while (--num_rows >= 0) { while (--num_rows >= 0) {
...@@ -256,8 +256,8 @@ ycck_cmyk_convert (j_decompress_ptr cinfo, ...@@ -256,8 +256,8 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
register JSAMPLE * range_limit = cinfo->sample_range_limit; register JSAMPLE * range_limit = cinfo->sample_range_limit;
register int * Crrtab = cconvert->Cr_r_tab; register int * Crrtab = cconvert->Cr_r_tab;
register int * Cbbtab = cconvert->Cb_b_tab; register int * Cbbtab = cconvert->Cb_b_tab;
register INT32 * Crgtab = cconvert->Cr_g_tab; register long * Crgtab = cconvert->Cr_g_tab;
register INT32 * Cbgtab = cconvert->Cb_g_tab; register long * Cbgtab = cconvert->Cb_g_tab;
SHIFT_TEMPS SHIFT_TEMPS
while (--num_rows >= 0) { while (--num_rows >= 0) {
......
...@@ -16,7 +16,7 @@ ...@@ -16,7 +16,7 @@
/* /*
* A forward DCT routine is given a pointer to a work area of type DCTELEM[]; * A forward DCT routine is given a pointer to a work area of type DCTELEM[];
* the DCT is to be performed in-place in that buffer. Type DCTELEM is int * the DCT is to be performed in-place in that buffer. Type DCTELEM is int
* for 8-bit samples, INT32 for 12-bit samples. (NOTE: Floating-point DCT * for 8-bit samples, long for 12-bit samples. (NOTE: Floating-point DCT
* implementations use an array of type FAST_FLOAT, instead.) * implementations use an array of type FAST_FLOAT, instead.)
* The DCT inputs are expected to be signed (range +-CENTERJSAMPLE). * The DCT inputs are expected to be signed (range +-CENTERJSAMPLE).
* The DCT outputs are returned scaled up by a factor of 8; they therefore * The DCT outputs are returned scaled up by a factor of 8; they therefore
...@@ -29,7 +29,7 @@ ...@@ -29,7 +29,7 @@
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
typedef int DCTELEM; /* 16 or 32 bits is fine */ typedef int DCTELEM; /* 16 or 32 bits is fine */
#else #else
typedef INT32 DCTELEM; /* must have 32 bits */ typedef long DCTELEM; /* must have 32 bits */
#endif #endif
typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data)); typedef JMETHOD(void, forward_DCT_method_ptr, (DCTELEM * data));
...@@ -58,7 +58,7 @@ typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */ ...@@ -58,7 +58,7 @@ typedef MULTIPLIER ISLOW_MULT_TYPE; /* short or int, whichever is faster */
typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */ typedef MULTIPLIER IFAST_MULT_TYPE; /* 16 bits is OK, use short if faster */
#define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */ #define IFAST_SCALE_BITS 2 /* fractional bits in scale factors */
#else #else
typedef INT32 IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */ typedef long IFAST_MULT_TYPE; /* need 32 bits for scaled quantizers */
#define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */ #define IFAST_SCALE_BITS 13 /* fractional bits in scale factors */
#endif #endif
typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */ typedef FAST_FLOAT FLOAT_MULT_TYPE; /* preferred floating type */
...@@ -122,13 +122,13 @@ EXTERN(void) jpeg_idct_1x1 ...@@ -122,13 +122,13 @@ EXTERN(void) jpeg_idct_1x1
* Macros for handling fixed-point arithmetic; these are used by many * Macros for handling fixed-point arithmetic; these are used by many
* but not all of the DCT/IDCT modules. * but not all of the DCT/IDCT modules.
* *
* All values are expected to be of type INT32. * All values are expected to be of type long.
* Fractional constants are scaled left by CONST_BITS bits. * Fractional constants are scaled left by CONST_BITS bits.
* CONST_BITS is defined within each module using these macros, * CONST_BITS is defined within each module using these macros,
* and may differ from one module to the next. * and may differ from one module to the next.
*/ */
#define ONE ((INT32) 1) #define ONE ((long) 1)
#define CONST_SCALE (ONE << CONST_BITS) #define CONST_SCALE (ONE << CONST_BITS)
/* Convert a positive real constant to an integer scaled by CONST_SCALE. /* Convert a positive real constant to an integer scaled by CONST_SCALE.
...@@ -136,16 +136,16 @@ EXTERN(void) jpeg_idct_1x1 ...@@ -136,16 +136,16 @@ EXTERN(void) jpeg_idct_1x1
* thus causing a lot of useless floating-point operations at run time. * thus causing a lot of useless floating-point operations at run time.
*/ */
#define FIX(x) ((INT32) ((x) * CONST_SCALE + 0.5)) #define FIX(x) ((long) ((x) * CONST_SCALE + 0.5))
/* Descale and correctly round an INT32 value that's scaled by N bits. /* Descale and correctly round an long value that's scaled by N bits.
* We assume RIGHT_SHIFT rounds towards minus infinity, so adding * We assume RIGHT_SHIFT rounds towards minus infinity, so adding
* the fudge factor is correct for either sign of X. * the fudge factor is correct for either sign of X.
*/ */
#define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n) #define DESCALE(x,n) RIGHT_SHIFT((x) + (ONE << ((n)-1)), n)
/* Multiply an INT32 variable by an INT32 constant to yield an INT32 result. /* Multiply an long variable by an long constant to yield an long result.
* This macro is used only when the two inputs will actually be no more than * This macro is used only when the two inputs will actually be no more than
* 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a * 16 bits wide, so that a 16x16->32 bit multiply can be used instead of a
* full 32x32 multiply. This provides a useful speedup on many machines. * full 32x32 multiply. This provides a useful speedup on many machines.
...@@ -155,10 +155,10 @@ EXTERN(void) jpeg_idct_1x1 ...@@ -155,10 +155,10 @@ EXTERN(void) jpeg_idct_1x1
*/ */
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT16) (const))) #define MULTIPLY16C16(var,const) (((short) (var)) * ((short) (const)))
#endif #endif
#ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */ #ifdef SHORTxLCONST_32 /* known to work with Microsoft C 6.0 */
#define MULTIPLY16C16(var,const) (((INT16) (var)) * ((INT32) (const))) #define MULTIPLY16C16(var,const) (((short) (var)) * ((long) (const)))
#endif #endif
#ifndef MULTIPLY16C16 /* default definition */ #ifndef MULTIPLY16C16 /* default definition */
...@@ -168,7 +168,7 @@ EXTERN(void) jpeg_idct_1x1 ...@@ -168,7 +168,7 @@ EXTERN(void) jpeg_idct_1x1
/* Same except both inputs are variables. */ /* Same except both inputs are variables. */
#ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */ #ifdef SHORTxSHORT_32 /* may work if 'int' is 32 bits */
#define MULTIPLY16V16(var1,var2) (((INT16) (var1)) * ((INT16) (var2))) #define MULTIPLY16V16(var1,var2) (((short) (var1)) * ((short) (var2)))
#endif #endif
#ifndef MULTIPLY16V16 /* default definition */ #ifndef MULTIPLY16V16 /* default definition */
......
...@@ -182,7 +182,7 @@ start_pass (j_decompress_ptr cinfo) ...@@ -182,7 +182,7 @@ start_pass (j_decompress_ptr cinfo)
*/ */
IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table; IFAST_MULT_TYPE * ifmtbl = (IFAST_MULT_TYPE *) compptr->dct_table;
#define CONST_BITS 14 #define CONST_BITS 14
static const INT16 aanscales[DCTSIZE2] = { static const short aanscales[DCTSIZE2] = {
/* precomputed values scaled up by 14 bits */ /* precomputed values scaled up by 14 bits */
16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520, 16384, 22725, 21407, 19266, 16384, 12873, 8867, 4520,
22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270, 22725, 31521, 29692, 26722, 22725, 17855, 12299, 6270,
...@@ -197,8 +197,8 @@ start_pass (j_decompress_ptr cinfo) ...@@ -197,8 +197,8 @@ start_pass (j_decompress_ptr cinfo)
for (i = 0; i < DCTSIZE2; i++) { for (i = 0; i < DCTSIZE2; i++) {
ifmtbl[i] = (IFAST_MULT_TYPE) ifmtbl[i] = (IFAST_MULT_TYPE)
DESCALE(MULTIPLY16V16((INT32) qtbl->quantval[i], DESCALE(MULTIPLY16V16((long) qtbl->quantval[i],
(INT32) aanscales[i]), (long) aanscales[i]),
CONST_BITS-IFAST_SCALE_BITS); CONST_BITS-IFAST_SCALE_BITS);
} }
} }
......
...@@ -71,8 +71,8 @@ typedef struct { ...@@ -71,8 +71,8 @@ typedef struct {
d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU]; d_derived_tbl * dc_cur_tbls[D_MAX_BLOCKS_IN_MCU];
d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU]; d_derived_tbl * ac_cur_tbls[D_MAX_BLOCKS_IN_MCU];
/* Whether we care about the DC and AC coefficient values for each block */ /* Whether we care about the DC and AC coefficient values for each block */
boolean dc_needed[D_MAX_BLOCKS_IN_MCU]; int dc_needed[D_MAX_BLOCKS_IN_MCU];
boolean ac_needed[D_MAX_BLOCKS_IN_MCU]; int ac_needed[D_MAX_BLOCKS_IN_MCU];
} huff_entropy_decoder; } huff_entropy_decoder;
typedef huff_entropy_decoder * huff_entropy_ptr; typedef huff_entropy_decoder * huff_entropy_ptr;
...@@ -146,7 +146,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo) ...@@ -146,7 +146,7 @@ start_pass_huff_decoder (j_decompress_ptr cinfo)
*/ */
GLOBAL(void) GLOBAL(void)
jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, int isDC, int tblno,
d_derived_tbl ** pdtbl) d_derived_tbl ** pdtbl)
{ {
JHUFF_TBL *htbl; JHUFF_TBL *htbl;
...@@ -204,7 +204,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, ...@@ -204,7 +204,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
/* code is now 1 more than the last code used for codelength si; but /* code is now 1 more than the last code used for codelength si; but
* it must still fit in si bits, since no code is allowed to be all ones. * it must still fit in si bits, since no code is allowed to be all ones.
*/ */
if (((INT32) code) >= (((INT32) 1) << si)) if (((long) code) >= (((long) 1) << si))
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
code <<= 1; code <<= 1;
si++; si++;
...@@ -218,7 +218,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, ...@@ -218,7 +218,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
/* valoffset[l] = huffval[] index of 1st symbol of code length l, /* valoffset[l] = huffval[] index of 1st symbol of code length l,
* minus the minimum code of length l * minus the minimum code of length l
*/ */
dtbl->valoffset[l] = (INT32) p - (INT32) huffcode[p]; dtbl->valoffset[l] = (long) p - (long) huffcode[p];
p += htbl->bits[l]; p += htbl->bits[l];
dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */ dtbl->maxcode[l] = huffcode[p-1]; /* maximum code of length l */
} else { } else {
...@@ -288,7 +288,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno, ...@@ -288,7 +288,7 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, boolean isDC, int tblno,
#endif #endif
GLOBAL(boolean) GLOBAL(int)
jpeg_fill_bit_buffer (bitread_working_state * state, jpeg_fill_bit_buffer (bitread_working_state * state,
register bit_buf_type get_buffer, register int bits_left, register bit_buf_type get_buffer, register int bits_left,
int nbits) int nbits)
...@@ -400,7 +400,7 @@ jpeg_huff_decode (bitread_working_state * state, ...@@ -400,7 +400,7 @@ jpeg_huff_decode (bitread_working_state * state,
d_derived_tbl * htbl, int min_bits) d_derived_tbl * htbl, int min_bits)
{ {
register int l = min_bits; register int l = min_bits;
register INT32 code; register long code;
/* HUFF_DECODE has determined that the code is at least min_bits */ /* HUFF_DECODE has determined that the code is at least min_bits */
/* bits long, so fetch that many bits in one swoop. */ /* bits long, so fetch that many bits in one swoop. */
...@@ -464,7 +464,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ ...@@ -464,7 +464,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
* Returns FALSE if must suspend. * Returns FALSE if must suspend.
*/ */
LOCAL(boolean) LOCAL(int)
process_restart (j_decompress_ptr cinfo) process_restart (j_decompress_ptr cinfo)
{ {
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
...@@ -513,7 +513,7 @@ process_restart (j_decompress_ptr cinfo) ...@@ -513,7 +513,7 @@ process_restart (j_decompress_ptr cinfo)
* this module, since we'll just re-assign them on the next call.) * this module, since we'll just re-assign them on the next call.)
*/ */
METHODDEF(boolean) METHODDEF(int)
decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) decode_mcu (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy; huff_entropy_ptr entropy = (huff_entropy_ptr) cinfo->entropy;
......
...@@ -25,9 +25,9 @@ ...@@ -25,9 +25,9 @@
typedef struct { typedef struct {
/* Basic tables: (element [0] of each array is unused) */ /* Basic tables: (element [0] of each array is unused) */
INT32 maxcode[18]; /* largest code of length k (-1 if none) */ long maxcode[18]; /* largest code of length k (-1 if none) */
/* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */ /* (maxcode[17] is a sentinel to ensure jpeg_huff_decode terminates) */
INT32 valoffset[17]; /* huffval[] offset for codes of length k */ long valoffset[17]; /* huffval[] offset for codes of length k */
/* valoffset[k] = huffval[] index of 1st symbol of code length k, less /* valoffset[k] = huffval[] index of 1st symbol of code length k, less
* the smallest code of length k; so given a code of length k, the * the smallest code of length k; so given a code of length k, the
* corresponding symbol is huffval[code + valoffset[k]] * corresponding symbol is huffval[code + valoffset[k]]
...@@ -42,12 +42,12 @@ typedef struct { ...@@ -42,12 +42,12 @@ typedef struct {
* the corresponding symbol directly from these tables. * the corresponding symbol directly from these tables.
*/ */
int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */ int look_nbits[1<<HUFF_LOOKAHEAD]; /* # bits, or 0 if too long */
UINT8 look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */ unsigned char look_sym[1<<HUFF_LOOKAHEAD]; /* symbol, or unused */
} d_derived_tbl; } d_derived_tbl;
/* Expand a Huffman table definition into the derived format */ /* Expand a Huffman table definition into the derived format */
EXTERN(void) jpeg_make_d_derived_tbl EXTERN(void) jpeg_make_d_derived_tbl
JPP((j_decompress_ptr cinfo, boolean isDC, int tblno, JPP((j_decompress_ptr cinfo, int isDC, int tblno,
d_derived_tbl ** pdtbl)); d_derived_tbl ** pdtbl));
...@@ -69,7 +69,7 @@ EXTERN(void) jpeg_make_d_derived_tbl ...@@ -69,7 +69,7 @@ EXTERN(void) jpeg_make_d_derived_tbl
* necessary. * necessary.
*/ */
typedef INT32 bit_buf_type; /* type of bit-extraction buffer */ typedef long bit_buf_type; /* type of bit-extraction buffer */
#define BIT_BUF_SIZE 32 /* size of buffer in bits */ #define BIT_BUF_SIZE 32 /* size of buffer in bits */
/* If long is > 32 bits on your machine, and shifting/masking longs is /* If long is > 32 bits on your machine, and shifting/masking longs is
...@@ -151,7 +151,7 @@ typedef struct { /* Bitreading working state within an MCU */ ...@@ -151,7 +151,7 @@ typedef struct { /* Bitreading working state within an MCU */
(bits_left -= (nbits)) (bits_left -= (nbits))
/* Load up the bit buffer to a depth of at least nbits */ /* Load up the bit buffer to a depth of at least nbits */
EXTERN(boolean) jpeg_fill_bit_buffer EXTERN(int) jpeg_fill_bit_buffer
JPP((bitread_working_state * state, register bit_buf_type get_buffer, JPP((bitread_working_state * state, register bit_buf_type get_buffer,
register int bits_left, int nbits)); register int bits_left, int nbits));
......
...@@ -21,7 +21,7 @@ ...@@ -21,7 +21,7 @@
typedef struct { typedef struct {
struct jpeg_input_controller pub; /* public fields */ struct jpeg_input_controller pub; /* public fields */
boolean inheaders; /* TRUE until first SOS is reached */ int inheaders; /* TRUE until first SOS is reached */
} my_input_controller; } my_input_controller;
typedef my_input_controller * my_inputctl_ptr; typedef my_input_controller * my_inputctl_ptr;
......
...@@ -117,7 +117,7 @@ typedef struct { ...@@ -117,7 +117,7 @@ typedef struct {
/* Pointer to allocated workspace (M or M+2 row groups). */ /* Pointer to allocated workspace (M or M+2 row groups). */
JSAMPARRAY buffer[MAX_COMPONENTS]; JSAMPARRAY buffer[MAX_COMPONENTS];
boolean buffer_full; /* Have we gotten an iMCU row from decoder? */ int buffer_full; /* Have we gotten an iMCU row from decoder? */
JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */ JDIMENSION rowgroup_ctr; /* counts row groups output to postprocessor */
/* Remaining fields are only used in the context case. */ /* Remaining fields are only used in the context case. */
...@@ -473,7 +473,7 @@ process_data_crank_post (j_decompress_ptr cinfo, ...@@ -473,7 +473,7 @@ process_data_crank_post (j_decompress_ptr cinfo,
*/ */
GLOBAL(void) GLOBAL(void)
jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) jinit_d_main_controller (j_decompress_ptr cinfo, int need_full_buffer)
{ {
my_main_ptr main; my_main_ptr main;
int ci, rgroup, ngroups; int ci, rgroup, ngroups;
......
...@@ -151,7 +151,7 @@ typedef my_marker_reader * my_marker_ptr; ...@@ -151,7 +151,7 @@ typedef my_marker_reader * my_marker_ptr;
V = GETJOCTET(*next_input_byte++); ) V = GETJOCTET(*next_input_byte++); )
/* As above, but read two bytes interpreted as an unsigned 16-bit integer. /* As above, but read two bytes interpreted as an unsigned 16-bit integer.
* V should be declared unsigned int or perhaps INT32. * V should be declared unsigned int or perhaps long.
*/ */
#define INPUT_2BYTES(cinfo,V,action) \ #define INPUT_2BYTES(cinfo,V,action) \
MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \ MAKESTMT( MAKE_BYTE_AVAIL(cinfo,action); \
...@@ -193,7 +193,7 @@ typedef my_marker_reader * my_marker_ptr; ...@@ -193,7 +193,7 @@ typedef my_marker_reader * my_marker_ptr;
*/ */
LOCAL(boolean) LOCAL(int)
get_soi (j_decompress_ptr cinfo) get_soi (j_decompress_ptr cinfo)
/* Process an SOI marker */ /* Process an SOI marker */
{ {
...@@ -233,11 +233,11 @@ get_soi (j_decompress_ptr cinfo) ...@@ -233,11 +233,11 @@ get_soi (j_decompress_ptr cinfo)
} }
LOCAL(boolean) LOCAL(int)
get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) get_sof (j_decompress_ptr cinfo, int is_prog, int is_arith)
/* Process a SOFn marker */ /* Process a SOFn marker */
{ {
INT32 length; long length;
int c, ci; int c, ci;
jpeg_component_info * compptr; jpeg_component_info * compptr;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -297,11 +297,11 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith) ...@@ -297,11 +297,11 @@ get_sof (j_decompress_ptr cinfo, boolean is_prog, boolean is_arith)
} }
LOCAL(boolean) LOCAL(int)
get_sos (j_decompress_ptr cinfo) get_sos (j_decompress_ptr cinfo)
/* Process a SOS marker */ /* Process a SOS marker */
{ {
INT32 length; long length;
int i, ci, n, c, cc; int i, ci, n, c, cc;
jpeg_component_info * compptr; jpeg_component_info * compptr;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -369,11 +369,11 @@ get_sos (j_decompress_ptr cinfo) ...@@ -369,11 +369,11 @@ get_sos (j_decompress_ptr cinfo)
#ifdef D_ARITH_CODING_SUPPORTED #ifdef D_ARITH_CODING_SUPPORTED
LOCAL(boolean) LOCAL(int)
get_dac (j_decompress_ptr cinfo) get_dac (j_decompress_ptr cinfo)
/* Process a DAC marker */ /* Process a DAC marker */
{ {
INT32 length; long length;
int index, val; int index, val;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -392,10 +392,10 @@ get_dac (j_decompress_ptr cinfo) ...@@ -392,10 +392,10 @@ get_dac (j_decompress_ptr cinfo)
ERREXIT1(cinfo, JERR_DAC_INDEX, index); ERREXIT1(cinfo, JERR_DAC_INDEX, index);
if (index >= NUM_ARITH_TBLS) { /* define AC table */ if (index >= NUM_ARITH_TBLS) { /* define AC table */
cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (UINT8) val; cinfo->arith_ac_K[index-NUM_ARITH_TBLS] = (unsigned char) val;
} else { /* define DC table */ } else { /* define DC table */
cinfo->arith_dc_L[index] = (UINT8) (val & 0x0F); cinfo->arith_dc_L[index] = (unsigned char) (val & 0x0F);
cinfo->arith_dc_U[index] = (UINT8) (val >> 4); cinfo->arith_dc_U[index] = (unsigned char) (val >> 4);
if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index]) if (cinfo->arith_dc_L[index] > cinfo->arith_dc_U[index])
ERREXIT1(cinfo, JERR_DAC_VALUE, val); ERREXIT1(cinfo, JERR_DAC_VALUE, val);
} }
...@@ -415,13 +415,13 @@ get_dac (j_decompress_ptr cinfo) ...@@ -415,13 +415,13 @@ get_dac (j_decompress_ptr cinfo)
#endif /* D_ARITH_CODING_SUPPORTED */ #endif /* D_ARITH_CODING_SUPPORTED */
LOCAL(boolean) LOCAL(int)
get_dht (j_decompress_ptr cinfo) get_dht (j_decompress_ptr cinfo)
/* Process a DHT marker */ /* Process a DHT marker */
{ {
INT32 length; long length;
UINT8 bits[17]; unsigned char bits[17];
UINT8 huffval[256]; unsigned char huffval[256];
int i, index, count; int i, index, count;
JHUFF_TBL **htblptr; JHUFF_TBL **htblptr;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -453,7 +453,7 @@ get_dht (j_decompress_ptr cinfo) ...@@ -453,7 +453,7 @@ get_dht (j_decompress_ptr cinfo)
/* Here we just do minimal validation of the counts to avoid walking /* Here we just do minimal validation of the counts to avoid walking
* off the end of our table space. jdhuff.c will check more carefully. * off the end of our table space. jdhuff.c will check more carefully.
*/ */
if (count > 256 || ((INT32) count) > length) if (count > 256 || ((long) count) > length)
ERREXIT(cinfo, JERR_BAD_HUFF_TABLE); ERREXIT(cinfo, JERR_BAD_HUFF_TABLE);
for (i = 0; i < count; i++) for (i = 0; i < count; i++)
...@@ -486,11 +486,11 @@ get_dht (j_decompress_ptr cinfo) ...@@ -486,11 +486,11 @@ get_dht (j_decompress_ptr cinfo)
} }
LOCAL(boolean) LOCAL(int)
get_dqt (j_decompress_ptr cinfo) get_dqt (j_decompress_ptr cinfo)
/* Process a DQT marker */ /* Process a DQT marker */
{ {
INT32 length; long length;
int n, i, prec; int n, i, prec;
unsigned int tmp; unsigned int tmp;
JQUANT_TBL *quant_ptr; JQUANT_TBL *quant_ptr;
...@@ -519,7 +519,7 @@ get_dqt (j_decompress_ptr cinfo) ...@@ -519,7 +519,7 @@ get_dqt (j_decompress_ptr cinfo)
else else
INPUT_BYTE(cinfo, tmp, return FALSE); INPUT_BYTE(cinfo, tmp, return FALSE);
/* We convert the zigzag-order table to natural array order. */ /* We convert the zigzag-order table to natural array order. */
quant_ptr->quantval[jpeg_natural_order[i]] = (UINT16) tmp; quant_ptr->quantval[jpeg_natural_order[i]] = (unsigned short) tmp;
} }
if (cinfo->err->trace_level >= 2) { if (cinfo->err->trace_level >= 2) {
...@@ -544,11 +544,11 @@ get_dqt (j_decompress_ptr cinfo) ...@@ -544,11 +544,11 @@ get_dqt (j_decompress_ptr cinfo)
} }
LOCAL(boolean) LOCAL(int)
get_dri (j_decompress_ptr cinfo) get_dri (j_decompress_ptr cinfo)
/* Process a DRI marker */ /* Process a DRI marker */
{ {
INT32 length; long length;
unsigned int tmp; unsigned int tmp;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -582,13 +582,13 @@ get_dri (j_decompress_ptr cinfo) ...@@ -582,13 +582,13 @@ get_dri (j_decompress_ptr cinfo)
LOCAL(void) LOCAL(void)
examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
unsigned int datalen, INT32 remaining) unsigned int datalen, long remaining)
/* Examine first few bytes from an APP0. /* Examine first few bytes from an APP0.
* Take appropriate action if it is a JFIF marker. * Take appropriate action if it is a JFIF marker.
* datalen is # of bytes at data[], remaining is length of rest of marker data. * datalen is # of bytes at data[], remaining is length of rest of marker data.
*/ */
{ {
INT32 totallen = (INT32) datalen + remaining; long totallen = (long) datalen + remaining;
if (datalen >= APP0_DATA_LEN && if (datalen >= APP0_DATA_LEN &&
GETJOCTET(data[0]) == 0x4A && GETJOCTET(data[0]) == 0x4A &&
...@@ -622,7 +622,7 @@ examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, ...@@ -622,7 +622,7 @@ examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
GETJOCTET(data[12]), GETJOCTET(data[13])); GETJOCTET(data[12]), GETJOCTET(data[13]));
totallen -= APP0_DATA_LEN; totallen -= APP0_DATA_LEN;
if (totallen != if (totallen !=
((INT32)GETJOCTET(data[12]) * (INT32)GETJOCTET(data[13]) * (INT32) 3)) ((long)GETJOCTET(data[12]) * (long)GETJOCTET(data[13]) * (long) 3))
TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen); TRACEMS1(cinfo, 1, JTRC_JFIF_BADTHUMBNAILSIZE, (int) totallen);
} else if (datalen >= 6 && } else if (datalen >= 6 &&
GETJOCTET(data[0]) == 0x4A && GETJOCTET(data[0]) == 0x4A &&
...@@ -658,7 +658,7 @@ examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data, ...@@ -658,7 +658,7 @@ examine_app0 (j_decompress_ptr cinfo, JOCTET FAR * data,
LOCAL(void) LOCAL(void)
examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
unsigned int datalen, INT32 remaining) unsigned int datalen, long remaining)
/* Examine first few bytes from an APP14. /* Examine first few bytes from an APP14.
* Take appropriate action if it is an Adobe marker. * Take appropriate action if it is an Adobe marker.
* datalen is # of bytes at data[], remaining is length of rest of marker data. * datalen is # of bytes at data[], remaining is length of rest of marker data.
...@@ -679,7 +679,7 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, ...@@ -679,7 +679,7 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
transform = GETJOCTET(data[11]); transform = GETJOCTET(data[11]);
TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform); TRACEMS4(cinfo, 1, JTRC_ADOBE, version, flags0, flags1, transform);
cinfo->saw_Adobe_marker = TRUE; cinfo->saw_Adobe_marker = TRUE;
cinfo->Adobe_transform = (UINT8) transform; cinfo->Adobe_transform = (unsigned char) transform;
} else { } else {
/* Start of APP14 does not match "Adobe", or too short */ /* Start of APP14 does not match "Adobe", or too short */
TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining)); TRACEMS1(cinfo, 1, JTRC_APP14, (int) (datalen + remaining));
...@@ -687,11 +687,11 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data, ...@@ -687,11 +687,11 @@ examine_app14 (j_decompress_ptr cinfo, JOCTET FAR * data,
} }
METHODDEF(boolean) METHODDEF(int)
get_interesting_appn (j_decompress_ptr cinfo) get_interesting_appn (j_decompress_ptr cinfo)
/* Process an APP0 or APP14 marker without saving it */ /* Process an APP0 or APP14 marker without saving it */
{ {
INT32 length; long length;
JOCTET b[APPN_DATA_LEN]; JOCTET b[APPN_DATA_LEN];
unsigned int i, numtoread; unsigned int i, numtoread;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
...@@ -735,7 +735,7 @@ get_interesting_appn (j_decompress_ptr cinfo) ...@@ -735,7 +735,7 @@ get_interesting_appn (j_decompress_ptr cinfo)
#ifdef SAVE_MARKERS_SUPPORTED #ifdef SAVE_MARKERS_SUPPORTED
METHODDEF(boolean) METHODDEF(int)
save_marker (j_decompress_ptr cinfo) save_marker (j_decompress_ptr cinfo)
/* Save an APPn or COM marker into the marker list */ /* Save an APPn or COM marker into the marker list */
{ {
...@@ -743,7 +743,7 @@ save_marker (j_decompress_ptr cinfo) ...@@ -743,7 +743,7 @@ save_marker (j_decompress_ptr cinfo)
jpeg_saved_marker_ptr cur_marker = marker->cur_marker; jpeg_saved_marker_ptr cur_marker = marker->cur_marker;
unsigned int bytes_read, data_length; unsigned int bytes_read, data_length;
JOCTET FAR * data; JOCTET FAR * data;
INT32 length = 0; long length = 0;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
if (cur_marker == NULL) { if (cur_marker == NULL) {
...@@ -764,7 +764,7 @@ save_marker (j_decompress_ptr cinfo) ...@@ -764,7 +764,7 @@ save_marker (j_decompress_ptr cinfo)
(*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_large) ((j_common_ptr) cinfo, JPOOL_IMAGE,
SIZEOF(struct jpeg_marker_struct) + limit); SIZEOF(struct jpeg_marker_struct) + limit);
cur_marker->next = NULL; cur_marker->next = NULL;
cur_marker->marker = (UINT8) cinfo->unread_marker; cur_marker->marker = (unsigned char) cinfo->unread_marker;
cur_marker->original_length = (unsigned int) length; cur_marker->original_length = (unsigned int) length;
cur_marker->data_length = limit; cur_marker->data_length = limit;
/* data area is just beyond the jpeg_marker_struct */ /* data area is just beyond the jpeg_marker_struct */
...@@ -841,11 +841,11 @@ save_marker (j_decompress_ptr cinfo) ...@@ -841,11 +841,11 @@ save_marker (j_decompress_ptr cinfo)
#endif /* SAVE_MARKERS_SUPPORTED */ #endif /* SAVE_MARKERS_SUPPORTED */
METHODDEF(boolean) METHODDEF(int)
skip_variable (j_decompress_ptr cinfo) skip_variable (j_decompress_ptr cinfo)
/* Skip over an unknown or uninteresting variable-length marker */ /* Skip over an unknown or uninteresting variable-length marker */
{ {
INT32 length; long length;
INPUT_VARS(cinfo); INPUT_VARS(cinfo);
INPUT_2BYTES(cinfo, length, return FALSE); INPUT_2BYTES(cinfo, length, return FALSE);
...@@ -870,7 +870,7 @@ skip_variable (j_decompress_ptr cinfo) ...@@ -870,7 +870,7 @@ skip_variable (j_decompress_ptr cinfo)
* but it will never be 0 or FF. * but it will never be 0 or FF.
*/ */
LOCAL(boolean) LOCAL(int)
next_marker (j_decompress_ptr cinfo) next_marker (j_decompress_ptr cinfo)
{ {
int c; int c;
...@@ -917,7 +917,7 @@ next_marker (j_decompress_ptr cinfo) ...@@ -917,7 +917,7 @@ next_marker (j_decompress_ptr cinfo)
} }
LOCAL(boolean) LOCAL(int)
first_marker (j_decompress_ptr cinfo) first_marker (j_decompress_ptr cinfo)
/* Like next_marker, but used to obtain the initial SOI marker. */ /* Like next_marker, but used to obtain the initial SOI marker. */
/* For this marker, we do not allow preceding garbage or fill; otherwise, /* For this marker, we do not allow preceding garbage or fill; otherwise,
...@@ -1109,7 +1109,7 @@ read_markers (j_decompress_ptr cinfo) ...@@ -1109,7 +1109,7 @@ read_markers (j_decompress_ptr cinfo)
* it holds a marker which the decoder will be unable to read past. * it holds a marker which the decoder will be unable to read past.
*/ */
METHODDEF(boolean) METHODDEF(int)
read_restart_marker (j_decompress_ptr cinfo) read_restart_marker (j_decompress_ptr cinfo)
{ {
/* Obtain a marker unless we already did. */ /* Obtain a marker unless we already did. */
...@@ -1188,7 +1188,7 @@ read_restart_marker (j_decompress_ptr cinfo) ...@@ -1188,7 +1188,7 @@ read_restart_marker (j_decompress_ptr cinfo)
* any other marker would have to be bogus data in that case. * any other marker would have to be bogus data in that case.
*/ */
GLOBAL(boolean) GLOBAL(int)
jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired) jpeg_resync_to_restart (j_decompress_ptr cinfo, int desired)
{ {
int marker = cinfo->unread_marker; int marker = cinfo->unread_marker;
......
...@@ -23,7 +23,7 @@ typedef struct { ...@@ -23,7 +23,7 @@ typedef struct {
int pass_number; /* # of passes completed */ int pass_number; /* # of passes completed */
boolean using_merged_upsample; /* TRUE if using merged upsample/cconvert */ int using_merged_upsample; /* TRUE if using merged upsample/cconvert */
/* Saved references to initialized quantizer modules, /* Saved references to initialized quantizer modules,
* in case we need to switch modes. * in case we need to switch modes.
...@@ -40,7 +40,7 @@ typedef my_decomp_master * my_master_ptr; ...@@ -40,7 +40,7 @@ typedef my_decomp_master * my_master_ptr;
* CRUCIAL: this must match the actual capabilities of jdmerge.c! * CRUCIAL: this must match the actual capabilities of jdmerge.c!
*/ */
LOCAL(boolean) LOCAL(int)
use_merged_upsample (j_decompress_ptr cinfo) use_merged_upsample (j_decompress_ptr cinfo)
{ {
#ifdef UPSAMPLE_MERGING_SUPPORTED #ifdef UPSAMPLE_MERGING_SUPPORTED
...@@ -288,7 +288,7 @@ LOCAL(void) ...@@ -288,7 +288,7 @@ LOCAL(void)
master_selection (j_decompress_ptr cinfo) master_selection (j_decompress_ptr cinfo)
{ {
my_master_ptr master = (my_master_ptr) cinfo->master; my_master_ptr master = (my_master_ptr) cinfo->master;
boolean use_c_buffer; int use_c_buffer;
long samplesperrow; long samplesperrow;
JDIMENSION jd_samplesperrow; JDIMENSION jd_samplesperrow;
......
...@@ -52,8 +52,8 @@ typedef struct { ...@@ -52,8 +52,8 @@ typedef struct {
/* Private state for YCC->RGB conversion */ /* Private state for YCC->RGB conversion */
int * Cr_r_tab; /* => table for Cr to R conversion */ int * Cr_r_tab; /* => table for Cr to R conversion */
int * Cb_b_tab; /* => table for Cb to B conversion */ int * Cb_b_tab; /* => table for Cb to B conversion */
INT32 * Cr_g_tab; /* => table for Cr to G conversion */ long * Cr_g_tab; /* => table for Cr to G conversion */
INT32 * Cb_g_tab; /* => table for Cb to G conversion */ long * Cb_g_tab; /* => table for Cb to G conversion */
/* For 2:1 vertical sampling, we produce two output rows at a time. /* For 2:1 vertical sampling, we produce two output rows at a time.
* We need a "spare" row buffer to hold the second output row if the * We need a "spare" row buffer to hold the second output row if the
...@@ -61,7 +61,7 @@ typedef struct { ...@@ -61,7 +61,7 @@ typedef struct {
* to discard the dummy last row if the image height is odd. * to discard the dummy last row if the image height is odd.
*/ */
JSAMPROW spare_row; JSAMPROW spare_row;
boolean spare_full; /* T if spare buffer is occupied */ int spare_full; /* T if spare buffer is occupied */
JDIMENSION out_row_width; /* samples per output row */ JDIMENSION out_row_width; /* samples per output row */
JDIMENSION rows_to_go; /* counts rows remaining in image */ JDIMENSION rows_to_go; /* counts rows remaining in image */
...@@ -70,8 +70,8 @@ typedef struct { ...@@ -70,8 +70,8 @@ typedef struct {
typedef my_upsampler * my_upsample_ptr; typedef my_upsampler * my_upsample_ptr;
#define SCALEBITS 16 /* speediest right-shift on some machines */ #define SCALEBITS 16 /* speediest right-shift on some machines */
#define ONE_HALF ((INT32) 1 << (SCALEBITS-1)) #define ONE_HALF ((long) 1 << (SCALEBITS-1))
#define FIX(x) ((INT32) ((x) * (1L<<SCALEBITS) + 0.5)) #define FIX(x) ((long) ((x) * (1L<<SCALEBITS) + 0.5))
/* /*
...@@ -84,7 +84,7 @@ build_ycc_rgb_table (j_decompress_ptr cinfo) ...@@ -84,7 +84,7 @@ build_ycc_rgb_table (j_decompress_ptr cinfo)
{ {
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample; my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
int i; int i;
INT32 x; long x;
SHIFT_TEMPS SHIFT_TEMPS
upsample->Cr_r_tab = (int *) upsample->Cr_r_tab = (int *)
...@@ -93,12 +93,12 @@ build_ycc_rgb_table (j_decompress_ptr cinfo) ...@@ -93,12 +93,12 @@ build_ycc_rgb_table (j_decompress_ptr cinfo)
upsample->Cb_b_tab = (int *) upsample->Cb_b_tab = (int *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(int)); (MAXJSAMPLE+1) * SIZEOF(int));
upsample->Cr_g_tab = (INT32 *) upsample->Cr_g_tab = (long *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(INT32)); (MAXJSAMPLE+1) * SIZEOF(long));
upsample->Cb_g_tab = (INT32 *) upsample->Cb_g_tab = (long *)
(*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE, (*cinfo->mem->alloc_small) ((j_common_ptr) cinfo, JPOOL_IMAGE,
(MAXJSAMPLE+1) * SIZEOF(INT32)); (MAXJSAMPLE+1) * SIZEOF(long));
for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) { for (i = 0, x = -CENTERJSAMPLE; i <= MAXJSAMPLE; i++, x++) {
/* i is the actual input pixel value, in the range 0..MAXJSAMPLE */ /* i is the actual input pixel value, in the range 0..MAXJSAMPLE */
...@@ -237,8 +237,8 @@ h2v1_merged_upsample (j_decompress_ptr cinfo, ...@@ -237,8 +237,8 @@ h2v1_merged_upsample (j_decompress_ptr cinfo,
register JSAMPLE * range_limit = cinfo->sample_range_limit; register JSAMPLE * range_limit = cinfo->sample_range_limit;
int * Crrtab = upsample->Cr_r_tab; int * Crrtab = upsample->Cr_r_tab;
int * Cbbtab = upsample->Cb_b_tab; int * Cbbtab = upsample->Cb_b_tab;
INT32 * Crgtab = upsample->Cr_g_tab; long * Crgtab = upsample->Cr_g_tab;
INT32 * Cbgtab = upsample->Cb_g_tab; long * Cbgtab = upsample->Cb_g_tab;
SHIFT_TEMPS SHIFT_TEMPS
inptr0 = input_buf[0][in_row_group_ctr]; inptr0 = input_buf[0][in_row_group_ctr];
...@@ -299,8 +299,8 @@ h2v2_merged_upsample (j_decompress_ptr cinfo, ...@@ -299,8 +299,8 @@ h2v2_merged_upsample (j_decompress_ptr cinfo,
register JSAMPLE * range_limit = cinfo->sample_range_limit; register JSAMPLE * range_limit = cinfo->sample_range_limit;
int * Crrtab = upsample->Cr_r_tab; int * Crrtab = upsample->Cr_r_tab;
int * Cbbtab = upsample->Cb_b_tab; int * Cbbtab = upsample->Cb_b_tab;
INT32 * Crgtab = upsample->Cr_g_tab; long * Crgtab = upsample->Cr_g_tab;
INT32 * Cbgtab = upsample->Cb_g_tab; long * Cbgtab = upsample->Cb_g_tab;
SHIFT_TEMPS SHIFT_TEMPS
inptr00 = input_buf[0][in_row_group_ctr*2]; inptr00 = input_buf[0][in_row_group_ctr*2];
......
...@@ -74,13 +74,13 @@ typedef struct { ...@@ -74,13 +74,13 @@ typedef struct {
typedef phuff_entropy_decoder * phuff_entropy_ptr; typedef phuff_entropy_decoder * phuff_entropy_ptr;
/* Forward declarations */ /* Forward declarations */
METHODDEF(boolean) decode_mcu_DC_first JPP((j_decompress_ptr cinfo, METHODDEF(int) decode_mcu_DC_first JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data)); JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_AC_first JPP((j_decompress_ptr cinfo, METHODDEF(int) decode_mcu_AC_first JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data)); JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo, METHODDEF(int) decode_mcu_DC_refine JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data)); JBLOCKROW *MCU_data));
METHODDEF(boolean) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo, METHODDEF(int) decode_mcu_AC_refine JPP((j_decompress_ptr cinfo,
JBLOCKROW *MCU_data)); JBLOCKROW *MCU_data));
...@@ -92,7 +92,7 @@ METHODDEF(void) ...@@ -92,7 +92,7 @@ METHODDEF(void)
start_pass_phuff_decoder (j_decompress_ptr cinfo) start_pass_phuff_decoder (j_decompress_ptr cinfo)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
boolean is_DC_band, bad; int is_DC_band, bad;
int ci, coefi, tbl; int ci, coefi, tbl;
int *coef_bit_ptr; int *coef_bit_ptr;
jpeg_component_info * compptr; jpeg_component_info * compptr;
...@@ -224,7 +224,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */ ...@@ -224,7 +224,7 @@ static const int extend_offset[16] = /* entry n is (-1 << n) + 1 */
* Returns FALSE if must suspend. * Returns FALSE if must suspend.
*/ */
LOCAL(boolean) LOCAL(int)
process_restart (j_decompress_ptr cinfo) process_restart (j_decompress_ptr cinfo)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
...@@ -282,7 +282,7 @@ process_restart (j_decompress_ptr cinfo) ...@@ -282,7 +282,7 @@ process_restart (j_decompress_ptr cinfo)
* or first pass of successive approximation). * or first pass of successive approximation).
*/ */
METHODDEF(boolean) METHODDEF(int)
decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
...@@ -353,7 +353,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -353,7 +353,7 @@ decode_mcu_DC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* or first pass of successive approximation). * or first pass of successive approximation).
*/ */
METHODDEF(boolean) METHODDEF(int)
decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
...@@ -438,7 +438,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -438,7 +438,7 @@ decode_mcu_AC_first (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* is not very clear on the point. * is not very clear on the point.
*/ */
METHODDEF(boolean) METHODDEF(int)
decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
...@@ -487,7 +487,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) ...@@ -487,7 +487,7 @@ decode_mcu_DC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
* MCU decoding for AC successive approximation refinement scan. * MCU decoding for AC successive approximation refinement scan.
*/ */
METHODDEF(boolean) METHODDEF(int)
decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data) decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
{ {
phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy; phuff_entropy_ptr entropy = (phuff_entropy_ptr) cinfo->entropy;
......
...@@ -247,7 +247,7 @@ post_process_2pass (j_decompress_ptr cinfo, ...@@ -247,7 +247,7 @@ post_process_2pass (j_decompress_ptr cinfo,
*/ */
GLOBAL(void) GLOBAL(void)
jinit_d_post_controller (j_decompress_ptr cinfo, boolean need_full_buffer) jinit_d_post_controller (j_decompress_ptr cinfo, int need_full_buffer)
{ {
my_post_ptr post; my_post_ptr post;
......
...@@ -54,8 +54,8 @@ typedef struct { ...@@ -54,8 +54,8 @@ typedef struct {
/* These arrays save pixel expansion factors so that int_expand need not /* These arrays save pixel expansion factors so that int_expand need not
* recompute them each time. They are unused for other upsampling methods. * recompute them each time. They are unused for other upsampling methods.
*/ */
UINT8 h_expand[MAX_COMPONENTS]; unsigned char h_expand[MAX_COMPONENTS];
UINT8 v_expand[MAX_COMPONENTS]; unsigned char v_expand[MAX_COMPONENTS];
} my_upsampler; } my_upsampler;
typedef my_upsampler * my_upsample_ptr; typedef my_upsampler * my_upsample_ptr;
...@@ -350,7 +350,7 @@ h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr, ...@@ -350,7 +350,7 @@ h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
register int thiscolsum, lastcolsum, nextcolsum; register int thiscolsum, lastcolsum, nextcolsum;
#else #else
register INT32 thiscolsum, lastcolsum, nextcolsum; register long thiscolsum, lastcolsum, nextcolsum;
#endif #endif
register JDIMENSION colctr; register JDIMENSION colctr;
int inrow, outrow, v; int inrow, outrow, v;
...@@ -401,7 +401,7 @@ jinit_upsampler (j_decompress_ptr cinfo) ...@@ -401,7 +401,7 @@ jinit_upsampler (j_decompress_ptr cinfo)
my_upsample_ptr upsample; my_upsample_ptr upsample;
int ci; int ci;
jpeg_component_info * compptr; jpeg_component_info * compptr;
boolean need_buffer, do_fancy; int need_buffer, do_fancy;
int h_in_group, v_in_group, h_out_group, v_out_group; int h_in_group, v_in_group, h_out_group, v_out_group;
upsample = (my_upsample_ptr) upsample = (my_upsample_ptr)
...@@ -463,8 +463,8 @@ jinit_upsampler (j_decompress_ptr cinfo) ...@@ -463,8 +463,8 @@ jinit_upsampler (j_decompress_ptr cinfo)
(v_out_group % v_in_group) == 0) { (v_out_group % v_in_group) == 0) {
/* Generic integral-factors upsampling method */ /* Generic integral-factors upsampling method */
upsample->methods[ci] = int_upsample; upsample->methods[ci] = int_upsample;
upsample->h_expand[ci] = (UINT8) (h_out_group / h_in_group); upsample->h_expand[ci] = (unsigned char) (h_out_group / h_in_group);
upsample->v_expand[ci] = (UINT8) (v_out_group / v_in_group); upsample->v_expand[ci] = (unsigned char) (v_out_group / v_in_group);
} else } else
ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL); ERREXIT(cinfo, JERR_FRACT_SAMPLE_NOTIMPL);
if (need_buffer) { if (need_buffer) {
......
...@@ -161,7 +161,7 @@ format_message (j_common_ptr cinfo, char * buffer) ...@@ -161,7 +161,7 @@ format_message (j_common_ptr cinfo, char * buffer)
const char * msgtext = NULL; const char * msgtext = NULL;
const char * msgptr; const char * msgptr;
char ch; char ch;
boolean isstring; int isstring;
/* Look up message string in proper table */ /* Look up message string in proper table */
if (msg_code > 0 && msg_code <= err->last_jpeg_message) { if (msg_code > 0 && msg_code <= err->last_jpeg_message) {
......
...@@ -218,21 +218,21 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr, ...@@ -218,21 +218,21 @@ jpeg_idct_float (j_decompress_ptr cinfo, jpeg_component_info * compptr,
/* Final output stage: scale down by a factor of 8 and range-limit */ /* Final output stage: scale down by a factor of 8 and range-limit */
outptr[0] = range_limit[(int) DESCALE((INT32) (tmp0 + tmp7), 3) outptr[0] = range_limit[(int) DESCALE((long) (tmp0 + tmp7), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[7] = range_limit[(int) DESCALE((INT32) (tmp0 - tmp7), 3) outptr[7] = range_limit[(int) DESCALE((long) (tmp0 - tmp7), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[1] = range_limit[(int) DESCALE((INT32) (tmp1 + tmp6), 3) outptr[1] = range_limit[(int) DESCALE((long) (tmp1 + tmp6), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[6] = range_limit[(int) DESCALE((INT32) (tmp1 - tmp6), 3) outptr[6] = range_limit[(int) DESCALE((long) (tmp1 - tmp6), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[2] = range_limit[(int) DESCALE((INT32) (tmp2 + tmp5), 3) outptr[2] = range_limit[(int) DESCALE((long) (tmp2 + tmp5), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[5] = range_limit[(int) DESCALE((INT32) (tmp2 - tmp5), 3) outptr[5] = range_limit[(int) DESCALE((long) (tmp2 - tmp5), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[4] = range_limit[(int) DESCALE((INT32) (tmp3 + tmp4), 3) outptr[4] = range_limit[(int) DESCALE((long) (tmp3 + tmp4), 3)
& RANGE_MASK]; & RANGE_MASK];
outptr[3] = range_limit[(int) DESCALE((INT32) (tmp3 - tmp4), 3) outptr[3] = range_limit[(int) DESCALE((long) (tmp3 - tmp4), 3)
& RANGE_MASK]; & RANGE_MASK];
wsptr += DCTSIZE; /* advance pointer to next row */ wsptr += DCTSIZE; /* advance pointer to next row */
......
...@@ -89,10 +89,10 @@ ...@@ -89,10 +89,10 @@
*/ */
#if CONST_BITS == 8 #if CONST_BITS == 8
#define FIX_1_082392200 ((INT32) 277) /* FIX(1.082392200) */ #define FIX_1_082392200 ((long) 277) /* FIX(1.082392200) */
#define FIX_1_414213562 ((INT32) 362) /* FIX(1.414213562) */ #define FIX_1_414213562 ((long) 362) /* FIX(1.414213562) */
#define FIX_1_847759065 ((INT32) 473) /* FIX(1.847759065) */ #define FIX_1_847759065 ((long) 473) /* FIX(1.847759065) */
#define FIX_2_613125930 ((INT32) 669) /* FIX(2.613125930) */ #define FIX_2_613125930 ((long) 669) /* FIX(2.613125930) */
#else #else
#define FIX_1_082392200 FIX(1.082392200) #define FIX_1_082392200 FIX(1.082392200)
#define FIX_1_414213562 FIX(1.414213562) #define FIX_1_414213562 FIX(1.414213562)
...@@ -112,7 +112,7 @@ ...@@ -112,7 +112,7 @@
#endif #endif
/* Multiply a DCTELEM variable by an INT32 constant, and immediately /* Multiply a DCTELEM variable by an long constant, and immediately
* descale to yield a DCTELEM result. * descale to yield a DCTELEM result.
*/ */
...@@ -122,7 +122,7 @@ ...@@ -122,7 +122,7 @@
/* Dequantize a coefficient by multiplying it by the multiplier-table /* Dequantize a coefficient by multiplying it by the multiplier-table
* entry; produce a DCTELEM result. For 8-bit data a 16x16->16 * entry; produce a DCTELEM result. For 8-bit data a 16x16->16
* multiplication will do. For 12-bit data, the multiplier table is * multiplication will do. For 12-bit data, the multiplier table is
* declared INT32, so a 32-bit multiply will be used. * declared long, so a 32-bit multiply will be used.
*/ */
#if BITS_IN_JSAMPLE == 8 #if BITS_IN_JSAMPLE == 8
...@@ -134,7 +134,7 @@ ...@@ -134,7 +134,7 @@
/* Like DESCALE, but applies to a DCTELEM and produces an int. /* Like DESCALE, but applies to a DCTELEM and produces an int.
* We assume that int right shift is unsigned if INT32 right shift is. * We assume that int right shift is unsigned if long right shift is.
*/ */
#ifdef RIGHT_SHIFT_IS_UNSIGNED #ifdef RIGHT_SHIFT_IS_UNSIGNED
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment