Fix compilation issue
Issue arose when C_ARITH_CODING_SUPPORTED was undefined
This commit is contained in:
@@ -367,14 +367,19 @@ compress_trellis_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
c_derived_tbl actbl_data;
|
c_derived_tbl actbl_data;
|
||||||
c_derived_tbl *actbl = &actbl_data;
|
c_derived_tbl *actbl = &actbl_data;
|
||||||
|
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
arith_rates arith_r_data;
|
arith_rates arith_r_data;
|
||||||
arith_rates *arith_r = &arith_r_data;
|
arith_rates *arith_r = &arith_r_data;
|
||||||
|
#endif
|
||||||
|
|
||||||
compptr = cinfo->cur_comp_info[ci];
|
compptr = cinfo->cur_comp_info[ci];
|
||||||
|
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
if (cinfo->arith_code)
|
if (cinfo->arith_code)
|
||||||
jget_arith_rates(cinfo, compptr->dc_tbl_no, compptr->ac_tbl_no, arith_r);
|
jget_arith_rates(cinfo, compptr->dc_tbl_no, compptr->ac_tbl_no, arith_r);
|
||||||
else {
|
else
|
||||||
|
#endif
|
||||||
|
{
|
||||||
jpeg_make_c_derived_tbl(cinfo, TRUE, compptr->dc_tbl_no, &dctbl);
|
jpeg_make_c_derived_tbl(cinfo, TRUE, compptr->dc_tbl_no, &dctbl);
|
||||||
jpeg_make_c_derived_tbl(cinfo, FALSE, compptr->ac_tbl_no, &actbl);
|
jpeg_make_c_derived_tbl(cinfo, FALSE, compptr->ac_tbl_no, &actbl);
|
||||||
}
|
}
|
||||||
@@ -413,6 +418,7 @@ compress_trellis_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
for (block_row = 0; block_row < block_rows; block_row++) {
|
for (block_row = 0; block_row < block_rows; block_row++) {
|
||||||
thisblockrow = buffer[block_row];
|
thisblockrow = buffer[block_row];
|
||||||
lastblockrow = (block_row > 0) ? buffer[block_row-1] : NULL;
|
lastblockrow = (block_row > 0) ? buffer[block_row-1] : NULL;
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
if (cinfo->arith_code)
|
if (cinfo->arith_code)
|
||||||
quantize_trellis_arith(cinfo, arith_r, thisblockrow,
|
quantize_trellis_arith(cinfo, arith_r, thisblockrow,
|
||||||
buffer_dst[block_row], blocks_across,
|
buffer_dst[block_row], blocks_across,
|
||||||
@@ -421,6 +427,7 @@ compress_trellis_pass (j_compress_ptr cinfo, JSAMPIMAGE input_buf)
|
|||||||
cinfo->master->norm_coef[compptr->quant_tbl_no],
|
cinfo->master->norm_coef[compptr->quant_tbl_no],
|
||||||
&lastDC, lastblockrow, buffer_dst[block_row-1]);
|
&lastDC, lastblockrow, buffer_dst[block_row-1]);
|
||||||
else
|
else
|
||||||
|
#endif
|
||||||
quantize_trellis(cinfo, dctbl, actbl, thisblockrow,
|
quantize_trellis(cinfo, dctbl, actbl, thisblockrow,
|
||||||
buffer_dst[block_row], blocks_across,
|
buffer_dst[block_row], blocks_across,
|
||||||
cinfo->quant_tbl_ptrs[compptr->quant_tbl_no],
|
cinfo->quant_tbl_ptrs[compptr->quant_tbl_no],
|
||||||
|
|||||||
@@ -1261,6 +1261,7 @@ quantize_trellis(j_compress_ptr cinfo, c_derived_tbl *dctbl, c_derived_tbl *actb
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
GLOBAL(void)
|
GLOBAL(void)
|
||||||
quantize_trellis_arith(j_compress_ptr cinfo, arith_rates *r, JBLOCKROW coef_blocks, JBLOCKROW src, JDIMENSION num_blocks,
|
quantize_trellis_arith(j_compress_ptr cinfo, arith_rates *r, JBLOCKROW coef_blocks, JBLOCKROW src, JDIMENSION num_blocks,
|
||||||
JQUANT_TBL * qtbl, double *norm_src, double *norm_coef, JCOEF *last_dc_val,
|
JQUANT_TBL * qtbl, double *norm_src, double *norm_coef, JCOEF *last_dc_val,
|
||||||
@@ -1604,6 +1605,7 @@ quantize_trellis_arith(j_compress_ptr cinfo, arith_rates *r, JBLOCKROW coef_bloc
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Initialize FDCT manager.
|
* Initialize FDCT manager.
|
||||||
|
|||||||
@@ -91,6 +91,7 @@ struct jpeg_comp_master {
|
|||||||
float trellis_delta_dc_weight;
|
float trellis_delta_dc_weight;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
/* The following two definitions specify the allocation chunk size
|
/* The following two definitions specify the allocation chunk size
|
||||||
* for the statistics area.
|
* for the statistics area.
|
||||||
* According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least
|
* According to sections F.1.4.4.1.3 and F.1.4.4.2, we need at least
|
||||||
@@ -114,6 +115,7 @@ typedef struct {
|
|||||||
int arith_dc_U;
|
int arith_dc_U;
|
||||||
int arith_ac_K;
|
int arith_ac_K;
|
||||||
} arith_rates;
|
} arith_rates;
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Main buffer control (downsampled-data buffer) */
|
/* Main buffer control (downsampled-data buffer) */
|
||||||
struct jpeg_c_main_controller {
|
struct jpeg_c_main_controller {
|
||||||
@@ -389,12 +391,14 @@ EXTERN(void) jcopy_block_row (JBLOCKROW input_row, JBLOCKROW output_row,
|
|||||||
JDIMENSION num_blocks);
|
JDIMENSION num_blocks);
|
||||||
EXTERN(void) jzero_far (void * target, size_t bytestozero);
|
EXTERN(void) jzero_far (void * target, size_t bytestozero);
|
||||||
|
|
||||||
|
#ifdef C_ARITH_CODING_SUPPORTED
|
||||||
EXTERN(void) jget_arith_rates (j_compress_ptr cinfo, int dc_tbl_no, int ac_tbl_no, arith_rates *r);
|
EXTERN(void) jget_arith_rates (j_compress_ptr cinfo, int dc_tbl_no, int ac_tbl_no, arith_rates *r);
|
||||||
|
|
||||||
EXTERN(void) quantize_trellis_arith
|
EXTERN(void) quantize_trellis_arith
|
||||||
(j_compress_ptr cinfo, arith_rates *r, JBLOCKROW coef_blocks, JBLOCKROW src, JDIMENSION num_blocks,
|
(j_compress_ptr cinfo, arith_rates *r, JBLOCKROW coef_blocks, JBLOCKROW src, JDIMENSION num_blocks,
|
||||||
JQUANT_TBL * qtbl, double *norm_src, double *norm_coef, JCOEF *last_dc_val,
|
JQUANT_TBL * qtbl, double *norm_src, double *norm_coef, JCOEF *last_dc_val,
|
||||||
JBLOCKROW coef_blocks_above, JBLOCKROW src_above);
|
JBLOCKROW coef_blocks_above, JBLOCKROW src_above);
|
||||||
|
#endif
|
||||||
|
|
||||||
/* Constant tables in jutils.c */
|
/* Constant tables in jutils.c */
|
||||||
#if 0 /* This table is not actually needed in v6a */
|
#if 0 /* This table is not actually needed in v6a */
|
||||||
|
|||||||
Reference in New Issue
Block a user