diff options
Diffstat (limited to 'src/jpeg-6')
-rw-r--r-- | src/jpeg-6/jcdctmgr.c | 89 | ||||
-rw-r--r-- | src/jpeg-6/jcmainct.c | 3 | ||||
-rw-r--r-- | src/jpeg-6/jconfig.h | 1 | ||||
-rw-r--r-- | src/jpeg-6/jdmainct.c | 8 |
4 files changed, 0 insertions, 101 deletions
diff --git a/src/jpeg-6/jcdctmgr.c b/src/jpeg-6/jcdctmgr.c index f31a96f2..debba72b 100644 --- a/src/jpeg-6/jcdctmgr.c +++ b/src/jpeg-6/jcdctmgr.c @@ -179,95 +179,6 @@ start_pass_fdctmgr (j_compress_ptr cinfo) * blocks. The quantized coefficients are returned in coef_blocks[]. */ -#if 0 // bk001204 -METHODDEF void -forward_DCT (j_compress_ptr cinfo, jpeg_component_info * compptr, - JSAMPARRAY sample_data, JBLOCKROW coef_blocks, - JDIMENSION start_row, JDIMENSION start_col, - JDIMENSION num_blocks) -/* This version is used for integer DCT implementations. */ -{ - /* This routine is heavily used, so it's worth coding it tightly. */ - my_fdct_ptr fdct = (my_fdct_ptr) cinfo->fdct; - forward_DCT_method_ptr do_dct = fdct->do_dct; - DCTELEM * divisors = fdct->divisors[compptr->quant_tbl_no]; - DCTELEM workspace[DCTSIZE2]; /* work area for FDCT subroutine */ - JDIMENSION bi; - - sample_data += start_row; /* fold in the vertical offset once */ - - for (bi = 0; bi < num_blocks; bi++, start_col += DCTSIZE) { - /* Load data into workspace, applying unsigned->signed conversion */ - { register DCTELEM *workspaceptr; - register JSAMPROW elemptr; - register int elemr; - - workspaceptr = workspace; - for (elemr = 0; elemr < DCTSIZE; elemr++) { - elemptr = sample_data[elemr] + start_col; -#if DCTSIZE == 8 /* unroll the inner loop */ - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; -#else - { register int elemc; - for (elemc = DCTSIZE; elemc > 0; elemc--) { - *workspaceptr++ = GETJSAMPLE(*elemptr++) - CENTERJSAMPLE; - } - } -#endif - } - } - - /* Perform the DCT */ - (*do_dct) (workspace); - - /* Quantize/descale the coefficients, and store into coef_blocks[] */ - { register DCTELEM temp, qval; - register int i; - register JCOEFPTR output_ptr = coef_blocks[bi]; - - for (i = 0; i < DCTSIZE2; i++) { - qval = divisors[i]; - temp = workspace[i]; - /* Divide the coefficient value by qval, ensuring proper rounding. - * Since C does not specify the direction of rounding for negative - * quotients, we have to force the dividend positive for portability. - * - * In most files, at least half of the output values will be zero - * (at default quantization settings, more like three-quarters...) - * so we should ensure that this case is fast. On many machines, - * a comparison is enough cheaper than a divide to make a special test - * a win. Since both inputs will be nonnegative, we need only test - * for a < b to discover whether a/b is 0. - * If your machine's division is fast enough, define FAST_DIVIDE. - */ -#ifdef FAST_DIVIDE -#define DIVIDE_BY(a,b) a /= b -#else -#define DIVIDE_BY(a,b) if (a >= b) a /= b; else a = 0 -#endif - if (temp < 0) { - temp = -temp; - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - temp = -temp; - } else { - temp += qval>>1; /* for rounding */ - DIVIDE_BY(temp, qval); - } - output_ptr[i] = (JCOEF) temp; - } - } - } -} -#endif // 0 - #ifdef DCT_FLOAT_SUPPORTED METHODDEF void diff --git a/src/jpeg-6/jcmainct.c b/src/jpeg-6/jcmainct.c index 42a02d09..aa8ba9b5 100644 --- a/src/jpeg-6/jcmainct.c +++ b/src/jpeg-6/jcmainct.c @@ -68,7 +68,6 @@ METHODDEF void process_data_buffer_main METHODDEF void start_pass_main (j_compress_ptr cinfo, J_BUF_MODE pass_mode) { - // bk001204 - don't use main... my_main_ptr jmain = (my_main_ptr) cinfo->main; /* Do nothing in raw-data mode. */ @@ -115,7 +114,6 @@ process_data_simple_main (j_compress_ptr cinfo, JSAMPARRAY input_buf, JDIMENSION *in_row_ctr, JDIMENSION in_rows_avail) { - // bk001204 - don't use main my_main_ptr jmain = (my_main_ptr) cinfo->main; while (jmain->cur_iMCU_row < cinfo->total_iMCU_rows) { @@ -246,7 +244,6 @@ process_data_buffer_main (j_compress_ptr cinfo, GLOBAL void jinit_c_main_controller (j_compress_ptr cinfo, boolean need_full_buffer) { - // bk001204 - don't use main my_main_ptr jmain; int ci; jpeg_component_info *compptr; diff --git a/src/jpeg-6/jconfig.h b/src/jpeg-6/jconfig.h index 7d2f733b..361586ee 100644 --- a/src/jpeg-6/jconfig.h +++ b/src/jpeg-6/jconfig.h @@ -8,7 +8,6 @@ /* #define const */ #define CHAR_IS_UNSIGNED #define HAVE_STDDEF_H -#define HAVE_STDLIB_H #undef NEED_BSD_STRINGS #undef NEED_SYS_TYPES_H #undef NEED_FAR_POINTERS /* Watcom uses flat 32-bit addressing */ diff --git a/src/jpeg-6/jdmainct.c b/src/jpeg-6/jdmainct.c index 6cb0b7a0..e50a4717 100644 --- a/src/jpeg-6/jdmainct.c +++ b/src/jpeg-6/jdmainct.c @@ -159,7 +159,6 @@ alloc_funny_pointers (j_decompress_ptr cinfo) * This is done only once, not once per pass. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -201,7 +200,6 @@ make_funny_pointers (j_decompress_ptr cinfo) * This will be repeated at the beginning of each pass. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -242,7 +240,6 @@ set_wraparound_pointers (j_decompress_ptr cinfo) * This changes the pointer list state from top-of-image to the normal state. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup; int M = cinfo->min_DCT_scaled_size; @@ -272,7 +269,6 @@ set_bottom_pointers (j_decompress_ptr cinfo) * Also sets rowgroups_avail to indicate number of nondummy row groups in row. */ { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; int ci, i, rgroup, iMCUheight, rows_left; jpeg_component_info *compptr; @@ -310,7 +306,6 @@ set_bottom_pointers (j_decompress_ptr cinfo) METHODDEF void start_pass_main (j_decompress_ptr cinfo, J_BUF_MODE pass_mode) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; switch (pass_mode) { @@ -351,7 +346,6 @@ process_data_simple_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; JDIMENSION rowgroups_avail; @@ -392,7 +386,6 @@ process_data_context_main (j_decompress_ptr cinfo, JSAMPARRAY output_buf, JDIMENSION *out_row_ctr, JDIMENSION out_rows_avail) { - // bk001204 - no use main my_main_ptr jmain = (my_main_ptr) cinfo->main; /* Read input data if we haven't filled the main buffer yet */ @@ -482,7 +475,6 @@ process_data_crank_post (j_decompress_ptr cinfo, GLOBAL void jinit_d_main_controller (j_decompress_ptr cinfo, boolean need_full_buffer) { - // bk001204 - no use main my_main_ptr jmain; int ci, rgroup, ngroups; jpeg_component_info *compptr; |