OLD | NEW |
1 /* | 1 /* |
2 * jdtrans.c | 2 * jdtrans.c |
3 * | 3 * |
4 * Copyright (C) 1995-1997, Thomas G. Lane. | 4 * Copyright (C) 1995-1997, Thomas G. Lane. |
5 * This file is part of the Independent JPEG Group's software. | 5 * This file is part of the Independent JPEG Group's software. |
6 * For conditions of distribution and use, see the accompanying README file. | 6 * For conditions of distribution and use, see the accompanying README file. |
7 * | 7 * |
8 * This file contains library routines for transcoding decompression, | 8 * This file contains library routines for transcoding decompression, |
9 * that is, reading raw DCT coefficient arrays from an input JPEG file. | 9 * that is, reading raw DCT coefficient arrays from an input JPEG file. |
10 * The routines in jdapimin.c will also be needed by a transcoder. | 10 * The routines in jdapimin.c will also be needed by a transcoder. |
(...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
92 * Master selection of decompression modules for transcoding. | 92 * Master selection of decompression modules for transcoding. |
93 * This substitutes for jdmaster.c's initialization of the full decompressor. | 93 * This substitutes for jdmaster.c's initialization of the full decompressor. |
94 */ | 94 */ |
95 | 95 |
96 LOCAL(void) | 96 LOCAL(void) |
97 transdecode_master_selection (j_decompress_ptr cinfo) | 97 transdecode_master_selection (j_decompress_ptr cinfo) |
98 { | 98 { |
99 /* This is effectively a buffered-image operation. */ | 99 /* This is effectively a buffered-image operation. */ |
100 cinfo->buffered_image = TRUE; | 100 cinfo->buffered_image = TRUE; |
101 | 101 |
| 102 #if JPEG_LIB_VERSION >= 80 |
| 103 /* Compute output image dimensions and related values. */ |
| 104 jpeg_core_output_dimensions(cinfo); |
| 105 #endif |
| 106 |
102 /* Entropy decoding: either Huffman or arithmetic coding. */ | 107 /* Entropy decoding: either Huffman or arithmetic coding. */ |
103 if (cinfo->arith_code) { | 108 if (cinfo->arith_code) { |
| 109 #ifdef D_ARITH_CODING_SUPPORTED |
| 110 jinit_arith_decoder(cinfo); |
| 111 #else |
104 ERREXIT(cinfo, JERR_ARITH_NOTIMPL); | 112 ERREXIT(cinfo, JERR_ARITH_NOTIMPL); |
| 113 #endif |
105 } else { | 114 } else { |
106 if (cinfo->progressive_mode) { | 115 if (cinfo->progressive_mode) { |
107 #ifdef D_PROGRESSIVE_SUPPORTED | 116 #ifdef D_PROGRESSIVE_SUPPORTED |
108 jinit_phuff_decoder(cinfo); | 117 jinit_phuff_decoder(cinfo); |
109 #else | 118 #else |
110 ERREXIT(cinfo, JERR_NOT_COMPILED); | 119 ERREXIT(cinfo, JERR_NOT_COMPILED); |
111 #endif | 120 #endif |
112 } else | 121 } else |
113 jinit_huff_decoder(cinfo); | 122 jinit_huff_decoder(cinfo); |
114 } | 123 } |
(...skipping 19 matching lines...) Expand all Loading... |
134 nscans = cinfo->num_components; | 143 nscans = cinfo->num_components; |
135 } else { | 144 } else { |
136 nscans = 1; | 145 nscans = 1; |
137 } | 146 } |
138 cinfo->progress->pass_counter = 0L; | 147 cinfo->progress->pass_counter = 0L; |
139 cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; | 148 cinfo->progress->pass_limit = (long) cinfo->total_iMCU_rows * nscans; |
140 cinfo->progress->completed_passes = 0; | 149 cinfo->progress->completed_passes = 0; |
141 cinfo->progress->total_passes = 1; | 150 cinfo->progress->total_passes = 1; |
142 } | 151 } |
143 } | 152 } |
OLD | NEW |