| OLD | NEW |
| 1 /* | 1 /* |
| 2 * jerror.h | 2 * jerror.h |
| 3 * | 3 * |
| 4 * Copyright (C) 1994-1997, Thomas G. Lane. | 4 * Copyright (C) 1994-1997, Thomas G. Lane. |
| 5 * Modified 1997-2009 by Guido Vollbeding. |
| 5 * This file is part of the Independent JPEG Group's software. | 6 * This file is part of the Independent JPEG Group's software. |
| 6 * For conditions of distribution and use, see the accompanying README file. | 7 * For conditions of distribution and use, see the accompanying README file. |
| 7 * | 8 * |
| 8 * This file defines the error and message codes for the JPEG library. | 9 * This file defines the error and message codes for the JPEG library. |
| 9 * Edit this file to add new codes, or to translate the message strings to | 10 * Edit this file to add new codes, or to translate the message strings to |
| 10 * some other language. | 11 * some other language. |
| 11 * A set of error-reporting macros are defined too. Some applications using | 12 * A set of error-reporting macros are defined too. Some applications using |
| 12 * the JPEG library may wish to include this file to get the error codes | 13 * the JPEG library may wish to include this file to get the error codes |
| 13 * and/or the macros. | 14 * and/or the macros. |
| 14 */ | 15 */ |
| (...skipping 17 matching lines...) Expand all Loading... |
| 32 | 33 |
| 33 typedef enum { | 34 typedef enum { |
| 34 | 35 |
| 35 #define JMESSAGE(code,string) code , | 36 #define JMESSAGE(code,string) code , |
| 36 | 37 |
| 37 #endif /* JMAKE_ENUM_LIST */ | 38 #endif /* JMAKE_ENUM_LIST */ |
| 38 | 39 |
| 39 JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ | 40 JMESSAGE(JMSG_NOMESSAGE, "Bogus message code %d") /* Must be first entry! */ |
| 40 | 41 |
| 41 /* For maintenance convenience, list is alphabetical by message code name */ | 42 /* For maintenance convenience, list is alphabetical by message code name */ |
| 43 #if JPEG_LIB_VERSION < 70 |
| 42 JMESSAGE(JERR_ARITH_NOTIMPL, | 44 JMESSAGE(JERR_ARITH_NOTIMPL, |
| 43 » "Sorry, there are legal restrictions on arithmetic coding") | 45 » "Sorry, arithmetic coding is not implemented") |
| 46 #endif |
| 44 JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") | 47 JMESSAGE(JERR_BAD_ALIGN_TYPE, "ALIGN_TYPE is wrong, please fix") |
| 45 JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") | 48 JMESSAGE(JERR_BAD_ALLOC_CHUNK, "MAX_ALLOC_CHUNK is wrong, please fix") |
| 46 JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") | 49 JMESSAGE(JERR_BAD_BUFFER_MODE, "Bogus buffer control mode") |
| 47 JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") | 50 JMESSAGE(JERR_BAD_COMPONENT_ID, "Invalid component ID %d in SOS") |
| 51 #if JPEG_LIB_VERSION >= 70 |
| 52 JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") |
| 53 #endif |
| 48 JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") | 54 JMESSAGE(JERR_BAD_DCT_COEF, "DCT coefficient out of range") |
| 49 JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") | 55 JMESSAGE(JERR_BAD_DCTSIZE, "IDCT output block size %d not supported") |
| 56 #if JPEG_LIB_VERSION >= 70 |
| 57 JMESSAGE(JERR_BAD_DROP_SAMPLING, |
| 58 "Component index %d: mismatching sampling ratio %d:%d, %d:%d, %c") |
| 59 #endif |
| 50 JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") | 60 JMESSAGE(JERR_BAD_HUFF_TABLE, "Bogus Huffman table definition") |
| 51 JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") | 61 JMESSAGE(JERR_BAD_IN_COLORSPACE, "Bogus input colorspace") |
| 52 JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") | 62 JMESSAGE(JERR_BAD_J_COLORSPACE, "Bogus JPEG colorspace") |
| 53 JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") | 63 JMESSAGE(JERR_BAD_LENGTH, "Bogus marker length") |
| 54 JMESSAGE(JERR_BAD_LIB_VERSION, | 64 JMESSAGE(JERR_BAD_LIB_VERSION, |
| 55 "Wrong JPEG library version: library is %d, caller expects %d") | 65 "Wrong JPEG library version: library is %d, caller expects %d") |
| 56 JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") | 66 JMESSAGE(JERR_BAD_MCU_SIZE, "Sampling factors too large for interleaved scan") |
| 57 JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") | 67 JMESSAGE(JERR_BAD_POOL_ID, "Invalid memory pool code %d") |
| 58 JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") | 68 JMESSAGE(JERR_BAD_PRECISION, "Unsupported JPEG data precision %d") |
| 59 JMESSAGE(JERR_BAD_PROGRESSION, | 69 JMESSAGE(JERR_BAD_PROGRESSION, |
| (...skipping 26 matching lines...) Expand all Loading... |
| 86 JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") | 96 JMESSAGE(JERR_HUFF_MISSING_CODE, "Missing Huffman code table entry") |
| 87 JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") | 97 JMESSAGE(JERR_IMAGE_TOO_BIG, "Maximum supported image dimension is %u pixels") |
| 88 JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") | 98 JMESSAGE(JERR_INPUT_EMPTY, "Empty input file") |
| 89 JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") | 99 JMESSAGE(JERR_INPUT_EOF, "Premature end of input file") |
| 90 JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, | 100 JMESSAGE(JERR_MISMATCHED_QUANT_TABLE, |
| 91 "Cannot transcode due to multiple use of quantization table %d") | 101 "Cannot transcode due to multiple use of quantization table %d") |
| 92 JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") | 102 JMESSAGE(JERR_MISSING_DATA, "Scan script does not transmit all data") |
| 93 JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") | 103 JMESSAGE(JERR_MODE_CHANGE, "Invalid color quantization mode change") |
| 94 JMESSAGE(JERR_NOTIMPL, "Not implemented yet") | 104 JMESSAGE(JERR_NOTIMPL, "Not implemented yet") |
| 95 JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") | 105 JMESSAGE(JERR_NOT_COMPILED, "Requested feature was omitted at compile time") |
| 106 #if JPEG_LIB_VERSION >= 70 |
| 107 JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") |
| 108 #endif |
| 96 JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") | 109 JMESSAGE(JERR_NO_BACKING_STORE, "Backing store not supported") |
| 97 JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") | 110 JMESSAGE(JERR_NO_HUFF_TABLE, "Huffman table 0x%02x was not defined") |
| 98 JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") | 111 JMESSAGE(JERR_NO_IMAGE, "JPEG datastream contains no image") |
| 99 JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") | 112 JMESSAGE(JERR_NO_QUANT_TABLE, "Quantization table 0x%02x was not defined") |
| 100 JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") | 113 JMESSAGE(JERR_NO_SOI, "Not a JPEG file: starts with 0x%02x 0x%02x") |
| 101 JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") | 114 JMESSAGE(JERR_OUT_OF_MEMORY, "Insufficient memory (case %d)") |
| 102 JMESSAGE(JERR_QUANT_COMPONENTS, | 115 JMESSAGE(JERR_QUANT_COMPONENTS, |
| 103 "Cannot quantize more than %d color components") | 116 "Cannot quantize more than %d color components") |
| 104 JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") | 117 JMESSAGE(JERR_QUANT_FEW_COLORS, "Cannot quantize to fewer than %d colors") |
| 105 JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") | 118 JMESSAGE(JERR_QUANT_MANY_COLORS, "Cannot quantize to more than %d colors") |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 163 "JFIF extension marker: JPEG-compressed thumbnail image, length %u") | 176 "JFIF extension marker: JPEG-compressed thumbnail image, length %u") |
| 164 JMESSAGE(JTRC_THUMB_PALETTE, | 177 JMESSAGE(JTRC_THUMB_PALETTE, |
| 165 "JFIF extension marker: palette thumbnail image, length %u") | 178 "JFIF extension marker: palette thumbnail image, length %u") |
| 166 JMESSAGE(JTRC_THUMB_RGB, | 179 JMESSAGE(JTRC_THUMB_RGB, |
| 167 "JFIF extension marker: RGB thumbnail image, length %u") | 180 "JFIF extension marker: RGB thumbnail image, length %u") |
| 168 JMESSAGE(JTRC_UNKNOWN_IDS, | 181 JMESSAGE(JTRC_UNKNOWN_IDS, |
| 169 "Unrecognized component IDs %d %d %d, assuming YCbCr") | 182 "Unrecognized component IDs %d %d %d, assuming YCbCr") |
| 170 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") | 183 JMESSAGE(JTRC_XMS_CLOSE, "Freed XMS handle %u") |
| 171 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") | 184 JMESSAGE(JTRC_XMS_OPEN, "Obtained XMS handle %u") |
| 172 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") | 185 JMESSAGE(JWRN_ADOBE_XFORM, "Unknown Adobe color transform code %d") |
| 186 #if JPEG_LIB_VERSION >= 70 |
| 187 JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") |
| 188 #endif |
| 173 JMESSAGE(JWRN_BOGUS_PROGRESSION, | 189 JMESSAGE(JWRN_BOGUS_PROGRESSION, |
| 174 "Inconsistent progression sequence for component %d coefficient %d") | 190 "Inconsistent progression sequence for component %d coefficient %d") |
| 175 JMESSAGE(JWRN_EXTRANEOUS_DATA, | 191 JMESSAGE(JWRN_EXTRANEOUS_DATA, |
| 176 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") | 192 "Corrupt JPEG data: %u extraneous bytes before marker 0x%02x") |
| 177 JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") | 193 JMESSAGE(JWRN_HIT_MARKER, "Corrupt JPEG data: premature end of data segment") |
| 178 JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") | 194 JMESSAGE(JWRN_HUFF_BAD_CODE, "Corrupt JPEG data: bad Huffman code") |
| 179 JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") | 195 JMESSAGE(JWRN_JFIF_MAJOR, "Warning: unknown JFIF revision number %d.%02d") |
| 180 JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") | 196 JMESSAGE(JWRN_JPEG_EOF, "Premature end of JPEG file") |
| 181 JMESSAGE(JWRN_MUST_RESYNC, | 197 JMESSAGE(JWRN_MUST_RESYNC, |
| 182 "Corrupt JPEG data: found marker 0x%02x instead of RST%d") | 198 "Corrupt JPEG data: found marker 0x%02x instead of RST%d") |
| 183 JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") | 199 JMESSAGE(JWRN_NOT_SEQUENTIAL, "Invalid SOS parameters for sequential JPEG") |
| 184 JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") | 200 JMESSAGE(JWRN_TOO_MUCH_DATA, "Application transferred too many scanlines") |
| 201 #if JPEG_LIB_VERSION < 70 |
| 202 JMESSAGE(JERR_BAD_CROP_SPEC, "Invalid crop request") |
| 203 #if defined(C_ARITH_CODING_SUPPORTED) || defined(D_ARITH_CODING_SUPPORTED) |
| 204 JMESSAGE(JERR_NO_ARITH_TABLE, "Arithmetic table 0x%02x was not defined") |
| 205 JMESSAGE(JWRN_ARITH_BAD_CODE, "Corrupt JPEG data: bad arithmetic code") |
| 206 #endif |
| 207 #endif |
| 185 | 208 |
| 186 #ifdef JMAKE_ENUM_LIST | 209 #ifdef JMAKE_ENUM_LIST |
| 187 | 210 |
| 188 JMSG_LASTMSGCODE | 211 JMSG_LASTMSGCODE |
| 189 } J_MESSAGE_CODE; | 212 } J_MESSAGE_CODE; |
| 190 | 213 |
| 191 #undef JMAKE_ENUM_LIST | 214 #undef JMAKE_ENUM_LIST |
| 192 #endif /* JMAKE_ENUM_LIST */ | 215 #endif /* JMAKE_ENUM_LIST */ |
| 193 | 216 |
| 194 /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ | 217 /* Zap JMESSAGE macro so that future re-inclusions do nothing by default */ |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 282 _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ | 305 _mp[0] = (p1); _mp[1] = (p2); _mp[2] = (p3); _mp[3] = (p4); \ |
| 283 _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ | 306 _mp[4] = (p5); _mp[5] = (p6); _mp[6] = (p7); _mp[7] = (p8); \ |
| 284 (cinfo)->err->msg_code = (code); \ | 307 (cinfo)->err->msg_code = (code); \ |
| 285 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) | 308 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl)); ) |
| 286 #define TRACEMSS(cinfo,lvl,code,str) \ | 309 #define TRACEMSS(cinfo,lvl,code,str) \ |
| 287 ((cinfo)->err->msg_code = (code), \ | 310 ((cinfo)->err->msg_code = (code), \ |
| 288 strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ | 311 strncpy((cinfo)->err->msg_parm.s, (str), JMSG_STR_PARM_MAX), \ |
| 289 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) | 312 (*(cinfo)->err->emit_message) ((j_common_ptr) (cinfo), (lvl))) |
| 290 | 313 |
| 291 #endif /* JERROR_H */ | 314 #endif /* JERROR_H */ |
| OLD | NEW |