| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifndef _T4_ |
| #define _T4_ |
| |
| |
| |
| |
| |
| |
| typedef struct tableentry { |
| unsigned short length; |
| unsigned short code; |
| short runlen; |
| } tableentry; |
| |
| #define EOL 0x001 |
| |
| |
| #define G3CODE_EOL -1 |
| #define G3CODE_INVALID -2 |
| #define G3CODE_EOF -3 |
| #define G3CODE_INCOMP -4 |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| #ifdef G3CODES |
| const tableentry TIFFFaxWhiteCodes[] = { |
| { 8, 0x35, 0 }, |
| { 6, 0x7, 1 }, |
| { 4, 0x7, 2 }, |
| { 4, 0x8, 3 }, |
| { 4, 0xB, 4 }, |
| { 4, 0xC, 5 }, |
| { 4, 0xE, 6 }, |
| { 4, 0xF, 7 }, |
| { 5, 0x13, 8 }, |
| { 5, 0x14, 9 }, |
| { 5, 0x7, 10 }, |
| { 5, 0x8, 11 }, |
| { 6, 0x8, 12 }, |
| { 6, 0x3, 13 }, |
| { 6, 0x34, 14 }, |
| { 6, 0x35, 15 }, |
| { 6, 0x2A, 16 }, |
| { 6, 0x2B, 17 }, |
| { 7, 0x27, 18 }, |
| { 7, 0xC, 19 }, |
| { 7, 0x8, 20 }, |
| { 7, 0x17, 21 }, |
| { 7, 0x3, 22 }, |
| { 7, 0x4, 23 }, |
| { 7, 0x28, 24 }, |
| { 7, 0x2B, 25 }, |
| { 7, 0x13, 26 }, |
| { 7, 0x24, 27 }, |
| { 7, 0x18, 28 }, |
| { 8, 0x2, 29 }, |
| { 8, 0x3, 30 }, |
| { 8, 0x1A, 31 }, |
| { 8, 0x1B, 32 }, |
| { 8, 0x12, 33 }, |
| { 8, 0x13, 34 }, |
| { 8, 0x14, 35 }, |
| { 8, 0x15, 36 }, |
| { 8, 0x16, 37 }, |
| { 8, 0x17, 38 }, |
| { 8, 0x28, 39 }, |
| { 8, 0x29, 40 }, |
| { 8, 0x2A, 41 }, |
| { 8, 0x2B, 42 }, |
| { 8, 0x2C, 43 }, |
| { 8, 0x2D, 44 }, |
| { 8, 0x4, 45 }, |
| { 8, 0x5, 46 }, |
| { 8, 0xA, 47 }, |
| { 8, 0xB, 48 }, |
| { 8, 0x52, 49 }, |
| { 8, 0x53, 50 }, |
| { 8, 0x54, 51 }, |
| { 8, 0x55, 52 }, |
| { 8, 0x24, 53 }, |
| { 8, 0x25, 54 }, |
| { 8, 0x58, 55 }, |
| { 8, 0x59, 56 }, |
| { 8, 0x5A, 57 }, |
| { 8, 0x5B, 58 }, |
| { 8, 0x4A, 59 }, |
| { 8, 0x4B, 60 }, |
| { 8, 0x32, 61 }, |
| { 8, 0x33, 62 }, |
| { 8, 0x34, 63 }, |
| { 5, 0x1B, 64 }, |
| { 5, 0x12, 128 }, |
| { 6, 0x17, 192 }, |
| { 7, 0x37, 256 }, |
| { 8, 0x36, 320 }, |
| { 8, 0x37, 384 }, |
| { 8, 0x64, 448 }, |
| { 8, 0x65, 512 }, |
| { 8, 0x68, 576 }, |
| { 8, 0x67, 640 }, |
| { 9, 0xCC, 704 }, |
| { 9, 0xCD, 768 }, |
| { 9, 0xD2, 832 }, |
| { 9, 0xD3, 896 }, |
| { 9, 0xD4, 960 }, |
| { 9, 0xD5, 1024 }, |
| { 9, 0xD6, 1088 }, |
| { 9, 0xD7, 1152 }, |
| { 9, 0xD8, 1216 }, |
| { 9, 0xD9, 1280 }, |
| { 9, 0xDA, 1344 }, |
| { 9, 0xDB, 1408 }, |
| { 9, 0x98, 1472 }, |
| { 9, 0x99, 1536 }, |
| { 9, 0x9A, 1600 }, |
| { 6, 0x18, 1664 }, |
| { 9, 0x9B, 1728 }, |
| { 11, 0x8, 1792 }, |
| { 11, 0xC, 1856 }, |
| { 11, 0xD, 1920 }, |
| { 12, 0x12, 1984 }, |
| { 12, 0x13, 2048 }, |
| { 12, 0x14, 2112 }, |
| { 12, 0x15, 2176 }, |
| { 12, 0x16, 2240 }, |
| { 12, 0x17, 2304 }, |
| { 12, 0x1C, 2368 }, |
| { 12, 0x1D, 2432 }, |
| { 12, 0x1E, 2496 }, |
| { 12, 0x1F, 2560 }, |
| { 12, 0x1, G3CODE_EOL }, |
| { 9, 0x1, G3CODE_INVALID }, |
| { 10, 0x1, G3CODE_INVALID }, |
| { 11, 0x1, G3CODE_INVALID }, |
| { 12, 0x0, G3CODE_INVALID }, |
| }; |
| |
| const tableentry TIFFFaxBlackCodes[] = { |
| { 10, 0x37, 0 }, |
| { 3, 0x2, 1 }, |
| { 2, 0x3, 2 }, |
| { 2, 0x2, 3 }, |
| { 3, 0x3, 4 }, |
| { 4, 0x3, 5 }, |
| { 4, 0x2, 6 }, |
| { 5, 0x3, 7 }, |
| { 6, 0x5, 8 }, |
| { 6, 0x4, 9 }, |
| { 7, 0x4, 10 }, |
| { 7, 0x5, 11 }, |
| { 7, 0x7, 12 }, |
| { 8, 0x4, 13 }, |
| { 8, 0x7, 14 }, |
| { 9, 0x18, 15 }, |
| { 10, 0x17, 16 }, |
| { 10, 0x18, 17 }, |
| { 10, 0x8, 18 }, |
| { 11, 0x67, 19 }, |
| { 11, 0x68, 20 }, |
| { 11, 0x6C, 21 }, |
| { 11, 0x37, 22 }, |
| { 11, 0x28, 23 }, |
| { 11, 0x17, 24 }, |
| { 11, 0x18, 25 }, |
| { 12, 0xCA, 26 }, |
| { 12, 0xCB, 27 }, |
| { 12, 0xCC, 28 }, |
| { 12, 0xCD, 29 }, |
| { 12, 0x68, 30 }, |
| { 12, 0x69, 31 }, |
| { 12, 0x6A, 32 }, |
| { 12, 0x6B, 33 }, |
| { 12, 0xD2, 34 }, |
| { 12, 0xD3, 35 }, |
| { 12, 0xD4, 36 }, |
| { 12, 0xD5, 37 }, |
| { 12, 0xD6, 38 }, |
| { 12, 0xD7, 39 }, |
| { 12, 0x6C, 40 }, |
| { 12, 0x6D, 41 }, |
| { 12, 0xDA, 42 }, |
| { 12, 0xDB, 43 }, |
| { 12, 0x54, 44 }, |
| { 12, 0x55, 45 }, |
| { 12, 0x56, 46 }, |
| { 12, 0x57, 47 }, |
| { 12, 0x64, 48 }, |
| { 12, 0x65, 49 }, |
| { 12, 0x52, 50 }, |
| { 12, 0x53, 51 }, |
| { 12, 0x24, 52 }, |
| { 12, 0x37, 53 }, |
| { 12, 0x38, 54 }, |
| { 12, 0x27, 55 }, |
| { 12, 0x28, 56 }, |
| { 12, 0x58, 57 }, |
| { 12, 0x59, 58 }, |
| { 12, 0x2B, 59 }, |
| { 12, 0x2C, 60 }, |
| { 12, 0x5A, 61 }, |
| { 12, 0x66, 62 }, |
| { 12, 0x67, 63 }, |
| { 10, 0xF, 64 }, |
| { 12, 0xC8, 128 }, |
| { 12, 0xC9, 192 }, |
| { 12, 0x5B, 256 }, |
| { 12, 0x33, 320 }, |
| { 12, 0x34, 384 }, |
| { 12, 0x35, 448 }, |
| { 13, 0x6C, 512 }, |
| { 13, 0x6D, 576 }, |
| { 13, 0x4A, 640 }, |
| { 13, 0x4B, 704 }, |
| { 13, 0x4C, 768 }, |
| { 13, 0x4D, 832 }, |
| { 13, 0x72, 896 }, |
| { 13, 0x73, 960 }, |
| { 13, 0x74, 1024 }, |
| { 13, 0x75, 1088 }, |
| { 13, 0x76, 1152 }, |
| { 13, 0x77, 1216 }, |
| { 13, 0x52, 1280 }, |
| { 13, 0x53, 1344 }, |
| { 13, 0x54, 1408 }, |
| { 13, 0x55, 1472 }, |
| { 13, 0x5A, 1536 }, |
| { 13, 0x5B, 1600 }, |
| { 13, 0x64, 1664 }, |
| { 13, 0x65, 1728 }, |
| { 11, 0x8, 1792 }, |
| { 11, 0xC, 1856 }, |
| { 11, 0xD, 1920 }, |
| { 12, 0x12, 1984 }, |
| { 12, 0x13, 2048 }, |
| { 12, 0x14, 2112 }, |
| { 12, 0x15, 2176 }, |
| { 12, 0x16, 2240 }, |
| { 12, 0x17, 2304 }, |
| { 12, 0x1C, 2368 }, |
| { 12, 0x1D, 2432 }, |
| { 12, 0x1E, 2496 }, |
| { 12, 0x1F, 2560 }, |
| { 12, 0x1, G3CODE_EOL }, |
| { 9, 0x1, G3CODE_INVALID }, |
| { 10, 0x1, G3CODE_INVALID }, |
| { 11, 0x1, G3CODE_INVALID }, |
| { 12, 0x0, G3CODE_INVALID }, |
| }; |
| #else |
| extern const tableentry TIFFFaxWhiteCodes[]; |
| extern const tableentry TIFFFaxBlackCodes[]; |
| #endif |
| #endif |
| |
| |
| |
| |
| |
| |
| |