SmartPDF - lightweight pdf viewer app for rosapps
[reactos.git] / rosapps / smartpdf / fitz / stream / filt_faxetab.c
1 /* Tables for CCITTFaxEncode filter */
2
3 #include "filt_faxe.h"
4
5 /* Define the end-of-line code. */
6 const cfe_code cf_run_eol = {1, 12};
7
8 /* Define the 1-D code that signals uncompressed data. */
9 const cfe_code cf1_run_uncompressed = {0xf, 12};
10
11 /* Define the 2-D run codes. */
12 const cfe_code cf2_run_pass = {0x1, 4};
13 const cfe_code cf2_run_vertical[7] =
14 {
15 {0x3, 7},
16 {0x3, 6},
17 {0x3, 3},
18 {0x1, 1},
19 {0x2, 3},
20 {0x2, 6},
21 {0x2, 7}
22 };
23 const cfe_code cf2_run_horizontal = {1, 3};
24 const cfe_code cf2_run_uncompressed = {0xf, 10};
25
26 /* EOL codes for Group 3 2-D. */
27 const cfe_code cf2_run_eol_1d = { (1 << 1) + 1, 12 + 1};
28 const cfe_code cf2_run_eol_2d = { (1 << 1) + 0, 12 + 1};
29
30 /* White run codes. */
31 const cf_runs cf_white_runs =
32 {
33 /* Termination codes */
34 {
35 {0x35, 8}, {0x7, 6}, {0x7, 4}, {0x8, 4},
36 {0xb, 4}, {0xc, 4}, {0xe, 4}, {0xf, 4},
37 {0x13, 5}, {0x14, 5}, {0x7, 5}, {0x8, 5},
38 {0x8, 6}, {0x3, 6}, {0x34, 6}, {0x35, 6},
39 {0x2a, 6}, {0x2b, 6}, {0x27, 7}, {0xc, 7},
40 {0x8, 7}, {0x17, 7}, {0x3, 7}, {0x4, 7},
41 {0x28, 7}, {0x2b, 7}, {0x13, 7}, {0x24, 7},
42 {0x18, 7}, {0x2, 8}, {0x3, 8}, {0x1a, 8},
43 {0x1b, 8}, {0x12, 8}, {0x13, 8}, {0x14, 8},
44 {0x15, 8}, {0x16, 8}, {0x17, 8}, {0x28, 8},
45 {0x29, 8}, {0x2a, 8}, {0x2b, 8}, {0x2c, 8},
46 {0x2d, 8}, {0x4, 8}, {0x5, 8}, {0xa, 8},
47 {0xb, 8}, {0x52, 8}, {0x53, 8}, {0x54, 8},
48 {0x55, 8}, {0x24, 8}, {0x25, 8}, {0x58, 8},
49 {0x59, 8}, {0x5a, 8}, {0x5b, 8}, {0x4a, 8},
50 {0x4b, 8}, {0x32, 8}, {0x33, 8}, {0x34, 8}
51 },
52
53 /* Make-up codes */
54 {
55 {0, 0} /* dummy */ , {0x1b, 5}, {0x12, 5}, {0x17, 6},
56 {0x37, 7}, {0x36, 8}, {0x37, 8}, {0x64, 8},
57 {0x65, 8}, {0x68, 8}, {0x67, 8}, {0xcc, 9},
58 {0xcd, 9}, {0xd2, 9}, {0xd3, 9}, {0xd4, 9},
59 {0xd5, 9}, {0xd6, 9}, {0xd7, 9}, {0xd8, 9},
60 {0xd9, 9}, {0xda, 9}, {0xdb, 9}, {0x98, 9},
61 {0x99, 9}, {0x9a, 9}, {0x18, 6}, {0x9b, 9},
62 {0x8, 11}, {0xc, 11}, {0xd, 11}, {0x12, 12},
63 {0x13, 12}, {0x14, 12}, {0x15, 12}, {0x16, 12},
64 {0x17, 12}, {0x1c, 12}, {0x1d, 12}, {0x1e, 12},
65 {0x1f, 12}
66 }
67 };
68
69 /* Black run codes. */
70 const cf_runs cf_black_runs =
71 {
72 /* Termination codes */
73 {
74 {0x37, 10}, {0x2, 3}, {0x3, 2}, {0x2, 2},
75 {0x3, 3}, {0x3, 4}, {0x2, 4}, {0x3, 5},
76 {0x5, 6}, {0x4, 6}, {0x4, 7}, {0x5, 7},
77 {0x7, 7}, {0x4, 8}, {0x7, 8}, {0x18, 9},
78 {0x17, 10}, {0x18, 10}, {0x8, 10}, {0x67, 11},
79 {0x68, 11}, {0x6c, 11}, {0x37, 11}, {0x28, 11},
80 {0x17, 11}, {0x18, 11}, {0xca, 12}, {0xcb, 12},
81 {0xcc, 12}, {0xcd, 12}, {0x68, 12}, {0x69, 12},
82 {0x6a, 12}, {0x6b, 12}, {0xd2, 12}, {0xd3, 12},
83 {0xd4, 12}, {0xd5, 12}, {0xd6, 12}, {0xd7, 12},
84 {0x6c, 12}, {0x6d, 12}, {0xda, 12}, {0xdb, 12},
85 {0x54, 12}, {0x55, 12}, {0x56, 12}, {0x57, 12},
86 {0x64, 12}, {0x65, 12}, {0x52, 12}, {0x53, 12},
87 {0x24, 12}, {0x37, 12}, {0x38, 12}, {0x27, 12},
88 {0x28, 12}, {0x58, 12}, {0x59, 12}, {0x2b, 12},
89 {0x2c, 12}, {0x5a, 12}, {0x66, 12}, {0x67, 12}
90 },
91
92 /* Make-up codes. */
93 {
94 {0, 0} /* dummy */ , {0xf, 10}, {0xc8, 12}, {0xc9, 12},
95 {0x5b, 12}, {0x33, 12}, {0x34, 12}, {0x35, 12},
96 {0x6c, 13}, {0x6d, 13}, {0x4a, 13}, {0x4b, 13},
97 {0x4c, 13}, {0x4d, 13}, {0x72, 13}, {0x73, 13},
98 {0x74, 13}, {0x75, 13}, {0x76, 13}, {0x77, 13},
99 {0x52, 13}, {0x53, 13}, {0x54, 13}, {0x55, 13},
100 {0x5a, 13}, {0x5b, 13}, {0x64, 13}, {0x65, 13},
101 {0x8, 11}, {0xc, 11}, {0xd, 11}, {0x12, 12},
102 {0x13, 12}, {0x14, 12}, {0x15, 12}, {0x16, 12},
103 {0x17, 12}, {0x1c, 12}, {0x1d, 12}, {0x1e, 12},
104 {0x1f, 12}
105 }
106 };
107
108 /* Uncompressed codes. */
109 const cfe_code cf_uncompressed[6] =
110 {
111 {1, 1},
112 {1, 2},
113 {1, 3},
114 {1, 4},
115 {1, 5},
116 {1, 6}
117 };
118
119 /* Uncompressed exit codes. */
120 const cfe_code cf_uncompressed_exit[10] =
121 {
122 {2, 8}, {3, 8},
123 {2, 9}, {3, 9},
124 {2, 10}, {3, 10},
125 {2, 11}, {3, 11},
126 {2, 12}, {3, 12}
127 };
128
129 /* Some C compilers insist on having executable code in every file.... */
130 void scfetab_dummy(void) { }
131