| 1 | /* |
| 2 | * jclossy.c |
| 3 | * |
| 4 | * Copyright (C) 1998, Thomas G. Lane. |
| 5 | * This file is part of the Independent JPEG Group's software. |
| 6 | * For conditions of distribution and use, see the accompanying README file. |
| 7 | * |
| 8 | * This file contains the control logic for the lossy JPEG compressor. |
| 9 | */ |
| 10 | |
| 11 | #define JPEG_INTERNALScxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jclossy.c:11:9`! |
| 12 | #include "jinclude.h"cxx . . $ `<file>/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jinclude.h`/ |
| 13 | #include "jpeglib.h"cxx . . $ `<file>/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jpeglib.h`/ |
| 14 | #include "jlossy.h"cxx . . $ `<file>/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jlossy.h`/ |
| 15 | |
| 16 | |
| 17 | /* |
| 18 | * Initialize for a processing pass. |
| 19 | */ |
| 20 | |
| 21 | METHODDEFcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jmorecfg.h:220:9`!(void) |
| 22 | start_passcxx . . $ start_pass(3bac9a2572b61930). (j_compress_ptrcxx . . $ j_compress_ptr# cinfo, J_BUF_MODEcxx . . $ J_BUF_MODE# pass_mode) |
| 23 | { |
| 24 | j_lossy_c_ptrcxx . . $ j_lossy_c_ptr# lossyc = (j_lossy_c_ptrcxx . . $ j_lossy_c_ptr#) cinfo->codeccxx . . $ gdcmjpeg8_compress_struct#codec.; |
| 25 | |
| 26 | (*lossyc->fdct_start_passcxx . . $ $anonymous_type_b44d3c6f5583323_0#fdct_start_pass.) (cinfo); |
| 27 | (*lossyc->coef_start_passcxx . . $ $anonymous_type_b44d3c6f5583323_0#coef_start_pass.) (cinfo, pass_mode); |
| 28 | } |
| 29 | |
| 30 | |
| 31 | /* |
| 32 | * Initialize the lossy compression codec. |
| 33 | * This is called only once, during master selection. |
| 34 | */ |
| 35 | |
| 36 | GLOBALcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jmorecfg.h:230:9`!(void) |
| 37 | jinit_lossy_c_codeccxx . . $ `build/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/8/mangle_jpeg8bits.h:49:9`! (j_compress_ptrcxx . . $ j_compress_ptr# cinfo) |
| 38 | { |
| 39 | j_lossy_c_ptrcxx . . $ j_lossy_c_ptr# lossyc; |
| 40 | |
| 41 | /* Create subobject in permanent pool */ |
| 42 | lossyc = (j_lossy_c_ptrcxx . . $ j_lossy_c_ptr#) |
| 43 | (*cinfo->memcxx . . $ gdcmjpeg8_compress_struct#mem.->alloc_smallcxx . . $ gdcmjpeg8_memory_mgr#alloc_small.) ((j_common_ptrcxx . . $ j_common_ptr#) cinfo, JPOOL_PERMANENTcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jpeglib.h:767:9`!, |
| 44 | SIZEOFcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jinclude.h:80:9`!(jpeg_lossy_c_codec)); |
| 45 | cinfo->codeccxx . . $ gdcmjpeg8_compress_struct#codec. = (struct jpeg_c_codeccxx . . $ jpeg_c_codec# *) lossyc; |
| 46 | |
| 47 | /* Initialize sub-modules */ |
| 48 | |
| 49 | /* Forward DCT */ |
| 50 | jinit_forward_dctcxx . . $ `build/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/8/mangle_jpeg8bits.h:42:9`!(cinfo); |
| 51 | /* Entropy encoding: either Huffman or arithmetic coding. */ |
| 52 | if (cinfo->arith_codecxx . . $ gdcmjpeg8_compress_struct#arith_code.) { |
| 53 | #ifdef WITH_ARITHMETIC_PATCH |
| 54 | jinit_arith_encoder(cinfo); |
| 55 | #else |
| 56 | ERREXITcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jerror.h:221:9`!(cinfo, JERR_ARITH_NOTIMPL); |
| 57 | #endif |
| 58 | } else { |
| 59 | if (cinfo->processcxx . . $ gdcmjpeg8_compress_struct#process. == JPROC_PROGRESSIVEcxx . . $ JPROC_PROGRESSIVE.) { |
| 60 | #ifdef C_PROGRESSIVE_SUPPORTEDcxx . . $ `Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/jmorecfg.h:329:9`! |
| 61 | jinit_phuff_encodercxx . . $ `build/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/8/mangle_jpeg8bits.h:57:9`!(cinfo); |
| 62 | #else |
| 63 | ERREXIT(cinfo, JERR_NOT_COMPILED); |
| 64 | #endif |
| 65 | } else |
| 66 | jinit_shuff_encodercxx . . $ `build/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/8/mangle_jpeg8bits.h:59:9`!(cinfo); |
| 67 | } |
| 68 | |
| 69 | /* Need a full-image coefficient buffer in any multi-pass mode. */ |
| 70 | jinit_c_coef_controllercxx . . $ `build/Modules/ThirdParty/GDCM/src/gdcm/Utilities/gdcmjpeg/8/mangle_jpeg8bits.h:25:9`!(cinfo, |
| 71 | (booleancxx . . $ boolean#) (cinfo->num_scanscxx . . $ gdcmjpeg8_compress_struct#num_scans. > 1 || |
| 72 | cinfo->optimize_codingcxx . . $ gdcmjpeg8_compress_struct#optimize_coding.)); |
| 73 | |
| 74 | /* Initialize method pointers. |
| 75 | * |
| 76 | * Note: entropy_start_pass and entropy_finish_pass are assigned in |
| 77 | * jcshuff.c or jcphuff.c and compress_data is assigned in jccoefct.c. |
| 78 | */ |
| 79 | lossyc->pubcxx . . $ $anonymous_type_b44d3c6f5583323_0#pub..start_passcxx . . $ jpeg_c_codec#start_pass. = start_passcxx . . $ start_pass(3bac9a2572b61930).; |
| 80 | } |