| OLD | NEW |
| 1 /* | 1 /* |
| 2 * jcinit.c | 2 * jcinit.c |
| 3 * | 3 * |
| 4 * Copyright (C) 1991-1997, Thomas G. Lane. | 4 * Copyright (C) 1991-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.ijg |
| 7 * file. |
| 7 * | 8 * |
| 8 * This file contains initialization logic for the JPEG compressor. | 9 * This file contains initialization logic for the JPEG compressor. |
| 9 * This routine is in charge of selecting the modules to be executed and | 10 * This routine is in charge of selecting the modules to be executed and |
| 10 * making an initialization call to each one. | 11 * making an initialization call to each one. |
| 11 * | 12 * |
| 12 * Logically, this code belongs in jcmaster.c. It's split out because | 13 * Logically, this code belongs in jcmaster.c. It's split out because |
| 13 * linking this routine implies linking the entire compression library. | 14 * linking this routine implies linking the entire compression library. |
| 14 * For a transcoding-only application, we want to be able to use jcmaster.c | 15 * For a transcoding-only application, we want to be able to use jcmaster.c |
| 15 * without linking in the whole library. | 16 * without linking in the whole library. |
| 16 */ | 17 */ |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 jinit_phuff_encoder(cinfo); | 54 jinit_phuff_encoder(cinfo); |
| 54 #else | 55 #else |
| 55 ERREXIT(cinfo, JERR_NOT_COMPILED); | 56 ERREXIT(cinfo, JERR_NOT_COMPILED); |
| 56 #endif | 57 #endif |
| 57 } else | 58 } else |
| 58 jinit_huff_encoder(cinfo); | 59 jinit_huff_encoder(cinfo); |
| 59 } | 60 } |
| 60 | 61 |
| 61 /* Need a full-image coefficient buffer in any multi-pass mode. */ | 62 /* Need a full-image coefficient buffer in any multi-pass mode. */ |
| 62 jinit_c_coef_controller(cinfo, | 63 jinit_c_coef_controller(cinfo, |
| 63 » » (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); | 64 (boolean) (cinfo->num_scans > 1 || cinfo->optimize_coding)); |
| 64 jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); | 65 jinit_c_main_controller(cinfo, FALSE /* never need full buffer here */); |
| 65 | 66 |
| 66 jinit_marker_writer(cinfo); | 67 jinit_marker_writer(cinfo); |
| 67 | 68 |
| 68 /* We can now tell the memory manager to allocate virtual arrays. */ | 69 /* We can now tell the memory manager to allocate virtual arrays. */ |
| 69 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); | 70 (*cinfo->mem->realize_virt_arrays) ((j_common_ptr) cinfo); |
| 70 | 71 |
| 71 /* Write the datastream header (SOI) immediately. | 72 /* Write the datastream header (SOI) immediately. |
| 72 * Frame and scan headers are postponed till later. | 73 * Frame and scan headers are postponed till later. |
| 73 * This lets application insert special markers after the SOI. | 74 * This lets application insert special markers after the SOI. |
| 74 */ | 75 */ |
| 75 (*cinfo->marker->write_file_header) (cinfo); | 76 (*cinfo->marker->write_file_header) (cinfo); |
| 76 } | 77 } |
| OLD | NEW |