mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-03-09 15:50:02 +00:00
lib/DtHelp/jpeg: remove register keyword
This commit is contained in:
parent
e9d0d91cad
commit
2760adaab3
9 changed files with 103 additions and 103 deletions
|
@ -145,17 +145,17 @@ ycc_rgb_convert (j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY output_buf, int num_rows)
|
JSAMPARRAY output_buf, int num_rows)
|
||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register int y, cb, cr;
|
int y, cb, cr;
|
||||||
register JSAMPROW outptr;
|
JSAMPROW outptr;
|
||||||
register JSAMPROW inptr0, inptr1, inptr2;
|
JSAMPROW inptr0, inptr1, inptr2;
|
||||||
register JDIMENSION col;
|
JDIMENSION col;
|
||||||
JDIMENSION num_cols = cinfo->output_width;
|
JDIMENSION num_cols = cinfo->output_width;
|
||||||
/* copy these pointers into registers if possible */
|
/* copy these pointers into registers if possible */
|
||||||
register JSAMPLE * range_limit = cinfo->sample_range_limit;
|
JSAMPLE * range_limit = cinfo->sample_range_limit;
|
||||||
register int * Crrtab = cconvert->Cr_r_tab;
|
int * Crrtab = cconvert->Cr_r_tab;
|
||||||
register int * Cbbtab = cconvert->Cb_b_tab;
|
int * Cbbtab = cconvert->Cb_b_tab;
|
||||||
register INT32 * Crgtab = cconvert->Cr_g_tab;
|
INT32 * Crgtab = cconvert->Cr_g_tab;
|
||||||
register INT32 * Cbgtab = cconvert->Cb_g_tab;
|
INT32 * Cbgtab = cconvert->Cb_g_tab;
|
||||||
SHIFT_TEMPS
|
SHIFT_TEMPS
|
||||||
|
|
||||||
while (--num_rows >= 0) {
|
while (--num_rows >= 0) {
|
||||||
|
@ -193,9 +193,9 @@ null_convert (j_decompress_ptr cinfo,
|
||||||
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
JSAMPIMAGE input_buf, JDIMENSION input_row,
|
||||||
JSAMPARRAY output_buf, int num_rows)
|
JSAMPARRAY output_buf, int num_rows)
|
||||||
{
|
{
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register JDIMENSION count;
|
JDIMENSION count;
|
||||||
register int num_components = cinfo->num_components;
|
int num_components = cinfo->num_components;
|
||||||
JDIMENSION num_cols = cinfo->output_width;
|
JDIMENSION num_cols = cinfo->output_width;
|
||||||
int ci;
|
int ci;
|
||||||
|
|
||||||
|
@ -243,17 +243,17 @@ ycck_cmyk_convert (j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY output_buf, int num_rows)
|
JSAMPARRAY output_buf, int num_rows)
|
||||||
{
|
{
|
||||||
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
my_cconvert_ptr cconvert = (my_cconvert_ptr) cinfo->cconvert;
|
||||||
register int y, cb, cr;
|
int y, cb, cr;
|
||||||
register JSAMPROW outptr;
|
JSAMPROW outptr;
|
||||||
register JSAMPROW inptr0, inptr1, inptr2, inptr3;
|
JSAMPROW inptr0, inptr1, inptr2, inptr3;
|
||||||
register JDIMENSION col;
|
JDIMENSION col;
|
||||||
JDIMENSION num_cols = cinfo->output_width;
|
JDIMENSION num_cols = cinfo->output_width;
|
||||||
/* copy these pointers into registers if possible */
|
/* copy these pointers into registers if possible */
|
||||||
register JSAMPLE * range_limit = cinfo->sample_range_limit;
|
JSAMPLE * range_limit = cinfo->sample_range_limit;
|
||||||
register int * Crrtab = cconvert->Cr_r_tab;
|
int * Crrtab = cconvert->Cr_r_tab;
|
||||||
register int * Cbbtab = cconvert->Cb_b_tab;
|
int * Cbbtab = cconvert->Cb_b_tab;
|
||||||
register INT32 * Crgtab = cconvert->Cr_g_tab;
|
INT32 * Crgtab = cconvert->Cr_g_tab;
|
||||||
register INT32 * Cbgtab = cconvert->Cb_g_tab;
|
INT32 * Cbgtab = cconvert->Cb_g_tab;
|
||||||
SHIFT_TEMPS
|
SHIFT_TEMPS
|
||||||
|
|
||||||
while (--num_rows >= 0) {
|
while (--num_rows >= 0) {
|
||||||
|
|
|
@ -255,14 +255,14 @@ jpeg_make_d_derived_tbl (j_decompress_ptr cinfo, JHUFF_TBL * htbl,
|
||||||
|
|
||||||
GLOBAL(boolean)
|
GLOBAL(boolean)
|
||||||
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,
|
bit_buf_type get_buffer, int bits_left,
|
||||||
int nbits)
|
int 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 */
|
||||||
{
|
{
|
||||||
/* Copy heavily used state fields into locals (hopefully registers) */
|
/* Copy heavily used state fields into locals (hopefully registers) */
|
||||||
register const JOCTET * next_input_byte = state->next_input_byte;
|
const JOCTET * next_input_byte = state->next_input_byte;
|
||||||
register size_t bytes_in_buffer = state->bytes_in_buffer;
|
size_t bytes_in_buffer = state->bytes_in_buffer;
|
||||||
register int c;
|
int c;
|
||||||
|
|
||||||
/* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
|
/* Attempt to load at least MIN_GET_BITS bits into get_buffer. */
|
||||||
/* (It is assumed that no request will be for more than that many bits.) */
|
/* (It is assumed that no request will be for more than that many bits.) */
|
||||||
|
@ -343,11 +343,11 @@ jpeg_fill_bit_buffer (bitread_working_state * state,
|
||||||
|
|
||||||
GLOBAL(int)
|
GLOBAL(int)
|
||||||
jpeg_huff_decode (bitread_working_state * state,
|
jpeg_huff_decode (bitread_working_state * state,
|
||||||
register bit_buf_type get_buffer, register int bits_left,
|
bit_buf_type get_buffer, int bits_left,
|
||||||
d_derived_tbl * htbl, int min_bits)
|
d_derived_tbl * htbl, int min_bits)
|
||||||
{
|
{
|
||||||
register int l = min_bits;
|
int l = min_bits;
|
||||||
register INT32 code;
|
INT32 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. */
|
||||||
|
@ -460,7 +460,7 @@ METHODDEF(boolean)
|
||||||
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;
|
||||||
register int s, k, r;
|
int s, k, r;
|
||||||
int blkn, ci;
|
int blkn, ci;
|
||||||
JBLOCKROW block;
|
JBLOCKROW block;
|
||||||
BITREAD_STATE_VARS;
|
BITREAD_STATE_VARS;
|
||||||
|
|
|
@ -121,8 +121,8 @@ typedef struct { /* Bitreading working state within an MCU */
|
||||||
|
|
||||||
/* Macros to declare and load/save bitread local variables. */
|
/* Macros to declare and load/save bitread local variables. */
|
||||||
#define BITREAD_STATE_VARS \
|
#define BITREAD_STATE_VARS \
|
||||||
register bit_buf_type get_buffer; \
|
bit_buf_type get_buffer; \
|
||||||
register int bits_left; \
|
int bits_left; \
|
||||||
bitread_working_state br_state
|
bitread_working_state br_state
|
||||||
|
|
||||||
#define BITREAD_LOAD_STATE(cinfop,permstate) \
|
#define BITREAD_LOAD_STATE(cinfop,permstate) \
|
||||||
|
@ -176,8 +176,8 @@ typedef struct { /* Bitreading working state within an MCU */
|
||||||
|
|
||||||
/* 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(boolean) jpeg_fill_bit_buffer
|
||||||
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
JPP((bitread_working_state * state, bit_buf_type get_buffer,
|
||||||
register int bits_left, int nbits));
|
int bits_left, int nbits));
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -198,7 +198,7 @@ EXTERN(boolean) jpeg_fill_bit_buffer
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
|
#define HUFF_DECODE(result,state,htbl,failaction,slowlabel) \
|
||||||
{ register int nb, look; \
|
{ int nb, look; \
|
||||||
if (bits_left < HUFF_LOOKAHEAD) { \
|
if (bits_left < HUFF_LOOKAHEAD) { \
|
||||||
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
|
if (! jpeg_fill_bit_buffer(&state,get_buffer,bits_left, 0)) {failaction;} \
|
||||||
get_buffer = state.get_buffer; bits_left = state.bits_left; \
|
get_buffer = state.get_buffer; bits_left = state.bits_left; \
|
||||||
|
@ -221,5 +221,5 @@ slowlabel: \
|
||||||
|
|
||||||
/* Out-of-line case for Huffman code fetching */
|
/* Out-of-line case for Huffman code fetching */
|
||||||
EXTERN(int) jpeg_huff_decode
|
EXTERN(int) jpeg_huff_decode
|
||||||
JPP((bitread_working_state * state, register bit_buf_type get_buffer,
|
JPP((bitread_working_state * state, bit_buf_type get_buffer,
|
||||||
register int bits_left, d_derived_tbl * htbl, int min_bits));
|
int bits_left, d_derived_tbl * htbl, int min_bits));
|
||||||
|
|
|
@ -251,13 +251,13 @@ h2v1_merged_upsample (j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY output_buf)
|
JSAMPARRAY output_buf)
|
||||||
{
|
{
|
||||||
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
||||||
register int y, cred, cgreen, cblue;
|
int y, cred, cgreen, cblue;
|
||||||
int cb, cr;
|
int cb, cr;
|
||||||
register JSAMPROW outptr;
|
JSAMPROW outptr;
|
||||||
JSAMPROW inptr0, inptr1, inptr2;
|
JSAMPROW inptr0, inptr1, inptr2;
|
||||||
JDIMENSION col;
|
JDIMENSION col;
|
||||||
/* copy these pointers into registers if possible */
|
/* copy these pointers into registers if possible */
|
||||||
register JSAMPLE * range_limit = cinfo->sample_range_limit;
|
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;
|
INT32 * Crgtab = upsample->Cr_g_tab;
|
||||||
|
@ -313,13 +313,13 @@ h2v2_merged_upsample (j_decompress_ptr cinfo,
|
||||||
JSAMPARRAY output_buf)
|
JSAMPARRAY output_buf)
|
||||||
{
|
{
|
||||||
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
||||||
register int y, cred, cgreen, cblue;
|
int y, cred, cgreen, cblue;
|
||||||
int cb, cr;
|
int cb, cr;
|
||||||
register JSAMPROW outptr0, outptr1;
|
JSAMPROW outptr0, outptr1;
|
||||||
JSAMPROW inptr00, inptr01, inptr1, inptr2;
|
JSAMPROW inptr00, inptr01, inptr1, inptr2;
|
||||||
JDIMENSION col;
|
JDIMENSION col;
|
||||||
/* copy these pointers into registers if possible */
|
/* copy these pointers into registers if possible */
|
||||||
register JSAMPLE * range_limit = cinfo->sample_range_limit;
|
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;
|
INT32 * Crgtab = upsample->Cr_g_tab;
|
||||||
|
|
|
@ -305,7 +305,7 @@ 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;
|
||||||
int Al = cinfo->Al;
|
int Al = cinfo->Al;
|
||||||
register int s, r;
|
int s, r;
|
||||||
int blkn, ci;
|
int blkn, ci;
|
||||||
JBLOCKROW block;
|
JBLOCKROW block;
|
||||||
BITREAD_STATE_VARS;
|
BITREAD_STATE_VARS;
|
||||||
|
@ -371,7 +371,7 @@ 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;
|
||||||
int Se = cinfo->Se;
|
int Se = cinfo->Se;
|
||||||
int Al = cinfo->Al;
|
int Al = cinfo->Al;
|
||||||
register int s, k, r;
|
int s, k, r;
|
||||||
unsigned int EOBRUN;
|
unsigned int EOBRUN;
|
||||||
JBLOCKROW block;
|
JBLOCKROW block;
|
||||||
BITREAD_STATE_VARS;
|
BITREAD_STATE_VARS;
|
||||||
|
@ -496,7 +496,7 @@ decode_mcu_AC_refine (j_decompress_ptr cinfo, JBLOCKROW *MCU_data)
|
||||||
int Se = cinfo->Se;
|
int Se = cinfo->Se;
|
||||||
int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
|
int p1 = 1 << cinfo->Al; /* 1 in the bit position being coded */
|
||||||
int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
|
int m1 = (-1) << cinfo->Al; /* -1 in the bit position being coded */
|
||||||
register int s, k, r;
|
int s, k, r;
|
||||||
unsigned int EOBRUN;
|
unsigned int EOBRUN;
|
||||||
JBLOCKROW block;
|
JBLOCKROW block;
|
||||||
JCOEFPTR thiscoef;
|
JCOEFPTR thiscoef;
|
||||||
|
|
|
@ -214,9 +214,9 @@ int_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||||
{
|
{
|
||||||
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
my_upsample_ptr upsample = (my_upsample_ptr) cinfo->upsample;
|
||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register JSAMPLE invalue;
|
JSAMPLE invalue;
|
||||||
register int h;
|
int h;
|
||||||
JSAMPROW outend;
|
JSAMPROW outend;
|
||||||
int h_expand, v_expand;
|
int h_expand, v_expand;
|
||||||
int inrow, outrow;
|
int inrow, outrow;
|
||||||
|
@ -257,8 +257,8 @@ h2v1_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||||
{
|
{
|
||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register JSAMPLE invalue;
|
JSAMPLE invalue;
|
||||||
JSAMPROW outend;
|
JSAMPROW outend;
|
||||||
int inrow;
|
int inrow;
|
||||||
|
|
||||||
|
@ -285,8 +285,8 @@ h2v2_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||||
{
|
{
|
||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register JSAMPLE invalue;
|
JSAMPLE invalue;
|
||||||
JSAMPROW outend;
|
JSAMPROW outend;
|
||||||
int inrow, outrow;
|
int inrow, outrow;
|
||||||
|
|
||||||
|
@ -328,9 +328,9 @@ h2v1_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||||
{
|
{
|
||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register int invalue;
|
int invalue;
|
||||||
register JDIMENSION colctr;
|
JDIMENSION colctr;
|
||||||
int inrow;
|
int inrow;
|
||||||
|
|
||||||
for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
|
for (inrow = 0; inrow < cinfo->max_v_samp_factor; inrow++) {
|
||||||
|
@ -369,13 +369,13 @@ h2v2_fancy_upsample (j_decompress_ptr cinfo, jpeg_component_info * compptr,
|
||||||
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
JSAMPARRAY input_data, JSAMPARRAY * output_data_ptr)
|
||||||
{
|
{
|
||||||
JSAMPARRAY output_data = *output_data_ptr;
|
JSAMPARRAY output_data = *output_data_ptr;
|
||||||
register JSAMPROW inptr0, inptr1, outptr;
|
JSAMPROW inptr0, inptr1, outptr;
|
||||||
#if BITS_IN_JSAMPLE == 8
|
#if BITS_IN_JSAMPLE == 8
|
||||||
register int thiscolsum, lastcolsum, nextcolsum;
|
int thiscolsum, lastcolsum, nextcolsum;
|
||||||
#else
|
#else
|
||||||
register INT32 thiscolsum, lastcolsum, nextcolsum;
|
INT32 thiscolsum, lastcolsum, nextcolsum;
|
||||||
#endif
|
#endif
|
||||||
register JDIMENSION colctr;
|
JDIMENSION colctr;
|
||||||
int inrow, outrow, v;
|
int inrow, outrow, v;
|
||||||
|
|
||||||
inrow = outrow = 0;
|
inrow = outrow = 0;
|
||||||
|
|
|
@ -485,12 +485,12 @@ color_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
JSAMPARRAY colorindex = cquantize->colorindex;
|
JSAMPARRAY colorindex = cquantize->colorindex;
|
||||||
register int pixcode, ci;
|
int pixcode, ci;
|
||||||
register JSAMPROW ptrin, ptrout;
|
JSAMPROW ptrin, ptrout;
|
||||||
int row;
|
int row;
|
||||||
JDIMENSION col;
|
JDIMENSION col;
|
||||||
JDIMENSION width = cinfo->output_width;
|
JDIMENSION width = cinfo->output_width;
|
||||||
register int nc = cinfo->out_color_components;
|
int nc = cinfo->out_color_components;
|
||||||
|
|
||||||
for (row = 0; row < num_rows; row++) {
|
for (row = 0; row < num_rows; row++) {
|
||||||
ptrin = input_buf[row];
|
ptrin = input_buf[row];
|
||||||
|
@ -512,8 +512,8 @@ color_quantize3 (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
/* Fast path for out_color_components==3, no dithering */
|
/* Fast path for out_color_components==3, no dithering */
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
register int pixcode;
|
int pixcode;
|
||||||
register JSAMPROW ptrin, ptrout;
|
JSAMPROW ptrin, ptrout;
|
||||||
JSAMPROW colorindex0 = cquantize->colorindex[0];
|
JSAMPROW colorindex0 = cquantize->colorindex[0];
|
||||||
JSAMPROW colorindex1 = cquantize->colorindex[1];
|
JSAMPROW colorindex1 = cquantize->colorindex[1];
|
||||||
JSAMPROW colorindex2 = cquantize->colorindex[2];
|
JSAMPROW colorindex2 = cquantize->colorindex[2];
|
||||||
|
@ -540,8 +540,8 @@ quantize_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
/* General case, with ordered dithering */
|
/* General case, with ordered dithering */
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
register JSAMPROW input_ptr;
|
JSAMPROW input_ptr;
|
||||||
register JSAMPROW output_ptr;
|
JSAMPROW output_ptr;
|
||||||
JSAMPROW colorindex_ci;
|
JSAMPROW colorindex_ci;
|
||||||
int * dither; /* points to active row of dither matrix */
|
int * dither; /* points to active row of dither matrix */
|
||||||
int row_index, col_index; /* current indexes into dither matrix */
|
int row_index, col_index; /* current indexes into dither matrix */
|
||||||
|
@ -590,9 +590,9 @@ quantize3_ord_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
/* Fast path for out_color_components==3, with ordered dithering */
|
/* Fast path for out_color_components==3, with ordered dithering */
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
register int pixcode;
|
int pixcode;
|
||||||
register JSAMPROW input_ptr;
|
JSAMPROW input_ptr;
|
||||||
register JSAMPROW output_ptr;
|
JSAMPROW output_ptr;
|
||||||
JSAMPROW colorindex0 = cquantize->colorindex[0];
|
JSAMPROW colorindex0 = cquantize->colorindex[0];
|
||||||
JSAMPROW colorindex1 = cquantize->colorindex[1];
|
JSAMPROW colorindex1 = cquantize->colorindex[1];
|
||||||
JSAMPROW colorindex2 = cquantize->colorindex[2];
|
JSAMPROW colorindex2 = cquantize->colorindex[2];
|
||||||
|
@ -635,14 +635,14 @@ quantize_fs_dither (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
/* General case, with Floyd-Steinberg dithering */
|
/* General case, with Floyd-Steinberg dithering */
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
register LOCFSERROR cur; /* current error or pixel value */
|
LOCFSERROR cur; /* current error or pixel value */
|
||||||
LOCFSERROR belowerr; /* error for pixel below cur */
|
LOCFSERROR belowerr; /* error for pixel below cur */
|
||||||
LOCFSERROR bpreverr; /* error for below/prev col */
|
LOCFSERROR bpreverr; /* error for below/prev col */
|
||||||
LOCFSERROR bnexterr; /* error for below/next col */
|
LOCFSERROR bnexterr; /* error for below/next col */
|
||||||
LOCFSERROR delta;
|
LOCFSERROR delta;
|
||||||
register FSERRPTR errorptr; /* => fserrors[] at column before current */
|
FSERRPTR errorptr; /* => fserrors[] at column before current */
|
||||||
register JSAMPROW input_ptr;
|
JSAMPROW input_ptr;
|
||||||
register JSAMPROW output_ptr;
|
JSAMPROW output_ptr;
|
||||||
JSAMPROW colorindex_ci;
|
JSAMPROW colorindex_ci;
|
||||||
JSAMPROW colormap_ci;
|
JSAMPROW colormap_ci;
|
||||||
int pixcode;
|
int pixcode;
|
||||||
|
|
|
@ -248,9 +248,9 @@ prescan_quantize (j_decompress_ptr cinfo, JSAMPARRAY input_buf,
|
||||||
JSAMPARRAY output_buf, int num_rows)
|
JSAMPARRAY output_buf, int num_rows)
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
register JSAMPROW ptr;
|
JSAMPROW ptr;
|
||||||
register histptr histp;
|
histptr histp;
|
||||||
register hist3d histogram = cquantize->histogram;
|
hist3d histogram = cquantize->histogram;
|
||||||
int row;
|
int row;
|
||||||
JDIMENSION col;
|
JDIMENSION col;
|
||||||
JDIMENSION width = cinfo->output_width;
|
JDIMENSION width = cinfo->output_width;
|
||||||
|
@ -297,9 +297,9 @@ find_biggest_color_pop (boxptr boxlist, int numboxes)
|
||||||
/* Find the splittable box with the largest color population */
|
/* Find the splittable box with the largest color population */
|
||||||
/* Returns NULL if no splittable boxes remain */
|
/* Returns NULL if no splittable boxes remain */
|
||||||
{
|
{
|
||||||
register boxptr boxp;
|
boxptr boxp;
|
||||||
register int i;
|
int i;
|
||||||
register long maxc = 0;
|
long maxc = 0;
|
||||||
boxptr which = NULL;
|
boxptr which = NULL;
|
||||||
|
|
||||||
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
|
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
|
||||||
|
@ -317,9 +317,9 @@ find_biggest_volume (boxptr boxlist, int numboxes)
|
||||||
/* Find the splittable box with the largest (scaled) volume */
|
/* Find the splittable box with the largest (scaled) volume */
|
||||||
/* Returns NULL if no splittable boxes remain */
|
/* Returns NULL if no splittable boxes remain */
|
||||||
{
|
{
|
||||||
register boxptr boxp;
|
boxptr boxp;
|
||||||
register int i;
|
int i;
|
||||||
register INT32 maxv = 0;
|
INT32 maxv = 0;
|
||||||
boxptr which = NULL;
|
boxptr which = NULL;
|
||||||
|
|
||||||
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
|
for (i = 0, boxp = boxlist; i < numboxes; i++, boxp++) {
|
||||||
|
@ -450,7 +450,7 @@ median_cut (j_decompress_ptr cinfo, boxptr boxlist, int numboxes,
|
||||||
{
|
{
|
||||||
int n,lb;
|
int n,lb;
|
||||||
int c0,c1,c2,cmax;
|
int c0,c1,c2,cmax;
|
||||||
register boxptr b1,b2;
|
boxptr b1,b2;
|
||||||
|
|
||||||
while (numboxes < desired_colors) {
|
while (numboxes < desired_colors) {
|
||||||
/* Select box to split.
|
/* Select box to split.
|
||||||
|
@ -806,12 +806,12 @@ find_best_colors (j_decompress_ptr cinfo, int minc0, int minc1, int minc2,
|
||||||
{
|
{
|
||||||
int ic0, ic1, ic2;
|
int ic0, ic1, ic2;
|
||||||
int i, icolor;
|
int i, icolor;
|
||||||
register INT32 * bptr; /* pointer into bestdist[] array */
|
INT32 * bptr; /* pointer into bestdist[] array */
|
||||||
JSAMPLE * cptr; /* pointer into bestcolor[] array */
|
JSAMPLE * cptr; /* pointer into bestcolor[] array */
|
||||||
INT32 dist0, dist1; /* initial distance values */
|
INT32 dist0, dist1; /* initial distance values */
|
||||||
register INT32 dist2; /* current distance in inner loop */
|
INT32 dist2; /* current distance in inner loop */
|
||||||
INT32 xx0, xx1; /* distance increments */
|
INT32 xx0, xx1; /* distance increments */
|
||||||
register INT32 xx2;
|
INT32 xx2;
|
||||||
INT32 inc0, inc1, inc2; /* initial values for increments */
|
INT32 inc0, inc1, inc2; /* initial values for increments */
|
||||||
/* This array holds the distance to the nearest-so-far color for each cell */
|
/* This array holds the distance to the nearest-so-far color for each cell */
|
||||||
INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
|
INT32 bestdist[BOX_C0_ELEMS * BOX_C1_ELEMS * BOX_C2_ELEMS];
|
||||||
|
@ -884,8 +884,8 @@ fill_inverse_cmap (j_decompress_ptr cinfo, int c0, int c1, int c2)
|
||||||
hist3d histogram = cquantize->histogram;
|
hist3d histogram = cquantize->histogram;
|
||||||
int minc0, minc1, minc2; /* lower left corner of update box */
|
int minc0, minc1, minc2; /* lower left corner of update box */
|
||||||
int ic0, ic1, ic2;
|
int ic0, ic1, ic2;
|
||||||
register JSAMPLE * cptr; /* pointer into bestcolor[] array */
|
JSAMPLE * cptr; /* pointer into bestcolor[] array */
|
||||||
register histptr cachep; /* pointer into main cache array */
|
histptr cachep; /* pointer into main cache array */
|
||||||
/* This array lists the candidate colormap indexes. */
|
/* This array lists the candidate colormap indexes. */
|
||||||
JSAMPLE colorlist[MAXNUMCOLORS];
|
JSAMPLE colorlist[MAXNUMCOLORS];
|
||||||
int numcolors; /* number of candidate colors */
|
int numcolors; /* number of candidate colors */
|
||||||
|
@ -941,9 +941,9 @@ pass2_no_dither (j_decompress_ptr cinfo,
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
hist3d histogram = cquantize->histogram;
|
hist3d histogram = cquantize->histogram;
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
register histptr cachep;
|
histptr cachep;
|
||||||
register int c0, c1, c2;
|
int c0, c1, c2;
|
||||||
int row;
|
int row;
|
||||||
JDIMENSION col;
|
JDIMENSION col;
|
||||||
JDIMENSION width = cinfo->output_width;
|
JDIMENSION width = cinfo->output_width;
|
||||||
|
@ -975,10 +975,10 @@ pass2_fs_dither (j_decompress_ptr cinfo,
|
||||||
{
|
{
|
||||||
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
my_cquantize_ptr cquantize = (my_cquantize_ptr) cinfo->cquantize;
|
||||||
hist3d histogram = cquantize->histogram;
|
hist3d histogram = cquantize->histogram;
|
||||||
register LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */
|
LOCFSERROR cur0, cur1, cur2; /* current error or pixel value */
|
||||||
LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
|
LOCFSERROR belowerr0, belowerr1, belowerr2; /* error for pixel below cur */
|
||||||
LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
|
LOCFSERROR bpreverr0, bpreverr1, bpreverr2; /* error for below/prev col */
|
||||||
register FSERRPTR errorptr; /* => fserrors[] at column before current */
|
FSERRPTR errorptr; /* => fserrors[] at column before current */
|
||||||
JSAMPROW inptr; /* => current input pixel */
|
JSAMPROW inptr; /* => current input pixel */
|
||||||
JSAMPROW outptr; /* => current output pixel */
|
JSAMPROW outptr; /* => current output pixel */
|
||||||
histptr cachep;
|
histptr cachep;
|
||||||
|
@ -1053,7 +1053,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
|
||||||
if (*cachep == 0)
|
if (*cachep == 0)
|
||||||
fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
|
fill_inverse_cmap(cinfo, cur0>>C0_SHIFT,cur1>>C1_SHIFT,cur2>>C2_SHIFT);
|
||||||
/* Now emit the colormap index for this cell */
|
/* Now emit the colormap index for this cell */
|
||||||
{ register int pixcode = *cachep - 1;
|
{ int pixcode = *cachep - 1;
|
||||||
*outptr = (JSAMPLE) pixcode;
|
*outptr = (JSAMPLE) pixcode;
|
||||||
/* Compute representation error for this pixel */
|
/* Compute representation error for this pixel */
|
||||||
cur0 -= GETJSAMPLE(colormap0[pixcode]);
|
cur0 -= GETJSAMPLE(colormap0[pixcode]);
|
||||||
|
@ -1064,7 +1064,7 @@ pass2_fs_dither (j_decompress_ptr cinfo,
|
||||||
* Add these into the running sums, and simultaneously shift the
|
* Add these into the running sums, and simultaneously shift the
|
||||||
* next-line error sums left by 1 column.
|
* next-line error sums left by 1 column.
|
||||||
*/
|
*/
|
||||||
{ register LOCFSERROR bnexterr, delta;
|
{ LOCFSERROR bnexterr, delta;
|
||||||
|
|
||||||
bnexterr = cur0; /* Process component 0 */
|
bnexterr = cur0; /* Process component 0 */
|
||||||
delta = cur0 * 2;
|
delta = cur0 * 2;
|
||||||
|
|
|
@ -140,13 +140,13 @@ jcopy_sample_rows (JSAMPARRAY input_array, int source_row,
|
||||||
* The source and destination arrays must be at least as wide as num_cols.
|
* The source and destination arrays must be at least as wide as num_cols.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
register JSAMPROW inptr, outptr;
|
JSAMPROW inptr, outptr;
|
||||||
#ifdef FMEMCOPY
|
#ifdef FMEMCOPY
|
||||||
register size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
|
size_t count = (size_t) (num_cols * SIZEOF(JSAMPLE));
|
||||||
#else
|
#else
|
||||||
register JDIMENSION count;
|
JDIMENSION count;
|
||||||
#endif
|
#endif
|
||||||
register int row;
|
int row;
|
||||||
|
|
||||||
input_array += source_row;
|
input_array += source_row;
|
||||||
output_array += dest_row;
|
output_array += dest_row;
|
||||||
|
@ -172,8 +172,8 @@ jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
|
||||||
#ifdef FMEMCOPY
|
#ifdef FMEMCOPY
|
||||||
FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
|
FMEMCOPY(output_row, input_row, num_blocks * (DCTSIZE2 * SIZEOF(JCOEF)));
|
||||||
#else
|
#else
|
||||||
register JCOEFPTR inptr, outptr;
|
JCOEFPTR inptr, outptr;
|
||||||
register long count;
|
long count;
|
||||||
|
|
||||||
inptr = (JCOEFPTR) input_row;
|
inptr = (JCOEFPTR) input_row;
|
||||||
outptr = (JCOEFPTR) output_row;
|
outptr = (JCOEFPTR) output_row;
|
||||||
|
@ -192,8 +192,8 @@ jzero_far (void FAR * target, size_t bytestozero)
|
||||||
#ifdef FMEMZERO
|
#ifdef FMEMZERO
|
||||||
FMEMZERO(target, bytestozero);
|
FMEMZERO(target, bytestozero);
|
||||||
#else
|
#else
|
||||||
register char FAR * ptr = (char FAR *) target;
|
char FAR * ptr = (char FAR *) target;
|
||||||
register size_t count;
|
size_t count;
|
||||||
|
|
||||||
for (count = bytestozero; count > 0; count--) {
|
for (count = bytestozero; count > 0; count--) {
|
||||||
*ptr++ = 0;
|
*ptr++ = 0;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue