Leptonica  1.77.0
Image processing and image analysis suite
dwacomblow.2.c
1 /*====================================================================*
2  - Copyright (C) 2001 Leptonica. All rights reserved.
3  -
4  - Redistribution and use in source and binary forms, with or without
5  - modification, are permitted provided that the following conditions
6  - are met:
7  - 1. Redistributions of source code must retain the above copyright
8  - notice, this list of conditions and the following disclaimer.
9  - 2. Redistributions in binary form must reproduce the above
10  - copyright notice, this list of conditions and the following
11  - disclaimer in the documentation and/or other materials
12  - provided with the distribution.
13  -
14  - THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
15  - ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
16  - LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
17  - A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL ANY
18  - CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
19  - EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
20  - PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
21  - PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
22  - OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
23  - NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
24  - SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25  *====================================================================*/
26 
38 #include "allheaders.h"
39 
40 static void fdilate_2_0(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
41 static void ferode_2_0(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
42 static void fdilate_2_1(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
43 static void ferode_2_1(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
44 static void fdilate_2_2(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
45 static void ferode_2_2(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
46 static void fdilate_2_3(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
47 static void ferode_2_3(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
48 static void fdilate_2_4(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
49 static void ferode_2_4(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
50 static void fdilate_2_5(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
51 static void ferode_2_5(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
52 static void fdilate_2_6(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
53 static void ferode_2_6(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
54 static void fdilate_2_7(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
55 static void ferode_2_7(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
56 static void fdilate_2_8(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
57 static void ferode_2_8(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
58 static void fdilate_2_9(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
59 static void ferode_2_9(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
60 static void fdilate_2_10(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
61 static void ferode_2_10(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
62 static void fdilate_2_11(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
63 static void ferode_2_11(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
64 static void fdilate_2_12(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
65 static void ferode_2_12(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
66 static void fdilate_2_13(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
67 static void ferode_2_13(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
68 static void fdilate_2_14(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
69 static void ferode_2_14(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
70 static void fdilate_2_15(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
71 static void ferode_2_15(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
72 static void fdilate_2_16(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
73 static void ferode_2_16(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
74 static void fdilate_2_17(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
75 static void ferode_2_17(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
76 static void fdilate_2_18(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
77 static void ferode_2_18(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
78 static void fdilate_2_19(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
79 static void ferode_2_19(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
80 static void fdilate_2_20(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
81 static void ferode_2_20(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
82 static void fdilate_2_21(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
83 static void ferode_2_21(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
84 static void fdilate_2_22(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
85 static void ferode_2_22(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
86 static void fdilate_2_23(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
87 static void ferode_2_23(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
88 static void fdilate_2_24(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
89 static void ferode_2_24(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
90 static void fdilate_2_25(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
91 static void ferode_2_25(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
92 static void fdilate_2_26(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
93 static void ferode_2_26(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
94 static void fdilate_2_27(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
95 static void ferode_2_27(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
96 static void fdilate_2_28(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
97 static void ferode_2_28(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
98 static void fdilate_2_29(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
99 static void ferode_2_29(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
100 static void fdilate_2_30(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
101 static void ferode_2_30(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
102 static void fdilate_2_31(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
103 static void ferode_2_31(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
104 static void fdilate_2_32(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
105 static void ferode_2_32(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
106 static void fdilate_2_33(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
107 static void ferode_2_33(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
108 static void fdilate_2_34(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
109 static void ferode_2_34(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
110 static void fdilate_2_35(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
111 static void ferode_2_35(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
112 static void fdilate_2_36(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
113 static void ferode_2_36(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
114 static void fdilate_2_37(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
115 static void ferode_2_37(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
116 static void fdilate_2_38(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
117 static void ferode_2_38(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
118 static void fdilate_2_39(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
119 static void ferode_2_39(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
120 static void fdilate_2_40(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
121 static void ferode_2_40(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
122 static void fdilate_2_41(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
123 static void ferode_2_41(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
124 static void fdilate_2_42(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
125 static void ferode_2_42(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
126 static void fdilate_2_43(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
127 static void ferode_2_43(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
128 static void fdilate_2_44(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
129 static void ferode_2_44(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
130 static void fdilate_2_45(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
131 static void ferode_2_45(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
132 static void fdilate_2_46(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
133 static void ferode_2_46(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
134 static void fdilate_2_47(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
135 static void ferode_2_47(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
136 static void fdilate_2_48(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
137 static void ferode_2_48(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
138 static void fdilate_2_49(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
139 static void ferode_2_49(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
140 static void fdilate_2_50(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
141 static void ferode_2_50(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
142 static void fdilate_2_51(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
143 static void ferode_2_51(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
144 static void fdilate_2_52(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
145 static void ferode_2_52(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
146 static void fdilate_2_53(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
147 static void ferode_2_53(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
148 static void fdilate_2_54(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
149 static void ferode_2_54(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
150 static void fdilate_2_55(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
151 static void ferode_2_55(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
152 static void fdilate_2_56(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
153 static void ferode_2_56(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
154 static void fdilate_2_57(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
155 static void ferode_2_57(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
156 static void fdilate_2_58(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
157 static void ferode_2_58(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
158 static void fdilate_2_59(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
159 static void ferode_2_59(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
160 static void fdilate_2_60(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
161 static void ferode_2_60(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
162 static void fdilate_2_61(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
163 static void ferode_2_61(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
164 static void fdilate_2_62(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
165 static void ferode_2_62(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
166 static void fdilate_2_63(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
167 static void ferode_2_63(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
168 static void fdilate_2_64(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
169 static void ferode_2_64(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
170 static void fdilate_2_65(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
171 static void ferode_2_65(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
172 static void fdilate_2_66(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
173 static void ferode_2_66(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
174 static void fdilate_2_67(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
175 static void ferode_2_67(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
176 static void fdilate_2_68(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
177 static void ferode_2_68(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
178 static void fdilate_2_69(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
179 static void ferode_2_69(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
180 static void fdilate_2_70(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
181 static void ferode_2_70(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
182 static void fdilate_2_71(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
183 static void ferode_2_71(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
184 static void fdilate_2_72(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
185 static void ferode_2_72(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
186 static void fdilate_2_73(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
187 static void ferode_2_73(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
188 static void fdilate_2_74(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
189 static void ferode_2_74(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
190 static void fdilate_2_75(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
191 static void ferode_2_75(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
192 
193 
194 /*---------------------------------------------------------------------*
195  * Fast morph dispatcher *
196  *---------------------------------------------------------------------*/
202 l_int32
203 fmorphopgen_low_2(l_uint32 *datad,
204  l_int32 w,
205  l_int32 h,
206  l_int32 wpld,
207  l_uint32 *datas,
208  l_int32 wpls,
209  l_int32 index)
210 {
211 
212  switch (index)
213  {
214  case 0:
215  fdilate_2_0(datad, w, h, wpld, datas, wpls);
216  break;
217  case 1:
218  ferode_2_0(datad, w, h, wpld, datas, wpls);
219  break;
220  case 2:
221  fdilate_2_1(datad, w, h, wpld, datas, wpls);
222  break;
223  case 3:
224  ferode_2_1(datad, w, h, wpld, datas, wpls);
225  break;
226  case 4:
227  fdilate_2_2(datad, w, h, wpld, datas, wpls);
228  break;
229  case 5:
230  ferode_2_2(datad, w, h, wpld, datas, wpls);
231  break;
232  case 6:
233  fdilate_2_3(datad, w, h, wpld, datas, wpls);
234  break;
235  case 7:
236  ferode_2_3(datad, w, h, wpld, datas, wpls);
237  break;
238  case 8:
239  fdilate_2_4(datad, w, h, wpld, datas, wpls);
240  break;
241  case 9:
242  ferode_2_4(datad, w, h, wpld, datas, wpls);
243  break;
244  case 10:
245  fdilate_2_5(datad, w, h, wpld, datas, wpls);
246  break;
247  case 11:
248  ferode_2_5(datad, w, h, wpld, datas, wpls);
249  break;
250  case 12:
251  fdilate_2_6(datad, w, h, wpld, datas, wpls);
252  break;
253  case 13:
254  ferode_2_6(datad, w, h, wpld, datas, wpls);
255  break;
256  case 14:
257  fdilate_2_7(datad, w, h, wpld, datas, wpls);
258  break;
259  case 15:
260  ferode_2_7(datad, w, h, wpld, datas, wpls);
261  break;
262  case 16:
263  fdilate_2_8(datad, w, h, wpld, datas, wpls);
264  break;
265  case 17:
266  ferode_2_8(datad, w, h, wpld, datas, wpls);
267  break;
268  case 18:
269  fdilate_2_9(datad, w, h, wpld, datas, wpls);
270  break;
271  case 19:
272  ferode_2_9(datad, w, h, wpld, datas, wpls);
273  break;
274  case 20:
275  fdilate_2_10(datad, w, h, wpld, datas, wpls);
276  break;
277  case 21:
278  ferode_2_10(datad, w, h, wpld, datas, wpls);
279  break;
280  case 22:
281  fdilate_2_11(datad, w, h, wpld, datas, wpls);
282  break;
283  case 23:
284  ferode_2_11(datad, w, h, wpld, datas, wpls);
285  break;
286  case 24:
287  fdilate_2_12(datad, w, h, wpld, datas, wpls);
288  break;
289  case 25:
290  ferode_2_12(datad, w, h, wpld, datas, wpls);
291  break;
292  case 26:
293  fdilate_2_13(datad, w, h, wpld, datas, wpls);
294  break;
295  case 27:
296  ferode_2_13(datad, w, h, wpld, datas, wpls);
297  break;
298  case 28:
299  fdilate_2_14(datad, w, h, wpld, datas, wpls);
300  break;
301  case 29:
302  ferode_2_14(datad, w, h, wpld, datas, wpls);
303  break;
304  case 30:
305  fdilate_2_15(datad, w, h, wpld, datas, wpls);
306  break;
307  case 31:
308  ferode_2_15(datad, w, h, wpld, datas, wpls);
309  break;
310  case 32:
311  fdilate_2_16(datad, w, h, wpld, datas, wpls);
312  break;
313  case 33:
314  ferode_2_16(datad, w, h, wpld, datas, wpls);
315  break;
316  case 34:
317  fdilate_2_17(datad, w, h, wpld, datas, wpls);
318  break;
319  case 35:
320  ferode_2_17(datad, w, h, wpld, datas, wpls);
321  break;
322  case 36:
323  fdilate_2_18(datad, w, h, wpld, datas, wpls);
324  break;
325  case 37:
326  ferode_2_18(datad, w, h, wpld, datas, wpls);
327  break;
328  case 38:
329  fdilate_2_19(datad, w, h, wpld, datas, wpls);
330  break;
331  case 39:
332  ferode_2_19(datad, w, h, wpld, datas, wpls);
333  break;
334  case 40:
335  fdilate_2_20(datad, w, h, wpld, datas, wpls);
336  break;
337  case 41:
338  ferode_2_20(datad, w, h, wpld, datas, wpls);
339  break;
340  case 42:
341  fdilate_2_21(datad, w, h, wpld, datas, wpls);
342  break;
343  case 43:
344  ferode_2_21(datad, w, h, wpld, datas, wpls);
345  break;
346  case 44:
347  fdilate_2_22(datad, w, h, wpld, datas, wpls);
348  break;
349  case 45:
350  ferode_2_22(datad, w, h, wpld, datas, wpls);
351  break;
352  case 46:
353  fdilate_2_23(datad, w, h, wpld, datas, wpls);
354  break;
355  case 47:
356  ferode_2_23(datad, w, h, wpld, datas, wpls);
357  break;
358  case 48:
359  fdilate_2_24(datad, w, h, wpld, datas, wpls);
360  break;
361  case 49:
362  ferode_2_24(datad, w, h, wpld, datas, wpls);
363  break;
364  case 50:
365  fdilate_2_25(datad, w, h, wpld, datas, wpls);
366  break;
367  case 51:
368  ferode_2_25(datad, w, h, wpld, datas, wpls);
369  break;
370  case 52:
371  fdilate_2_26(datad, w, h, wpld, datas, wpls);
372  break;
373  case 53:
374  ferode_2_26(datad, w, h, wpld, datas, wpls);
375  break;
376  case 54:
377  fdilate_2_27(datad, w, h, wpld, datas, wpls);
378  break;
379  case 55:
380  ferode_2_27(datad, w, h, wpld, datas, wpls);
381  break;
382  case 56:
383  fdilate_2_28(datad, w, h, wpld, datas, wpls);
384  break;
385  case 57:
386  ferode_2_28(datad, w, h, wpld, datas, wpls);
387  break;
388  case 58:
389  fdilate_2_29(datad, w, h, wpld, datas, wpls);
390  break;
391  case 59:
392  ferode_2_29(datad, w, h, wpld, datas, wpls);
393  break;
394  case 60:
395  fdilate_2_30(datad, w, h, wpld, datas, wpls);
396  break;
397  case 61:
398  ferode_2_30(datad, w, h, wpld, datas, wpls);
399  break;
400  case 62:
401  fdilate_2_31(datad, w, h, wpld, datas, wpls);
402  break;
403  case 63:
404  ferode_2_31(datad, w, h, wpld, datas, wpls);
405  break;
406  case 64:
407  fdilate_2_32(datad, w, h, wpld, datas, wpls);
408  break;
409  case 65:
410  ferode_2_32(datad, w, h, wpld, datas, wpls);
411  break;
412  case 66:
413  fdilate_2_33(datad, w, h, wpld, datas, wpls);
414  break;
415  case 67:
416  ferode_2_33(datad, w, h, wpld, datas, wpls);
417  break;
418  case 68:
419  fdilate_2_34(datad, w, h, wpld, datas, wpls);
420  break;
421  case 69:
422  ferode_2_34(datad, w, h, wpld, datas, wpls);
423  break;
424  case 70:
425  fdilate_2_35(datad, w, h, wpld, datas, wpls);
426  break;
427  case 71:
428  ferode_2_35(datad, w, h, wpld, datas, wpls);
429  break;
430  case 72:
431  fdilate_2_36(datad, w, h, wpld, datas, wpls);
432  break;
433  case 73:
434  ferode_2_36(datad, w, h, wpld, datas, wpls);
435  break;
436  case 74:
437  fdilate_2_37(datad, w, h, wpld, datas, wpls);
438  break;
439  case 75:
440  ferode_2_37(datad, w, h, wpld, datas, wpls);
441  break;
442  case 76:
443  fdilate_2_38(datad, w, h, wpld, datas, wpls);
444  break;
445  case 77:
446  ferode_2_38(datad, w, h, wpld, datas, wpls);
447  break;
448  case 78:
449  fdilate_2_39(datad, w, h, wpld, datas, wpls);
450  break;
451  case 79:
452  ferode_2_39(datad, w, h, wpld, datas, wpls);
453  break;
454  case 80:
455  fdilate_2_40(datad, w, h, wpld, datas, wpls);
456  break;
457  case 81:
458  ferode_2_40(datad, w, h, wpld, datas, wpls);
459  break;
460  case 82:
461  fdilate_2_41(datad, w, h, wpld, datas, wpls);
462  break;
463  case 83:
464  ferode_2_41(datad, w, h, wpld, datas, wpls);
465  break;
466  case 84:
467  fdilate_2_42(datad, w, h, wpld, datas, wpls);
468  break;
469  case 85:
470  ferode_2_42(datad, w, h, wpld, datas, wpls);
471  break;
472  case 86:
473  fdilate_2_43(datad, w, h, wpld, datas, wpls);
474  break;
475  case 87:
476  ferode_2_43(datad, w, h, wpld, datas, wpls);
477  break;
478  case 88:
479  fdilate_2_44(datad, w, h, wpld, datas, wpls);
480  break;
481  case 89:
482  ferode_2_44(datad, w, h, wpld, datas, wpls);
483  break;
484  case 90:
485  fdilate_2_45(datad, w, h, wpld, datas, wpls);
486  break;
487  case 91:
488  ferode_2_45(datad, w, h, wpld, datas, wpls);
489  break;
490  case 92:
491  fdilate_2_46(datad, w, h, wpld, datas, wpls);
492  break;
493  case 93:
494  ferode_2_46(datad, w, h, wpld, datas, wpls);
495  break;
496  case 94:
497  fdilate_2_47(datad, w, h, wpld, datas, wpls);
498  break;
499  case 95:
500  ferode_2_47(datad, w, h, wpld, datas, wpls);
501  break;
502  case 96:
503  fdilate_2_48(datad, w, h, wpld, datas, wpls);
504  break;
505  case 97:
506  ferode_2_48(datad, w, h, wpld, datas, wpls);
507  break;
508  case 98:
509  fdilate_2_49(datad, w, h, wpld, datas, wpls);
510  break;
511  case 99:
512  ferode_2_49(datad, w, h, wpld, datas, wpls);
513  break;
514  case 100:
515  fdilate_2_50(datad, w, h, wpld, datas, wpls);
516  break;
517  case 101:
518  ferode_2_50(datad, w, h, wpld, datas, wpls);
519  break;
520  case 102:
521  fdilate_2_51(datad, w, h, wpld, datas, wpls);
522  break;
523  case 103:
524  ferode_2_51(datad, w, h, wpld, datas, wpls);
525  break;
526  case 104:
527  fdilate_2_52(datad, w, h, wpld, datas, wpls);
528  break;
529  case 105:
530  ferode_2_52(datad, w, h, wpld, datas, wpls);
531  break;
532  case 106:
533  fdilate_2_53(datad, w, h, wpld, datas, wpls);
534  break;
535  case 107:
536  ferode_2_53(datad, w, h, wpld, datas, wpls);
537  break;
538  case 108:
539  fdilate_2_54(datad, w, h, wpld, datas, wpls);
540  break;
541  case 109:
542  ferode_2_54(datad, w, h, wpld, datas, wpls);
543  break;
544  case 110:
545  fdilate_2_55(datad, w, h, wpld, datas, wpls);
546  break;
547  case 111:
548  ferode_2_55(datad, w, h, wpld, datas, wpls);
549  break;
550  case 112:
551  fdilate_2_56(datad, w, h, wpld, datas, wpls);
552  break;
553  case 113:
554  ferode_2_56(datad, w, h, wpld, datas, wpls);
555  break;
556  case 114:
557  fdilate_2_57(datad, w, h, wpld, datas, wpls);
558  break;
559  case 115:
560  ferode_2_57(datad, w, h, wpld, datas, wpls);
561  break;
562  case 116:
563  fdilate_2_58(datad, w, h, wpld, datas, wpls);
564  break;
565  case 117:
566  ferode_2_58(datad, w, h, wpld, datas, wpls);
567  break;
568  case 118:
569  fdilate_2_59(datad, w, h, wpld, datas, wpls);
570  break;
571  case 119:
572  ferode_2_59(datad, w, h, wpld, datas, wpls);
573  break;
574  case 120:
575  fdilate_2_60(datad, w, h, wpld, datas, wpls);
576  break;
577  case 121:
578  ferode_2_60(datad, w, h, wpld, datas, wpls);
579  break;
580  case 122:
581  fdilate_2_61(datad, w, h, wpld, datas, wpls);
582  break;
583  case 123:
584  ferode_2_61(datad, w, h, wpld, datas, wpls);
585  break;
586  case 124:
587  fdilate_2_62(datad, w, h, wpld, datas, wpls);
588  break;
589  case 125:
590  ferode_2_62(datad, w, h, wpld, datas, wpls);
591  break;
592  case 126:
593  fdilate_2_63(datad, w, h, wpld, datas, wpls);
594  break;
595  case 127:
596  ferode_2_63(datad, w, h, wpld, datas, wpls);
597  break;
598  case 128:
599  fdilate_2_64(datad, w, h, wpld, datas, wpls);
600  break;
601  case 129:
602  ferode_2_64(datad, w, h, wpld, datas, wpls);
603  break;
604  case 130:
605  fdilate_2_65(datad, w, h, wpld, datas, wpls);
606  break;
607  case 131:
608  ferode_2_65(datad, w, h, wpld, datas, wpls);
609  break;
610  case 132:
611  fdilate_2_66(datad, w, h, wpld, datas, wpls);
612  break;
613  case 133:
614  ferode_2_66(datad, w, h, wpld, datas, wpls);
615  break;
616  case 134:
617  fdilate_2_67(datad, w, h, wpld, datas, wpls);
618  break;
619  case 135:
620  ferode_2_67(datad, w, h, wpld, datas, wpls);
621  break;
622  case 136:
623  fdilate_2_68(datad, w, h, wpld, datas, wpls);
624  break;
625  case 137:
626  ferode_2_68(datad, w, h, wpld, datas, wpls);
627  break;
628  case 138:
629  fdilate_2_69(datad, w, h, wpld, datas, wpls);
630  break;
631  case 139:
632  ferode_2_69(datad, w, h, wpld, datas, wpls);
633  break;
634  case 140:
635  fdilate_2_70(datad, w, h, wpld, datas, wpls);
636  break;
637  case 141:
638  ferode_2_70(datad, w, h, wpld, datas, wpls);
639  break;
640  case 142:
641  fdilate_2_71(datad, w, h, wpld, datas, wpls);
642  break;
643  case 143:
644  ferode_2_71(datad, w, h, wpld, datas, wpls);
645  break;
646  case 144:
647  fdilate_2_72(datad, w, h, wpld, datas, wpls);
648  break;
649  case 145:
650  ferode_2_72(datad, w, h, wpld, datas, wpls);
651  break;
652  case 146:
653  fdilate_2_73(datad, w, h, wpld, datas, wpls);
654  break;
655  case 147:
656  ferode_2_73(datad, w, h, wpld, datas, wpls);
657  break;
658  case 148:
659  fdilate_2_74(datad, w, h, wpld, datas, wpls);
660  break;
661  case 149:
662  ferode_2_74(datad, w, h, wpld, datas, wpls);
663  break;
664  case 150:
665  fdilate_2_75(datad, w, h, wpld, datas, wpls);
666  break;
667  case 151:
668  ferode_2_75(datad, w, h, wpld, datas, wpls);
669  break;
670  }
671 
672  return 0;
673 }
674 
675 
676 /*--------------------------------------------------------------------------*
677  * Low-level auto-generated static routines *
678  *--------------------------------------------------------------------------*/
679 /*
680  * N.B. In all the low-level routines, the part of the image
681  * that is accessed has been clipped by 32 pixels on
682  * all four sides. This is done in the higher level
683  * code by redefining w and h smaller and by moving the
684  * start-of-image pointers up to the beginning of this
685  * interior rectangle.
686  */
687 static void
688 fdilate_2_0(l_uint32 *datad,
689  l_int32 w,
690  l_int32 h,
691  l_int32 wpld,
692  l_uint32 *datas,
693  l_int32 wpls)
694 {
695 l_int32 i;
696 register l_int32 j, pwpls;
697 register l_uint32 *sptr, *dptr;
698 
699  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
700 
701  for (i = 0; i < h; i++) {
702  sptr = datas + i * wpls;
703  dptr = datad + i * wpld;
704  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
705  *dptr = ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
706  ((*(sptr) >> 1) | (*(sptr - 1) << 31));
707  }
708  }
709 }
710 
711 static void
712 ferode_2_0(l_uint32 *datad,
713  l_int32 w,
714  l_int32 h,
715  l_int32 wpld,
716  l_uint32 *datas,
717  l_int32 wpls)
718 {
719 l_int32 i;
720 register l_int32 j, pwpls;
721 register l_uint32 *sptr, *dptr;
722 
723  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
724 
725  for (i = 0; i < h; i++) {
726  sptr = datas + i * wpls;
727  dptr = datad + i * wpld;
728  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
729  *dptr = ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
730  ((*(sptr) << 1) | (*(sptr + 1) >> 31));
731  }
732  }
733 }
734 
735 static void
736 fdilate_2_1(l_uint32 *datad,
737  l_int32 w,
738  l_int32 h,
739  l_int32 wpld,
740  l_uint32 *datas,
741  l_int32 wpls)
742 {
743 l_int32 i;
744 register l_int32 j, pwpls;
745 register l_uint32 *sptr, *dptr;
746 
747  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
748 
749  for (i = 0; i < h; i++) {
750  sptr = datas + i * wpls;
751  dptr = datad + i * wpld;
752  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
753  *dptr = (*(sptr + wpls)) |
754  (*(sptr - wpls));
755  }
756  }
757 }
758 
759 static void
760 ferode_2_1(l_uint32 *datad,
761  l_int32 w,
762  l_int32 h,
763  l_int32 wpld,
764  l_uint32 *datas,
765  l_int32 wpls)
766 {
767 l_int32 i;
768 register l_int32 j, pwpls;
769 register l_uint32 *sptr, *dptr;
770 
771  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
772 
773  for (i = 0; i < h; i++) {
774  sptr = datas + i * wpls;
775  dptr = datad + i * wpld;
776  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
777  *dptr = (*(sptr - wpls)) &
778  (*(sptr + wpls));
779  }
780  }
781 }
782 
783 static void
784 fdilate_2_2(l_uint32 *datad,
785  l_int32 w,
786  l_int32 h,
787  l_int32 wpld,
788  l_uint32 *datas,
789  l_int32 wpls)
790 {
791 l_int32 i;
792 register l_int32 j, pwpls;
793 register l_uint32 *sptr, *dptr;
794 
795  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
796 
797  for (i = 0; i < h; i++) {
798  sptr = datas + i * wpls;
799  dptr = datad + i * wpld;
800  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
801  *dptr = (*sptr);
802  }
803  }
804 }
805 
806 static void
807 ferode_2_2(l_uint32 *datad,
808  l_int32 w,
809  l_int32 h,
810  l_int32 wpld,
811  l_uint32 *datas,
812  l_int32 wpls)
813 {
814 l_int32 i;
815 register l_int32 j, pwpls;
816 register l_uint32 *sptr, *dptr;
817 
818  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
819 
820  for (i = 0; i < h; i++) {
821  sptr = datas + i * wpls;
822  dptr = datad + i * wpld;
823  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
824  *dptr = (*sptr);
825  }
826  }
827 }
828 
829 static void
830 fdilate_2_3(l_uint32 *datad,
831  l_int32 w,
832  l_int32 h,
833  l_int32 wpld,
834  l_uint32 *datas,
835  l_int32 wpls)
836 {
837 l_int32 i;
838 register l_int32 j, pwpls;
839 register l_uint32 *sptr, *dptr;
840 
841  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
842 
843  for (i = 0; i < h; i++) {
844  sptr = datas + i * wpls;
845  dptr = datad + i * wpld;
846  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
847  *dptr = (*sptr);
848  }
849  }
850 }
851 
852 static void
853 ferode_2_3(l_uint32 *datad,
854  l_int32 w,
855  l_int32 h,
856  l_int32 wpld,
857  l_uint32 *datas,
858  l_int32 wpls)
859 {
860 l_int32 i;
861 register l_int32 j, pwpls;
862 register l_uint32 *sptr, *dptr;
863 
864  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
865 
866  for (i = 0; i < h; i++) {
867  sptr = datas + i * wpls;
868  dptr = datad + i * wpld;
869  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
870  *dptr = (*sptr);
871  }
872  }
873 }
874 
875 static void
876 fdilate_2_4(l_uint32 *datad,
877  l_int32 w,
878  l_int32 h,
879  l_int32 wpld,
880  l_uint32 *datas,
881  l_int32 wpls)
882 {
883 l_int32 i;
884 register l_int32 j, pwpls;
885 register l_uint32 *sptr, *dptr;
886 
887  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
888 
889  for (i = 0; i < h; i++) {
890  sptr = datas + i * wpls;
891  dptr = datad + i * wpld;
892  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
893  *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
894  ((*(sptr) >> 1) | (*(sptr - 1) << 31));
895  }
896  }
897 }
898 
899 static void
900 ferode_2_4(l_uint32 *datad,
901  l_int32 w,
902  l_int32 h,
903  l_int32 wpld,
904  l_uint32 *datas,
905  l_int32 wpls)
906 {
907 l_int32 i;
908 register l_int32 j, pwpls;
909 register l_uint32 *sptr, *dptr;
910 
911  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
912 
913  for (i = 0; i < h; i++) {
914  sptr = datas + i * wpls;
915  dptr = datad + i * wpld;
916  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
917  *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
918  ((*(sptr) << 1) | (*(sptr + 1) >> 31));
919  }
920  }
921 }
922 
923 static void
924 fdilate_2_5(l_uint32 *datad,
925  l_int32 w,
926  l_int32 h,
927  l_int32 wpld,
928  l_uint32 *datas,
929  l_int32 wpls)
930 {
931 l_int32 i;
932 register l_int32 j, pwpls;
933 register l_uint32 *sptr, *dptr;
934 l_int32 wpls2;
935 
936  wpls2 = 2 * wpls;
937  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
938 
939  for (i = 0; i < h; i++) {
940  sptr = datas + i * wpls;
941  dptr = datad + i * wpld;
942  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
943  *dptr = (*(sptr + wpls2)) |
944  (*(sptr - wpls));
945  }
946  }
947 }
948 
949 static void
950 ferode_2_5(l_uint32 *datad,
951  l_int32 w,
952  l_int32 h,
953  l_int32 wpld,
954  l_uint32 *datas,
955  l_int32 wpls)
956 {
957 l_int32 i;
958 register l_int32 j, pwpls;
959 register l_uint32 *sptr, *dptr;
960 l_int32 wpls2;
961 
962  wpls2 = 2 * wpls;
963  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
964 
965  for (i = 0; i < h; i++) {
966  sptr = datas + i * wpls;
967  dptr = datad + i * wpld;
968  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
969  *dptr = (*(sptr - wpls2)) &
970  (*(sptr + wpls));
971  }
972  }
973 }
974 
975 static void
976 fdilate_2_6(l_uint32 *datad,
977  l_int32 w,
978  l_int32 h,
979  l_int32 wpld,
980  l_uint32 *datas,
981  l_int32 wpls)
982 {
983 l_int32 i;
984 register l_int32 j, pwpls;
985 register l_uint32 *sptr, *dptr;
986 
987  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
988 
989  for (i = 0; i < h; i++) {
990  sptr = datas + i * wpls;
991  dptr = datad + i * wpld;
992  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
993  *dptr = (*sptr);
994  }
995  }
996 }
997 
998 static void
999 ferode_2_6(l_uint32 *datad,
1000  l_int32 w,
1001  l_int32 h,
1002  l_int32 wpld,
1003  l_uint32 *datas,
1004  l_int32 wpls)
1005 {
1006 l_int32 i;
1007 register l_int32 j, pwpls;
1008 register l_uint32 *sptr, *dptr;
1009 
1010  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1011 
1012  for (i = 0; i < h; i++) {
1013  sptr = datas + i * wpls;
1014  dptr = datad + i * wpld;
1015  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1016  *dptr = (*sptr);
1017  }
1018  }
1019 }
1020 
1021 static void
1022 fdilate_2_7(l_uint32 *datad,
1023  l_int32 w,
1024  l_int32 h,
1025  l_int32 wpld,
1026  l_uint32 *datas,
1027  l_int32 wpls)
1028 {
1029 l_int32 i;
1030 register l_int32 j, pwpls;
1031 register l_uint32 *sptr, *dptr;
1032 
1033  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1034 
1035  for (i = 0; i < h; i++) {
1036  sptr = datas + i * wpls;
1037  dptr = datad + i * wpld;
1038  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1039  *dptr = (*sptr);
1040  }
1041  }
1042 }
1043 
1044 static void
1045 ferode_2_7(l_uint32 *datad,
1046  l_int32 w,
1047  l_int32 h,
1048  l_int32 wpld,
1049  l_uint32 *datas,
1050  l_int32 wpls)
1051 {
1052 l_int32 i;
1053 register l_int32 j, pwpls;
1054 register l_uint32 *sptr, *dptr;
1055 
1056  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1057 
1058  for (i = 0; i < h; i++) {
1059  sptr = datas + i * wpls;
1060  dptr = datad + i * wpld;
1061  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1062  *dptr = (*sptr);
1063  }
1064  }
1065 }
1066 
1067 static void
1068 fdilate_2_8(l_uint32 *datad,
1069  l_int32 w,
1070  l_int32 h,
1071  l_int32 wpld,
1072  l_uint32 *datas,
1073  l_int32 wpls)
1074 {
1075 l_int32 i;
1076 register l_int32 j, pwpls;
1077 register l_uint32 *sptr, *dptr;
1078 
1079  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1080 
1081  for (i = 0; i < h; i++) {
1082  sptr = datas + i * wpls;
1083  dptr = datad + i * wpld;
1084  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1085  *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
1086  ((*(sptr) >> 2) | (*(sptr - 1) << 30));
1087  }
1088  }
1089 }
1090 
1091 static void
1092 ferode_2_8(l_uint32 *datad,
1093  l_int32 w,
1094  l_int32 h,
1095  l_int32 wpld,
1096  l_uint32 *datas,
1097  l_int32 wpls)
1098 {
1099 l_int32 i;
1100 register l_int32 j, pwpls;
1101 register l_uint32 *sptr, *dptr;
1102 
1103  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1104 
1105  for (i = 0; i < h; i++) {
1106  sptr = datas + i * wpls;
1107  dptr = datad + i * wpld;
1108  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1109  *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
1110  ((*(sptr) << 2) | (*(sptr + 1) >> 30));
1111  }
1112  }
1113 }
1114 
1115 static void
1116 fdilate_2_9(l_uint32 *datad,
1117  l_int32 w,
1118  l_int32 h,
1119  l_int32 wpld,
1120  l_uint32 *datas,
1121  l_int32 wpls)
1122 {
1123 l_int32 i;
1124 register l_int32 j, pwpls;
1125 register l_uint32 *sptr, *dptr;
1126 l_int32 wpls2;
1127 
1128  wpls2 = 2 * wpls;
1129  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1130 
1131  for (i = 0; i < h; i++) {
1132  sptr = datas + i * wpls;
1133  dptr = datad + i * wpld;
1134  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1135  *dptr = (*(sptr + wpls2)) |
1136  (*(sptr - wpls2));
1137  }
1138  }
1139 }
1140 
1141 static void
1142 ferode_2_9(l_uint32 *datad,
1143  l_int32 w,
1144  l_int32 h,
1145  l_int32 wpld,
1146  l_uint32 *datas,
1147  l_int32 wpls)
1148 {
1149 l_int32 i;
1150 register l_int32 j, pwpls;
1151 register l_uint32 *sptr, *dptr;
1152 l_int32 wpls2;
1153 
1154  wpls2 = 2 * wpls;
1155  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1156 
1157  for (i = 0; i < h; i++) {
1158  sptr = datas + i * wpls;
1159  dptr = datad + i * wpld;
1160  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1161  *dptr = (*(sptr - wpls2)) &
1162  (*(sptr + wpls2));
1163  }
1164  }
1165 }
1166 
1167 static void
1168 fdilate_2_10(l_uint32 *datad,
1169  l_int32 w,
1170  l_int32 h,
1171  l_int32 wpld,
1172  l_uint32 *datas,
1173  l_int32 wpls)
1174 {
1175 l_int32 i;
1176 register l_int32 j, pwpls;
1177 register l_uint32 *sptr, *dptr;
1178 
1179  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1180 
1181  for (i = 0; i < h; i++) {
1182  sptr = datas + i * wpls;
1183  dptr = datad + i * wpld;
1184  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1185  *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
1186  (*sptr) |
1187  ((*(sptr) >> 3) | (*(sptr - 1) << 29));
1188  }
1189  }
1190 }
1191 
1192 static void
1193 ferode_2_10(l_uint32 *datad,
1194  l_int32 w,
1195  l_int32 h,
1196  l_int32 wpld,
1197  l_uint32 *datas,
1198  l_int32 wpls)
1199 {
1200 l_int32 i;
1201 register l_int32 j, pwpls;
1202 register l_uint32 *sptr, *dptr;
1203 
1204  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1205 
1206  for (i = 0; i < h; i++) {
1207  sptr = datas + i * wpls;
1208  dptr = datad + i * wpld;
1209  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1210  *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
1211  (*sptr) &
1212  ((*(sptr) << 3) | (*(sptr + 1) >> 29));
1213  }
1214  }
1215 }
1216 
1217 static void
1218 fdilate_2_11(l_uint32 *datad,
1219  l_int32 w,
1220  l_int32 h,
1221  l_int32 wpld,
1222  l_uint32 *datas,
1223  l_int32 wpls)
1224 {
1225 l_int32 i;
1226 register l_int32 j, pwpls;
1227 register l_uint32 *sptr, *dptr;
1228 l_int32 wpls3;
1229 
1230  wpls3 = 3 * wpls;
1231  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1232 
1233  for (i = 0; i < h; i++) {
1234  sptr = datas + i * wpls;
1235  dptr = datad + i * wpld;
1236  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1237  *dptr = (*(sptr + wpls3)) |
1238  (*sptr) |
1239  (*(sptr - wpls3));
1240  }
1241  }
1242 }
1243 
1244 static void
1245 ferode_2_11(l_uint32 *datad,
1246  l_int32 w,
1247  l_int32 h,
1248  l_int32 wpld,
1249  l_uint32 *datas,
1250  l_int32 wpls)
1251 {
1252 l_int32 i;
1253 register l_int32 j, pwpls;
1254 register l_uint32 *sptr, *dptr;
1255 l_int32 wpls3;
1256 
1257  wpls3 = 3 * wpls;
1258  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1259 
1260  for (i = 0; i < h; i++) {
1261  sptr = datas + i * wpls;
1262  dptr = datad + i * wpld;
1263  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1264  *dptr = (*(sptr - wpls3)) &
1265  (*sptr) &
1266  (*(sptr + wpls3));
1267  }
1268  }
1269 }
1270 
1271 static void
1272 fdilate_2_12(l_uint32 *datad,
1273  l_int32 w,
1274  l_int32 h,
1275  l_int32 wpld,
1276  l_uint32 *datas,
1277  l_int32 wpls)
1278 {
1279 l_int32 i;
1280 register l_int32 j, pwpls;
1281 register l_uint32 *sptr, *dptr;
1282 
1283  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1284 
1285  for (i = 0; i < h; i++) {
1286  sptr = datas + i * wpls;
1287  dptr = datad + i * wpld;
1288  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1289  *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
1290  ((*(sptr) >> 2) | (*(sptr - 1) << 30));
1291  }
1292  }
1293 }
1294 
1295 static void
1296 ferode_2_12(l_uint32 *datad,
1297  l_int32 w,
1298  l_int32 h,
1299  l_int32 wpld,
1300  l_uint32 *datas,
1301  l_int32 wpls)
1302 {
1303 l_int32 i;
1304 register l_int32 j, pwpls;
1305 register l_uint32 *sptr, *dptr;
1306 
1307  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1308 
1309  for (i = 0; i < h; i++) {
1310  sptr = datas + i * wpls;
1311  dptr = datad + i * wpld;
1312  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1313  *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
1314  ((*(sptr) << 2) | (*(sptr + 1) >> 30));
1315  }
1316  }
1317 }
1318 
1319 static void
1320 fdilate_2_13(l_uint32 *datad,
1321  l_int32 w,
1322  l_int32 h,
1323  l_int32 wpld,
1324  l_uint32 *datas,
1325  l_int32 wpls)
1326 {
1327 l_int32 i;
1328 register l_int32 j, pwpls;
1329 register l_uint32 *sptr, *dptr;
1330 l_int32 wpls2;
1331 l_int32 wpls3;
1332 
1333  wpls2 = 2 * wpls;
1334  wpls3 = 3 * wpls;
1335  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1336 
1337  for (i = 0; i < h; i++) {
1338  sptr = datas + i * wpls;
1339  dptr = datad + i * wpld;
1340  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1341  *dptr = (*(sptr + wpls3)) |
1342  (*(sptr - wpls2));
1343  }
1344  }
1345 }
1346 
1347 static void
1348 ferode_2_13(l_uint32 *datad,
1349  l_int32 w,
1350  l_int32 h,
1351  l_int32 wpld,
1352  l_uint32 *datas,
1353  l_int32 wpls)
1354 {
1355 l_int32 i;
1356 register l_int32 j, pwpls;
1357 register l_uint32 *sptr, *dptr;
1358 l_int32 wpls2;
1359 l_int32 wpls3;
1360 
1361  wpls2 = 2 * wpls;
1362  wpls3 = 3 * wpls;
1363  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1364 
1365  for (i = 0; i < h; i++) {
1366  sptr = datas + i * wpls;
1367  dptr = datad + i * wpld;
1368  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1369  *dptr = (*(sptr - wpls3)) &
1370  (*(sptr + wpls2));
1371  }
1372  }
1373 }
1374 
1375 static void
1376 fdilate_2_14(l_uint32 *datad,
1377  l_int32 w,
1378  l_int32 h,
1379  l_int32 wpld,
1380  l_uint32 *datas,
1381  l_int32 wpls)
1382 {
1383 l_int32 i;
1384 register l_int32 j, pwpls;
1385 register l_uint32 *sptr, *dptr;
1386 
1387  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1388 
1389  for (i = 0; i < h; i++) {
1390  sptr = datas + i * wpls;
1391  dptr = datad + i * wpld;
1392  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1393  *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
1394  (*sptr) |
1395  ((*(sptr) >> 4) | (*(sptr - 1) << 28));
1396  }
1397  }
1398 }
1399 
1400 static void
1401 ferode_2_14(l_uint32 *datad,
1402  l_int32 w,
1403  l_int32 h,
1404  l_int32 wpld,
1405  l_uint32 *datas,
1406  l_int32 wpls)
1407 {
1408 l_int32 i;
1409 register l_int32 j, pwpls;
1410 register l_uint32 *sptr, *dptr;
1411 
1412  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1413 
1414  for (i = 0; i < h; i++) {
1415  sptr = datas + i * wpls;
1416  dptr = datad + i * wpld;
1417  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1418  *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
1419  (*sptr) &
1420  ((*(sptr) << 4) | (*(sptr + 1) >> 28));
1421  }
1422  }
1423 }
1424 
1425 static void
1426 fdilate_2_15(l_uint32 *datad,
1427  l_int32 w,
1428  l_int32 h,
1429  l_int32 wpld,
1430  l_uint32 *datas,
1431  l_int32 wpls)
1432 {
1433 l_int32 i;
1434 register l_int32 j, pwpls;
1435 register l_uint32 *sptr, *dptr;
1436 l_int32 wpls4;
1437 
1438  wpls4 = 4 * wpls;
1439  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1440 
1441  for (i = 0; i < h; i++) {
1442  sptr = datas + i * wpls;
1443  dptr = datad + i * wpld;
1444  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1445  *dptr = (*(sptr + wpls4)) |
1446  (*sptr) |
1447  (*(sptr - wpls4));
1448  }
1449  }
1450 }
1451 
1452 static void
1453 ferode_2_15(l_uint32 *datad,
1454  l_int32 w,
1455  l_int32 h,
1456  l_int32 wpld,
1457  l_uint32 *datas,
1458  l_int32 wpls)
1459 {
1460 l_int32 i;
1461 register l_int32 j, pwpls;
1462 register l_uint32 *sptr, *dptr;
1463 l_int32 wpls4;
1464 
1465  wpls4 = 4 * wpls;
1466  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1467 
1468  for (i = 0; i < h; i++) {
1469  sptr = datas + i * wpls;
1470  dptr = datad + i * wpld;
1471  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1472  *dptr = (*(sptr - wpls4)) &
1473  (*sptr) &
1474  (*(sptr + wpls4));
1475  }
1476  }
1477 }
1478 
1479 static void
1480 fdilate_2_16(l_uint32 *datad,
1481  l_int32 w,
1482  l_int32 h,
1483  l_int32 wpld,
1484  l_uint32 *datas,
1485  l_int32 wpls)
1486 {
1487 l_int32 i;
1488 register l_int32 j, pwpls;
1489 register l_uint32 *sptr, *dptr;
1490 
1491  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1492 
1493  for (i = 0; i < h; i++) {
1494  sptr = datas + i * wpls;
1495  dptr = datad + i * wpld;
1496  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1497  *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
1498  ((*(sptr) >> 3) | (*(sptr - 1) << 29));
1499  }
1500  }
1501 }
1502 
1503 static void
1504 ferode_2_16(l_uint32 *datad,
1505  l_int32 w,
1506  l_int32 h,
1507  l_int32 wpld,
1508  l_uint32 *datas,
1509  l_int32 wpls)
1510 {
1511 l_int32 i;
1512 register l_int32 j, pwpls;
1513 register l_uint32 *sptr, *dptr;
1514 
1515  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1516 
1517  for (i = 0; i < h; i++) {
1518  sptr = datas + i * wpls;
1519  dptr = datad + i * wpld;
1520  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1521  *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
1522  ((*(sptr) << 3) | (*(sptr + 1) >> 29));
1523  }
1524  }
1525 }
1526 
1527 static void
1528 fdilate_2_17(l_uint32 *datad,
1529  l_int32 w,
1530  l_int32 h,
1531  l_int32 wpld,
1532  l_uint32 *datas,
1533  l_int32 wpls)
1534 {
1535 l_int32 i;
1536 register l_int32 j, pwpls;
1537 register l_uint32 *sptr, *dptr;
1538 l_int32 wpls3;
1539 l_int32 wpls4;
1540 
1541  wpls3 = 3 * wpls;
1542  wpls4 = 4 * wpls;
1543  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1544 
1545  for (i = 0; i < h; i++) {
1546  sptr = datas + i * wpls;
1547  dptr = datad + i * wpld;
1548  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1549  *dptr = (*(sptr + wpls4)) |
1550  (*(sptr - wpls3));
1551  }
1552  }
1553 }
1554 
1555 static void
1556 ferode_2_17(l_uint32 *datad,
1557  l_int32 w,
1558  l_int32 h,
1559  l_int32 wpld,
1560  l_uint32 *datas,
1561  l_int32 wpls)
1562 {
1563 l_int32 i;
1564 register l_int32 j, pwpls;
1565 register l_uint32 *sptr, *dptr;
1566 l_int32 wpls3;
1567 l_int32 wpls4;
1568 
1569  wpls3 = 3 * wpls;
1570  wpls4 = 4 * wpls;
1571  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1572 
1573  for (i = 0; i < h; i++) {
1574  sptr = datas + i * wpls;
1575  dptr = datad + i * wpld;
1576  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1577  *dptr = (*(sptr - wpls4)) &
1578  (*(sptr + wpls3));
1579  }
1580  }
1581 }
1582 
1583 static void
1584 fdilate_2_18(l_uint32 *datad,
1585  l_int32 w,
1586  l_int32 h,
1587  l_int32 wpld,
1588  l_uint32 *datas,
1589  l_int32 wpls)
1590 {
1591 l_int32 i;
1592 register l_int32 j, pwpls;
1593 register l_uint32 *sptr, *dptr;
1594 
1595  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1596 
1597  for (i = 0; i < h; i++) {
1598  sptr = datas + i * wpls;
1599  dptr = datad + i * wpld;
1600  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1601  *dptr = ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
1602  (*sptr) |
1603  ((*(sptr) >> 5) | (*(sptr - 1) << 27));
1604  }
1605  }
1606 }
1607 
1608 static void
1609 ferode_2_18(l_uint32 *datad,
1610  l_int32 w,
1611  l_int32 h,
1612  l_int32 wpld,
1613  l_uint32 *datas,
1614  l_int32 wpls)
1615 {
1616 l_int32 i;
1617 register l_int32 j, pwpls;
1618 register l_uint32 *sptr, *dptr;
1619 
1620  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1621 
1622  for (i = 0; i < h; i++) {
1623  sptr = datas + i * wpls;
1624  dptr = datad + i * wpld;
1625  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1626  *dptr = ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
1627  (*sptr) &
1628  ((*(sptr) << 5) | (*(sptr + 1) >> 27));
1629  }
1630  }
1631 }
1632 
1633 static void
1634 fdilate_2_19(l_uint32 *datad,
1635  l_int32 w,
1636  l_int32 h,
1637  l_int32 wpld,
1638  l_uint32 *datas,
1639  l_int32 wpls)
1640 {
1641 l_int32 i;
1642 register l_int32 j, pwpls;
1643 register l_uint32 *sptr, *dptr;
1644 l_int32 wpls5;
1645 
1646  wpls5 = 5 * wpls;
1647  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1648 
1649  for (i = 0; i < h; i++) {
1650  sptr = datas + i * wpls;
1651  dptr = datad + i * wpld;
1652  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1653  *dptr = (*(sptr + wpls5)) |
1654  (*sptr) |
1655  (*(sptr - wpls5));
1656  }
1657  }
1658 }
1659 
1660 static void
1661 ferode_2_19(l_uint32 *datad,
1662  l_int32 w,
1663  l_int32 h,
1664  l_int32 wpld,
1665  l_uint32 *datas,
1666  l_int32 wpls)
1667 {
1668 l_int32 i;
1669 register l_int32 j, pwpls;
1670 register l_uint32 *sptr, *dptr;
1671 l_int32 wpls5;
1672 
1673  wpls5 = 5 * wpls;
1674  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1675 
1676  for (i = 0; i < h; i++) {
1677  sptr = datas + i * wpls;
1678  dptr = datad + i * wpld;
1679  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1680  *dptr = (*(sptr - wpls5)) &
1681  (*sptr) &
1682  (*(sptr + wpls5));
1683  }
1684  }
1685 }
1686 
1687 static void
1688 fdilate_2_20(l_uint32 *datad,
1689  l_int32 w,
1690  l_int32 h,
1691  l_int32 wpld,
1692  l_uint32 *datas,
1693  l_int32 wpls)
1694 {
1695 l_int32 i;
1696 register l_int32 j, pwpls;
1697 register l_uint32 *sptr, *dptr;
1698 
1699  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1700 
1701  for (i = 0; i < h; i++) {
1702  sptr = datas + i * wpls;
1703  dptr = datad + i * wpld;
1704  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1705  *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
1706  ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
1707  ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
1708  ((*(sptr) >> 6) | (*(sptr - 1) << 26));
1709  }
1710  }
1711 }
1712 
1713 static void
1714 ferode_2_20(l_uint32 *datad,
1715  l_int32 w,
1716  l_int32 h,
1717  l_int32 wpld,
1718  l_uint32 *datas,
1719  l_int32 wpls)
1720 {
1721 l_int32 i;
1722 register l_int32 j, pwpls;
1723 register l_uint32 *sptr, *dptr;
1724 
1725  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1726 
1727  for (i = 0; i < h; i++) {
1728  sptr = datas + i * wpls;
1729  dptr = datad + i * wpld;
1730  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1731  *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
1732  ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
1733  ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
1734  ((*(sptr) << 6) | (*(sptr + 1) >> 26));
1735  }
1736  }
1737 }
1738 
1739 static void
1740 fdilate_2_21(l_uint32 *datad,
1741  l_int32 w,
1742  l_int32 h,
1743  l_int32 wpld,
1744  l_uint32 *datas,
1745  l_int32 wpls)
1746 {
1747 l_int32 i;
1748 register l_int32 j, pwpls;
1749 register l_uint32 *sptr, *dptr;
1750 l_int32 wpls2;
1751 l_int32 wpls6;
1752 
1753  wpls2 = 2 * wpls;
1754  wpls6 = 6 * wpls;
1755  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1756 
1757  for (i = 0; i < h; i++) {
1758  sptr = datas + i * wpls;
1759  dptr = datad + i * wpld;
1760  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1761  *dptr = (*(sptr + wpls6)) |
1762  (*(sptr + wpls2)) |
1763  (*(sptr - wpls2)) |
1764  (*(sptr - wpls6));
1765  }
1766  }
1767 }
1768 
1769 static void
1770 ferode_2_21(l_uint32 *datad,
1771  l_int32 w,
1772  l_int32 h,
1773  l_int32 wpld,
1774  l_uint32 *datas,
1775  l_int32 wpls)
1776 {
1777 l_int32 i;
1778 register l_int32 j, pwpls;
1779 register l_uint32 *sptr, *dptr;
1780 l_int32 wpls2;
1781 l_int32 wpls6;
1782 
1783  wpls2 = 2 * wpls;
1784  wpls6 = 6 * wpls;
1785  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1786 
1787  for (i = 0; i < h; i++) {
1788  sptr = datas + i * wpls;
1789  dptr = datad + i * wpld;
1790  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1791  *dptr = (*(sptr - wpls6)) &
1792  (*(sptr - wpls2)) &
1793  (*(sptr + wpls2)) &
1794  (*(sptr + wpls6));
1795  }
1796  }
1797 }
1798 
1799 static void
1800 fdilate_2_22(l_uint32 *datad,
1801  l_int32 w,
1802  l_int32 h,
1803  l_int32 wpld,
1804  l_uint32 *datas,
1805  l_int32 wpls)
1806 {
1807 l_int32 i;
1808 register l_int32 j, pwpls;
1809 register l_uint32 *sptr, *dptr;
1810 
1811  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1812 
1813  for (i = 0; i < h; i++) {
1814  sptr = datas + i * wpls;
1815  dptr = datad + i * wpld;
1816  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1817  *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
1818  (*sptr) |
1819  ((*(sptr) >> 6) | (*(sptr - 1) << 26));
1820  }
1821  }
1822 }
1823 
1824 static void
1825 ferode_2_22(l_uint32 *datad,
1826  l_int32 w,
1827  l_int32 h,
1828  l_int32 wpld,
1829  l_uint32 *datas,
1830  l_int32 wpls)
1831 {
1832 l_int32 i;
1833 register l_int32 j, pwpls;
1834 register l_uint32 *sptr, *dptr;
1835 
1836  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1837 
1838  for (i = 0; i < h; i++) {
1839  sptr = datas + i * wpls;
1840  dptr = datad + i * wpld;
1841  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1842  *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
1843  (*sptr) &
1844  ((*(sptr) << 6) | (*(sptr + 1) >> 26));
1845  }
1846  }
1847 }
1848 
1849 static void
1850 fdilate_2_23(l_uint32 *datad,
1851  l_int32 w,
1852  l_int32 h,
1853  l_int32 wpld,
1854  l_uint32 *datas,
1855  l_int32 wpls)
1856 {
1857 l_int32 i;
1858 register l_int32 j, pwpls;
1859 register l_uint32 *sptr, *dptr;
1860 l_int32 wpls6;
1861 
1862  wpls6 = 6 * wpls;
1863  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1864 
1865  for (i = 0; i < h; i++) {
1866  sptr = datas + i * wpls;
1867  dptr = datad + i * wpld;
1868  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1869  *dptr = (*(sptr + wpls6)) |
1870  (*sptr) |
1871  (*(sptr - wpls6));
1872  }
1873  }
1874 }
1875 
1876 static void
1877 ferode_2_23(l_uint32 *datad,
1878  l_int32 w,
1879  l_int32 h,
1880  l_int32 wpld,
1881  l_uint32 *datas,
1882  l_int32 wpls)
1883 {
1884 l_int32 i;
1885 register l_int32 j, pwpls;
1886 register l_uint32 *sptr, *dptr;
1887 l_int32 wpls6;
1888 
1889  wpls6 = 6 * wpls;
1890  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1891 
1892  for (i = 0; i < h; i++) {
1893  sptr = datas + i * wpls;
1894  dptr = datad + i * wpld;
1895  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1896  *dptr = (*(sptr - wpls6)) &
1897  (*sptr) &
1898  (*(sptr + wpls6));
1899  }
1900  }
1901 }
1902 
1903 static void
1904 fdilate_2_24(l_uint32 *datad,
1905  l_int32 w,
1906  l_int32 h,
1907  l_int32 wpld,
1908  l_uint32 *datas,
1909  l_int32 wpls)
1910 {
1911 l_int32 i;
1912 register l_int32 j, pwpls;
1913 register l_uint32 *sptr, *dptr;
1914 
1915  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1916 
1917  for (i = 0; i < h; i++) {
1918  sptr = datas + i * wpls;
1919  dptr = datad + i * wpld;
1920  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1921  *dptr = ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
1922  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
1923  ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
1924  ((*(sptr) >> 7) | (*(sptr - 1) << 25));
1925  }
1926  }
1927 }
1928 
1929 static void
1930 ferode_2_24(l_uint32 *datad,
1931  l_int32 w,
1932  l_int32 h,
1933  l_int32 wpld,
1934  l_uint32 *datas,
1935  l_int32 wpls)
1936 {
1937 l_int32 i;
1938 register l_int32 j, pwpls;
1939 register l_uint32 *sptr, *dptr;
1940 
1941  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1942 
1943  for (i = 0; i < h; i++) {
1944  sptr = datas + i * wpls;
1945  dptr = datad + i * wpld;
1946  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1947  *dptr = ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
1948  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
1949  ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
1950  ((*(sptr) << 7) | (*(sptr + 1) >> 25));
1951  }
1952  }
1953 }
1954 
1955 static void
1956 fdilate_2_25(l_uint32 *datad,
1957  l_int32 w,
1958  l_int32 h,
1959  l_int32 wpld,
1960  l_uint32 *datas,
1961  l_int32 wpls)
1962 {
1963 l_int32 i;
1964 register l_int32 j, pwpls;
1965 register l_uint32 *sptr, *dptr;
1966 l_int32 wpls2;
1967 l_int32 wpls3;
1968 l_int32 wpls7;
1969 l_int32 wpls8;
1970 
1971  wpls2 = 2 * wpls;
1972  wpls3 = 3 * wpls;
1973  wpls7 = 7 * wpls;
1974  wpls8 = 8 * wpls;
1975  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
1976 
1977  for (i = 0; i < h; i++) {
1978  sptr = datas + i * wpls;
1979  dptr = datad + i * wpld;
1980  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
1981  *dptr = (*(sptr + wpls8)) |
1982  (*(sptr + wpls3)) |
1983  (*(sptr - wpls2)) |
1984  (*(sptr - wpls7));
1985  }
1986  }
1987 }
1988 
1989 static void
1990 ferode_2_25(l_uint32 *datad,
1991  l_int32 w,
1992  l_int32 h,
1993  l_int32 wpld,
1994  l_uint32 *datas,
1995  l_int32 wpls)
1996 {
1997 l_int32 i;
1998 register l_int32 j, pwpls;
1999 register l_uint32 *sptr, *dptr;
2000 l_int32 wpls2;
2001 l_int32 wpls3;
2002 l_int32 wpls7;
2003 l_int32 wpls8;
2004 
2005  wpls2 = 2 * wpls;
2006  wpls3 = 3 * wpls;
2007  wpls7 = 7 * wpls;
2008  wpls8 = 8 * wpls;
2009  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2010 
2011  for (i = 0; i < h; i++) {
2012  sptr = datas + i * wpls;
2013  dptr = datad + i * wpld;
2014  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2015  *dptr = (*(sptr - wpls8)) &
2016  (*(sptr - wpls3)) &
2017  (*(sptr + wpls2)) &
2018  (*(sptr + wpls7));
2019  }
2020  }
2021 }
2022 
2023 static void
2024 fdilate_2_26(l_uint32 *datad,
2025  l_int32 w,
2026  l_int32 h,
2027  l_int32 wpld,
2028  l_uint32 *datas,
2029  l_int32 wpls)
2030 {
2031 l_int32 i;
2032 register l_int32 j, pwpls;
2033 register l_uint32 *sptr, *dptr;
2034 
2035  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2036 
2037  for (i = 0; i < h; i++) {
2038  sptr = datas + i * wpls;
2039  dptr = datad + i * wpld;
2040  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2041  *dptr = ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
2042  (*sptr) |
2043  ((*(sptr) >> 7) | (*(sptr - 1) << 25));
2044  }
2045  }
2046 }
2047 
2048 static void
2049 ferode_2_26(l_uint32 *datad,
2050  l_int32 w,
2051  l_int32 h,
2052  l_int32 wpld,
2053  l_uint32 *datas,
2054  l_int32 wpls)
2055 {
2056 l_int32 i;
2057 register l_int32 j, pwpls;
2058 register l_uint32 *sptr, *dptr;
2059 
2060  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2061 
2062  for (i = 0; i < h; i++) {
2063  sptr = datas + i * wpls;
2064  dptr = datad + i * wpld;
2065  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2066  *dptr = ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
2067  (*sptr) &
2068  ((*(sptr) << 7) | (*(sptr + 1) >> 25));
2069  }
2070  }
2071 }
2072 
2073 static void
2074 fdilate_2_27(l_uint32 *datad,
2075  l_int32 w,
2076  l_int32 h,
2077  l_int32 wpld,
2078  l_uint32 *datas,
2079  l_int32 wpls)
2080 {
2081 l_int32 i;
2082 register l_int32 j, pwpls;
2083 register l_uint32 *sptr, *dptr;
2084 l_int32 wpls7;
2085 
2086  wpls7 = 7 * wpls;
2087  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2088 
2089  for (i = 0; i < h; i++) {
2090  sptr = datas + i * wpls;
2091  dptr = datad + i * wpld;
2092  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2093  *dptr = (*(sptr + wpls7)) |
2094  (*sptr) |
2095  (*(sptr - wpls7));
2096  }
2097  }
2098 }
2099 
2100 static void
2101 ferode_2_27(l_uint32 *datad,
2102  l_int32 w,
2103  l_int32 h,
2104  l_int32 wpld,
2105  l_uint32 *datas,
2106  l_int32 wpls)
2107 {
2108 l_int32 i;
2109 register l_int32 j, pwpls;
2110 register l_uint32 *sptr, *dptr;
2111 l_int32 wpls7;
2112 
2113  wpls7 = 7 * wpls;
2114  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2115 
2116  for (i = 0; i < h; i++) {
2117  sptr = datas + i * wpls;
2118  dptr = datad + i * wpld;
2119  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2120  *dptr = (*(sptr - wpls7)) &
2121  (*sptr) &
2122  (*(sptr + wpls7));
2123  }
2124  }
2125 }
2126 
2127 static void
2128 fdilate_2_28(l_uint32 *datad,
2129  l_int32 w,
2130  l_int32 h,
2131  l_int32 wpld,
2132  l_uint32 *datas,
2133  l_int32 wpls)
2134 {
2135 l_int32 i;
2136 register l_int32 j, pwpls;
2137 register l_uint32 *sptr, *dptr;
2138 
2139  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2140 
2141  for (i = 0; i < h; i++) {
2142  sptr = datas + i * wpls;
2143  dptr = datad + i * wpld;
2144  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2145  *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
2146  ((*(sptr) >> 5) | (*(sptr - 1) << 27));
2147  }
2148  }
2149 }
2150 
2151 static void
2152 ferode_2_28(l_uint32 *datad,
2153  l_int32 w,
2154  l_int32 h,
2155  l_int32 wpld,
2156  l_uint32 *datas,
2157  l_int32 wpls)
2158 {
2159 l_int32 i;
2160 register l_int32 j, pwpls;
2161 register l_uint32 *sptr, *dptr;
2162 
2163  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2164 
2165  for (i = 0; i < h; i++) {
2166  sptr = datas + i * wpls;
2167  dptr = datad + i * wpld;
2168  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2169  *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
2170  ((*(sptr) << 5) | (*(sptr + 1) >> 27));
2171  }
2172  }
2173 }
2174 
2175 static void
2176 fdilate_2_29(l_uint32 *datad,
2177  l_int32 w,
2178  l_int32 h,
2179  l_int32 wpld,
2180  l_uint32 *datas,
2181  l_int32 wpls)
2182 {
2183 l_int32 i;
2184 register l_int32 j, pwpls;
2185 register l_uint32 *sptr, *dptr;
2186 l_int32 wpls5;
2187 l_int32 wpls6;
2188 
2189  wpls5 = 5 * wpls;
2190  wpls6 = 6 * wpls;
2191  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2192 
2193  for (i = 0; i < h; i++) {
2194  sptr = datas + i * wpls;
2195  dptr = datad + i * wpld;
2196  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2197  *dptr = (*(sptr + wpls6)) |
2198  (*(sptr - wpls5));
2199  }
2200  }
2201 }
2202 
2203 static void
2204 ferode_2_29(l_uint32 *datad,
2205  l_int32 w,
2206  l_int32 h,
2207  l_int32 wpld,
2208  l_uint32 *datas,
2209  l_int32 wpls)
2210 {
2211 l_int32 i;
2212 register l_int32 j, pwpls;
2213 register l_uint32 *sptr, *dptr;
2214 l_int32 wpls5;
2215 l_int32 wpls6;
2216 
2217  wpls5 = 5 * wpls;
2218  wpls6 = 6 * wpls;
2219  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2220 
2221  for (i = 0; i < h; i++) {
2222  sptr = datas + i * wpls;
2223  dptr = datad + i * wpld;
2224  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2225  *dptr = (*(sptr - wpls6)) &
2226  (*(sptr + wpls5));
2227  }
2228  }
2229 }
2230 
2231 static void
2232 fdilate_2_30(l_uint32 *datad,
2233  l_int32 w,
2234  l_int32 h,
2235  l_int32 wpld,
2236  l_uint32 *datas,
2237  l_int32 wpls)
2238 {
2239 l_int32 i;
2240 register l_int32 j, pwpls;
2241 register l_uint32 *sptr, *dptr;
2242 
2243  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2244 
2245  for (i = 0; i < h; i++) {
2246  sptr = datas + i * wpls;
2247  dptr = datad + i * wpld;
2248  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2249  *dptr = ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
2250  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
2251  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
2252  ((*(sptr) >> 9) | (*(sptr - 1) << 23));
2253  }
2254  }
2255 }
2256 
2257 static void
2258 ferode_2_30(l_uint32 *datad,
2259  l_int32 w,
2260  l_int32 h,
2261  l_int32 wpld,
2262  l_uint32 *datas,
2263  l_int32 wpls)
2264 {
2265 l_int32 i;
2266 register l_int32 j, pwpls;
2267 register l_uint32 *sptr, *dptr;
2268 
2269  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2270 
2271  for (i = 0; i < h; i++) {
2272  sptr = datas + i * wpls;
2273  dptr = datad + i * wpld;
2274  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2275  *dptr = ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
2276  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
2277  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
2278  ((*(sptr) << 9) | (*(sptr + 1) >> 23));
2279  }
2280  }
2281 }
2282 
2283 static void
2284 fdilate_2_31(l_uint32 *datad,
2285  l_int32 w,
2286  l_int32 h,
2287  l_int32 wpld,
2288  l_uint32 *datas,
2289  l_int32 wpls)
2290 {
2291 l_int32 i;
2292 register l_int32 j, pwpls;
2293 register l_uint32 *sptr, *dptr;
2294 l_int32 wpls3;
2295 l_int32 wpls9;
2296 
2297  wpls3 = 3 * wpls;
2298  wpls9 = 9 * wpls;
2299  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2300 
2301  for (i = 0; i < h; i++) {
2302  sptr = datas + i * wpls;
2303  dptr = datad + i * wpld;
2304  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2305  *dptr = (*(sptr + wpls9)) |
2306  (*(sptr + wpls3)) |
2307  (*(sptr - wpls3)) |
2308  (*(sptr - wpls9));
2309  }
2310  }
2311 }
2312 
2313 static void
2314 ferode_2_31(l_uint32 *datad,
2315  l_int32 w,
2316  l_int32 h,
2317  l_int32 wpld,
2318  l_uint32 *datas,
2319  l_int32 wpls)
2320 {
2321 l_int32 i;
2322 register l_int32 j, pwpls;
2323 register l_uint32 *sptr, *dptr;
2324 l_int32 wpls3;
2325 l_int32 wpls9;
2326 
2327  wpls3 = 3 * wpls;
2328  wpls9 = 9 * wpls;
2329  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2330 
2331  for (i = 0; i < h; i++) {
2332  sptr = datas + i * wpls;
2333  dptr = datad + i * wpld;
2334  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2335  *dptr = (*(sptr - wpls9)) &
2336  (*(sptr - wpls3)) &
2337  (*(sptr + wpls3)) &
2338  (*(sptr + wpls9));
2339  }
2340  }
2341 }
2342 
2343 static void
2344 fdilate_2_32(l_uint32 *datad,
2345  l_int32 w,
2346  l_int32 h,
2347  l_int32 wpld,
2348  l_uint32 *datas,
2349  l_int32 wpls)
2350 {
2351 l_int32 i;
2352 register l_int32 j, pwpls;
2353 register l_uint32 *sptr, *dptr;
2354 
2355  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2356 
2357  for (i = 0; i < h; i++) {
2358  sptr = datas + i * wpls;
2359  dptr = datad + i * wpld;
2360  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2361  *dptr = ((*(sptr) << 10) | (*(sptr + 1) >> 22)) |
2362  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
2363  (*sptr) |
2364  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
2365  ((*(sptr) >> 10) | (*(sptr - 1) << 22));
2366  }
2367  }
2368 }
2369 
2370 static void
2371 ferode_2_32(l_uint32 *datad,
2372  l_int32 w,
2373  l_int32 h,
2374  l_int32 wpld,
2375  l_uint32 *datas,
2376  l_int32 wpls)
2377 {
2378 l_int32 i;
2379 register l_int32 j, pwpls;
2380 register l_uint32 *sptr, *dptr;
2381 
2382  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2383 
2384  for (i = 0; i < h; i++) {
2385  sptr = datas + i * wpls;
2386  dptr = datad + i * wpld;
2387  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2388  *dptr = ((*(sptr) >> 10) | (*(sptr - 1) << 22)) &
2389  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
2390  (*sptr) &
2391  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
2392  ((*(sptr) << 10) | (*(sptr + 1) >> 22));
2393  }
2394  }
2395 }
2396 
2397 static void
2398 fdilate_2_33(l_uint32 *datad,
2399  l_int32 w,
2400  l_int32 h,
2401  l_int32 wpld,
2402  l_uint32 *datas,
2403  l_int32 wpls)
2404 {
2405 l_int32 i;
2406 register l_int32 j, pwpls;
2407 register l_uint32 *sptr, *dptr;
2408 l_int32 wpls5;
2409 l_int32 wpls10;
2410 
2411  wpls5 = 5 * wpls;
2412  wpls10 = 10 * wpls;
2413  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2414 
2415  for (i = 0; i < h; i++) {
2416  sptr = datas + i * wpls;
2417  dptr = datad + i * wpld;
2418  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2419  *dptr = (*(sptr + wpls10)) |
2420  (*(sptr + wpls5)) |
2421  (*sptr) |
2422  (*(sptr - wpls5)) |
2423  (*(sptr - wpls10));
2424  }
2425  }
2426 }
2427 
2428 static void
2429 ferode_2_33(l_uint32 *datad,
2430  l_int32 w,
2431  l_int32 h,
2432  l_int32 wpld,
2433  l_uint32 *datas,
2434  l_int32 wpls)
2435 {
2436 l_int32 i;
2437 register l_int32 j, pwpls;
2438 register l_uint32 *sptr, *dptr;
2439 l_int32 wpls5;
2440 l_int32 wpls10;
2441 
2442  wpls5 = 5 * wpls;
2443  wpls10 = 10 * wpls;
2444  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2445 
2446  for (i = 0; i < h; i++) {
2447  sptr = datas + i * wpls;
2448  dptr = datad + i * wpld;
2449  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2450  *dptr = (*(sptr - wpls10)) &
2451  (*(sptr - wpls5)) &
2452  (*sptr) &
2453  (*(sptr + wpls5)) &
2454  (*(sptr + wpls10));
2455  }
2456  }
2457 }
2458 
2459 static void
2460 fdilate_2_34(l_uint32 *datad,
2461  l_int32 w,
2462  l_int32 h,
2463  l_int32 wpld,
2464  l_uint32 *datas,
2465  l_int32 wpls)
2466 {
2467 l_int32 i;
2468 register l_int32 j, pwpls;
2469 register l_uint32 *sptr, *dptr;
2470 
2471  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2472 
2473  for (i = 0; i < h; i++) {
2474  sptr = datas + i * wpls;
2475  dptr = datad + i * wpld;
2476  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2477  *dptr = ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
2478  (*sptr) |
2479  ((*(sptr) >> 9) | (*(sptr - 1) << 23));
2480  }
2481  }
2482 }
2483 
2484 static void
2485 ferode_2_34(l_uint32 *datad,
2486  l_int32 w,
2487  l_int32 h,
2488  l_int32 wpld,
2489  l_uint32 *datas,
2490  l_int32 wpls)
2491 {
2492 l_int32 i;
2493 register l_int32 j, pwpls;
2494 register l_uint32 *sptr, *dptr;
2495 
2496  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2497 
2498  for (i = 0; i < h; i++) {
2499  sptr = datas + i * wpls;
2500  dptr = datad + i * wpld;
2501  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2502  *dptr = ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
2503  (*sptr) &
2504  ((*(sptr) << 9) | (*(sptr + 1) >> 23));
2505  }
2506  }
2507 }
2508 
2509 static void
2510 fdilate_2_35(l_uint32 *datad,
2511  l_int32 w,
2512  l_int32 h,
2513  l_int32 wpld,
2514  l_uint32 *datas,
2515  l_int32 wpls)
2516 {
2517 l_int32 i;
2518 register l_int32 j, pwpls;
2519 register l_uint32 *sptr, *dptr;
2520 l_int32 wpls9;
2521 
2522  wpls9 = 9 * wpls;
2523  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2524 
2525  for (i = 0; i < h; i++) {
2526  sptr = datas + i * wpls;
2527  dptr = datad + i * wpld;
2528  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2529  *dptr = (*(sptr + wpls9)) |
2530  (*sptr) |
2531  (*(sptr - wpls9));
2532  }
2533  }
2534 }
2535 
2536 static void
2537 ferode_2_35(l_uint32 *datad,
2538  l_int32 w,
2539  l_int32 h,
2540  l_int32 wpld,
2541  l_uint32 *datas,
2542  l_int32 wpls)
2543 {
2544 l_int32 i;
2545 register l_int32 j, pwpls;
2546 register l_uint32 *sptr, *dptr;
2547 l_int32 wpls9;
2548 
2549  wpls9 = 9 * wpls;
2550  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2551 
2552  for (i = 0; i < h; i++) {
2553  sptr = datas + i * wpls;
2554  dptr = datad + i * wpld;
2555  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2556  *dptr = (*(sptr - wpls9)) &
2557  (*sptr) &
2558  (*(sptr + wpls9));
2559  }
2560  }
2561 }
2562 
2563 static void
2564 fdilate_2_36(l_uint32 *datad,
2565  l_int32 w,
2566  l_int32 h,
2567  l_int32 wpld,
2568  l_uint32 *datas,
2569  l_int32 wpls)
2570 {
2571 l_int32 i;
2572 register l_int32 j, pwpls;
2573 register l_uint32 *sptr, *dptr;
2574 
2575  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2576 
2577  for (i = 0; i < h; i++) {
2578  sptr = datas + i * wpls;
2579  dptr = datad + i * wpld;
2580  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2581  *dptr = ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
2582  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
2583  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
2584  ((*(sptr) >> 10) | (*(sptr - 1) << 22));
2585  }
2586  }
2587 }
2588 
2589 static void
2590 ferode_2_36(l_uint32 *datad,
2591  l_int32 w,
2592  l_int32 h,
2593  l_int32 wpld,
2594  l_uint32 *datas,
2595  l_int32 wpls)
2596 {
2597 l_int32 i;
2598 register l_int32 j, pwpls;
2599 register l_uint32 *sptr, *dptr;
2600 
2601  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2602 
2603  for (i = 0; i < h; i++) {
2604  sptr = datas + i * wpls;
2605  dptr = datad + i * wpld;
2606  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2607  *dptr = ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
2608  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
2609  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
2610  ((*(sptr) << 10) | (*(sptr + 1) >> 22));
2611  }
2612  }
2613 }
2614 
2615 static void
2616 fdilate_2_37(l_uint32 *datad,
2617  l_int32 w,
2618  l_int32 h,
2619  l_int32 wpld,
2620  l_uint32 *datas,
2621  l_int32 wpls)
2622 {
2623 l_int32 i;
2624 register l_int32 j, pwpls;
2625 register l_uint32 *sptr, *dptr;
2626 l_int32 wpls3;
2627 l_int32 wpls4;
2628 l_int32 wpls10;
2629 l_int32 wpls11;
2630 
2631  wpls3 = 3 * wpls;
2632  wpls4 = 4 * wpls;
2633  wpls10 = 10 * wpls;
2634  wpls11 = 11 * wpls;
2635  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2636 
2637  for (i = 0; i < h; i++) {
2638  sptr = datas + i * wpls;
2639  dptr = datad + i * wpld;
2640  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2641  *dptr = (*(sptr + wpls11)) |
2642  (*(sptr + wpls4)) |
2643  (*(sptr - wpls3)) |
2644  (*(sptr - wpls10));
2645  }
2646  }
2647 }
2648 
2649 static void
2650 ferode_2_37(l_uint32 *datad,
2651  l_int32 w,
2652  l_int32 h,
2653  l_int32 wpld,
2654  l_uint32 *datas,
2655  l_int32 wpls)
2656 {
2657 l_int32 i;
2658 register l_int32 j, pwpls;
2659 register l_uint32 *sptr, *dptr;
2660 l_int32 wpls3;
2661 l_int32 wpls4;
2662 l_int32 wpls10;
2663 l_int32 wpls11;
2664 
2665  wpls3 = 3 * wpls;
2666  wpls4 = 4 * wpls;
2667  wpls10 = 10 * wpls;
2668  wpls11 = 11 * wpls;
2669  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2670 
2671  for (i = 0; i < h; i++) {
2672  sptr = datas + i * wpls;
2673  dptr = datad + i * wpld;
2674  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2675  *dptr = (*(sptr - wpls11)) &
2676  (*(sptr - wpls4)) &
2677  (*(sptr + wpls3)) &
2678  (*(sptr + wpls10));
2679  }
2680  }
2681 }
2682 
2683 static void
2684 fdilate_2_38(l_uint32 *datad,
2685  l_int32 w,
2686  l_int32 h,
2687  l_int32 wpld,
2688  l_uint32 *datas,
2689  l_int32 wpls)
2690 {
2691 l_int32 i;
2692 register l_int32 j, pwpls;
2693 register l_uint32 *sptr, *dptr;
2694 
2695  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2696 
2697  for (i = 0; i < h; i++) {
2698  sptr = datas + i * wpls;
2699  dptr = datad + i * wpld;
2700  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2701  *dptr = ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
2702  ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
2703  (*sptr) |
2704  ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
2705  ((*(sptr) >> 12) | (*(sptr - 1) << 20));
2706  }
2707  }
2708 }
2709 
2710 static void
2711 ferode_2_38(l_uint32 *datad,
2712  l_int32 w,
2713  l_int32 h,
2714  l_int32 wpld,
2715  l_uint32 *datas,
2716  l_int32 wpls)
2717 {
2718 l_int32 i;
2719 register l_int32 j, pwpls;
2720 register l_uint32 *sptr, *dptr;
2721 
2722  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2723 
2724  for (i = 0; i < h; i++) {
2725  sptr = datas + i * wpls;
2726  dptr = datad + i * wpld;
2727  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2728  *dptr = ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
2729  ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
2730  (*sptr) &
2731  ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
2732  ((*(sptr) << 12) | (*(sptr + 1) >> 20));
2733  }
2734  }
2735 }
2736 
2737 static void
2738 fdilate_2_39(l_uint32 *datad,
2739  l_int32 w,
2740  l_int32 h,
2741  l_int32 wpld,
2742  l_uint32 *datas,
2743  l_int32 wpls)
2744 {
2745 l_int32 i;
2746 register l_int32 j, pwpls;
2747 register l_uint32 *sptr, *dptr;
2748 l_int32 wpls6;
2749 l_int32 wpls12;
2750 
2751  wpls6 = 6 * wpls;
2752  wpls12 = 12 * wpls;
2753  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2754 
2755  for (i = 0; i < h; i++) {
2756  sptr = datas + i * wpls;
2757  dptr = datad + i * wpld;
2758  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2759  *dptr = (*(sptr + wpls12)) |
2760  (*(sptr + wpls6)) |
2761  (*sptr) |
2762  (*(sptr - wpls6)) |
2763  (*(sptr - wpls12));
2764  }
2765  }
2766 }
2767 
2768 static void
2769 ferode_2_39(l_uint32 *datad,
2770  l_int32 w,
2771  l_int32 h,
2772  l_int32 wpld,
2773  l_uint32 *datas,
2774  l_int32 wpls)
2775 {
2776 l_int32 i;
2777 register l_int32 j, pwpls;
2778 register l_uint32 *sptr, *dptr;
2779 l_int32 wpls6;
2780 l_int32 wpls12;
2781 
2782  wpls6 = 6 * wpls;
2783  wpls12 = 12 * wpls;
2784  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2785 
2786  for (i = 0; i < h; i++) {
2787  sptr = datas + i * wpls;
2788  dptr = datad + i * wpld;
2789  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2790  *dptr = (*(sptr - wpls12)) &
2791  (*(sptr - wpls6)) &
2792  (*sptr) &
2793  (*(sptr + wpls6)) &
2794  (*(sptr + wpls12));
2795  }
2796  }
2797 }
2798 
2799 static void
2800 fdilate_2_40(l_uint32 *datad,
2801  l_int32 w,
2802  l_int32 h,
2803  l_int32 wpld,
2804  l_uint32 *datas,
2805  l_int32 wpls)
2806 {
2807 l_int32 i;
2808 register l_int32 j, pwpls;
2809 register l_uint32 *sptr, *dptr;
2810 
2811  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2812 
2813  for (i = 0; i < h; i++) {
2814  sptr = datas + i * wpls;
2815  dptr = datad + i * wpld;
2816  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2817  *dptr = ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
2818  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
2819  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
2820  ((*(sptr) >> 12) | (*(sptr - 1) << 20));
2821  }
2822  }
2823 }
2824 
2825 static void
2826 ferode_2_40(l_uint32 *datad,
2827  l_int32 w,
2828  l_int32 h,
2829  l_int32 wpld,
2830  l_uint32 *datas,
2831  l_int32 wpls)
2832 {
2833 l_int32 i;
2834 register l_int32 j, pwpls;
2835 register l_uint32 *sptr, *dptr;
2836 
2837  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2838 
2839  for (i = 0; i < h; i++) {
2840  sptr = datas + i * wpls;
2841  dptr = datad + i * wpld;
2842  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2843  *dptr = ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
2844  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
2845  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
2846  ((*(sptr) << 12) | (*(sptr + 1) >> 20));
2847  }
2848  }
2849 }
2850 
2851 static void
2852 fdilate_2_41(l_uint32 *datad,
2853  l_int32 w,
2854  l_int32 h,
2855  l_int32 wpld,
2856  l_uint32 *datas,
2857  l_int32 wpls)
2858 {
2859 l_int32 i;
2860 register l_int32 j, pwpls;
2861 register l_uint32 *sptr, *dptr;
2862 l_int32 wpls4;
2863 l_int32 wpls12;
2864 
2865  wpls4 = 4 * wpls;
2866  wpls12 = 12 * wpls;
2867  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2868 
2869  for (i = 0; i < h; i++) {
2870  sptr = datas + i * wpls;
2871  dptr = datad + i * wpld;
2872  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2873  *dptr = (*(sptr + wpls12)) |
2874  (*(sptr + wpls4)) |
2875  (*(sptr - wpls4)) |
2876  (*(sptr - wpls12));
2877  }
2878  }
2879 }
2880 
2881 static void
2882 ferode_2_41(l_uint32 *datad,
2883  l_int32 w,
2884  l_int32 h,
2885  l_int32 wpld,
2886  l_uint32 *datas,
2887  l_int32 wpls)
2888 {
2889 l_int32 i;
2890 register l_int32 j, pwpls;
2891 register l_uint32 *sptr, *dptr;
2892 l_int32 wpls4;
2893 l_int32 wpls12;
2894 
2895  wpls4 = 4 * wpls;
2896  wpls12 = 12 * wpls;
2897  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2898 
2899  for (i = 0; i < h; i++) {
2900  sptr = datas + i * wpls;
2901  dptr = datad + i * wpld;
2902  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2903  *dptr = (*(sptr - wpls12)) &
2904  (*(sptr - wpls4)) &
2905  (*(sptr + wpls4)) &
2906  (*(sptr + wpls12));
2907  }
2908  }
2909 }
2910 
2911 static void
2912 fdilate_2_42(l_uint32 *datad,
2913  l_int32 w,
2914  l_int32 h,
2915  l_int32 wpld,
2916  l_uint32 *datas,
2917  l_int32 wpls)
2918 {
2919 l_int32 i;
2920 register l_int32 j, pwpls;
2921 register l_uint32 *sptr, *dptr;
2922 
2923  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2924 
2925  for (i = 0; i < h; i++) {
2926  sptr = datas + i * wpls;
2927  dptr = datad + i * wpld;
2928  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2929  *dptr = ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
2930  (*sptr) |
2931  ((*(sptr) >> 11) | (*(sptr - 1) << 21));
2932  }
2933  }
2934 }
2935 
2936 static void
2937 ferode_2_42(l_uint32 *datad,
2938  l_int32 w,
2939  l_int32 h,
2940  l_int32 wpld,
2941  l_uint32 *datas,
2942  l_int32 wpls)
2943 {
2944 l_int32 i;
2945 register l_int32 j, pwpls;
2946 register l_uint32 *sptr, *dptr;
2947 
2948  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2949 
2950  for (i = 0; i < h; i++) {
2951  sptr = datas + i * wpls;
2952  dptr = datad + i * wpld;
2953  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2954  *dptr = ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
2955  (*sptr) &
2956  ((*(sptr) << 11) | (*(sptr + 1) >> 21));
2957  }
2958  }
2959 }
2960 
2961 static void
2962 fdilate_2_43(l_uint32 *datad,
2963  l_int32 w,
2964  l_int32 h,
2965  l_int32 wpld,
2966  l_uint32 *datas,
2967  l_int32 wpls)
2968 {
2969 l_int32 i;
2970 register l_int32 j, pwpls;
2971 register l_uint32 *sptr, *dptr;
2972 l_int32 wpls11;
2973 
2974  wpls11 = 11 * wpls;
2975  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
2976 
2977  for (i = 0; i < h; i++) {
2978  sptr = datas + i * wpls;
2979  dptr = datad + i * wpld;
2980  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
2981  *dptr = (*(sptr + wpls11)) |
2982  (*sptr) |
2983  (*(sptr - wpls11));
2984  }
2985  }
2986 }
2987 
2988 static void
2989 ferode_2_43(l_uint32 *datad,
2990  l_int32 w,
2991  l_int32 h,
2992  l_int32 wpld,
2993  l_uint32 *datas,
2994  l_int32 wpls)
2995 {
2996 l_int32 i;
2997 register l_int32 j, pwpls;
2998 register l_uint32 *sptr, *dptr;
2999 l_int32 wpls11;
3000 
3001  wpls11 = 11 * wpls;
3002  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3003 
3004  for (i = 0; i < h; i++) {
3005  sptr = datas + i * wpls;
3006  dptr = datad + i * wpld;
3007  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3008  *dptr = (*(sptr - wpls11)) &
3009  (*sptr) &
3010  (*(sptr + wpls11));
3011  }
3012  }
3013 }
3014 
3015 static void
3016 fdilate_2_44(l_uint32 *datad,
3017  l_int32 w,
3018  l_int32 h,
3019  l_int32 wpld,
3020  l_uint32 *datas,
3021  l_int32 wpls)
3022 {
3023 l_int32 i;
3024 register l_int32 j, pwpls;
3025 register l_uint32 *sptr, *dptr;
3026 
3027  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3028 
3029  for (i = 0; i < h; i++) {
3030  sptr = datas + i * wpls;
3031  dptr = datad + i * wpld;
3032  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3033  *dptr = ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
3034  ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
3035  (*sptr) |
3036  ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
3037  ((*(sptr) >> 14) | (*(sptr - 1) << 18));
3038  }
3039  }
3040 }
3041 
3042 static void
3043 ferode_2_44(l_uint32 *datad,
3044  l_int32 w,
3045  l_int32 h,
3046  l_int32 wpld,
3047  l_uint32 *datas,
3048  l_int32 wpls)
3049 {
3050 l_int32 i;
3051 register l_int32 j, pwpls;
3052 register l_uint32 *sptr, *dptr;
3053 
3054  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3055 
3056  for (i = 0; i < h; i++) {
3057  sptr = datas + i * wpls;
3058  dptr = datad + i * wpld;
3059  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3060  *dptr = ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
3061  ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
3062  (*sptr) &
3063  ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
3064  ((*(sptr) << 14) | (*(sptr + 1) >> 18));
3065  }
3066  }
3067 }
3068 
3069 static void
3070 fdilate_2_45(l_uint32 *datad,
3071  l_int32 w,
3072  l_int32 h,
3073  l_int32 wpld,
3074  l_uint32 *datas,
3075  l_int32 wpls)
3076 {
3077 l_int32 i;
3078 register l_int32 j, pwpls;
3079 register l_uint32 *sptr, *dptr;
3080 l_int32 wpls7;
3081 l_int32 wpls14;
3082 
3083  wpls7 = 7 * wpls;
3084  wpls14 = 14 * wpls;
3085  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3086 
3087  for (i = 0; i < h; i++) {
3088  sptr = datas + i * wpls;
3089  dptr = datad + i * wpld;
3090  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3091  *dptr = (*(sptr + wpls14)) |
3092  (*(sptr + wpls7)) |
3093  (*sptr) |
3094  (*(sptr - wpls7)) |
3095  (*(sptr - wpls14));
3096  }
3097  }
3098 }
3099 
3100 static void
3101 ferode_2_45(l_uint32 *datad,
3102  l_int32 w,
3103  l_int32 h,
3104  l_int32 wpld,
3105  l_uint32 *datas,
3106  l_int32 wpls)
3107 {
3108 l_int32 i;
3109 register l_int32 j, pwpls;
3110 register l_uint32 *sptr, *dptr;
3111 l_int32 wpls7;
3112 l_int32 wpls14;
3113 
3114  wpls7 = 7 * wpls;
3115  wpls14 = 14 * wpls;
3116  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3117 
3118  for (i = 0; i < h; i++) {
3119  sptr = datas + i * wpls;
3120  dptr = datad + i * wpld;
3121  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3122  *dptr = (*(sptr - wpls14)) &
3123  (*(sptr - wpls7)) &
3124  (*sptr) &
3125  (*(sptr + wpls7)) &
3126  (*(sptr + wpls14));
3127  }
3128  }
3129 }
3130 
3131 static void
3132 fdilate_2_46(l_uint32 *datad,
3133  l_int32 w,
3134  l_int32 h,
3135  l_int32 wpld,
3136  l_uint32 *datas,
3137  l_int32 wpls)
3138 {
3139 l_int32 i;
3140 register l_int32 j, pwpls;
3141 register l_uint32 *sptr, *dptr;
3142 
3143  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3144 
3145  for (i = 0; i < h; i++) {
3146  sptr = datas + i * wpls;
3147  dptr = datad + i * wpld;
3148  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3149  *dptr = ((*(sptr) << 15) | (*(sptr + 1) >> 17)) |
3150  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
3151  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
3152  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
3153  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
3154  ((*(sptr) >> 15) | (*(sptr - 1) << 17));
3155  }
3156  }
3157 }
3158 
3159 static void
3160 ferode_2_46(l_uint32 *datad,
3161  l_int32 w,
3162  l_int32 h,
3163  l_int32 wpld,
3164  l_uint32 *datas,
3165  l_int32 wpls)
3166 {
3167 l_int32 i;
3168 register l_int32 j, pwpls;
3169 register l_uint32 *sptr, *dptr;
3170 
3171  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3172 
3173  for (i = 0; i < h; i++) {
3174  sptr = datas + i * wpls;
3175  dptr = datad + i * wpld;
3176  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3177  *dptr = ((*(sptr) >> 15) | (*(sptr - 1) << 17)) &
3178  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
3179  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
3180  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
3181  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
3182  ((*(sptr) << 15) | (*(sptr + 1) >> 17));
3183  }
3184  }
3185 }
3186 
3187 static void
3188 fdilate_2_47(l_uint32 *datad,
3189  l_int32 w,
3190  l_int32 h,
3191  l_int32 wpld,
3192  l_uint32 *datas,
3193  l_int32 wpls)
3194 {
3195 l_int32 i;
3196 register l_int32 j, pwpls;
3197 register l_uint32 *sptr, *dptr;
3198 l_int32 wpls3;
3199 l_int32 wpls9;
3200 l_int32 wpls15;
3201 
3202  wpls3 = 3 * wpls;
3203  wpls9 = 9 * wpls;
3204  wpls15 = 15 * wpls;
3205  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3206 
3207  for (i = 0; i < h; i++) {
3208  sptr = datas + i * wpls;
3209  dptr = datad + i * wpld;
3210  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3211  *dptr = (*(sptr + wpls15)) |
3212  (*(sptr + wpls9)) |
3213  (*(sptr + wpls3)) |
3214  (*(sptr - wpls3)) |
3215  (*(sptr - wpls9)) |
3216  (*(sptr - wpls15));
3217  }
3218  }
3219 }
3220 
3221 static void
3222 ferode_2_47(l_uint32 *datad,
3223  l_int32 w,
3224  l_int32 h,
3225  l_int32 wpld,
3226  l_uint32 *datas,
3227  l_int32 wpls)
3228 {
3229 l_int32 i;
3230 register l_int32 j, pwpls;
3231 register l_uint32 *sptr, *dptr;
3232 l_int32 wpls3;
3233 l_int32 wpls9;
3234 l_int32 wpls15;
3235 
3236  wpls3 = 3 * wpls;
3237  wpls9 = 9 * wpls;
3238  wpls15 = 15 * wpls;
3239  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3240 
3241  for (i = 0; i < h; i++) {
3242  sptr = datas + i * wpls;
3243  dptr = datad + i * wpld;
3244  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3245  *dptr = (*(sptr - wpls15)) &
3246  (*(sptr - wpls9)) &
3247  (*(sptr - wpls3)) &
3248  (*(sptr + wpls3)) &
3249  (*(sptr + wpls9)) &
3250  (*(sptr + wpls15));
3251  }
3252  }
3253 }
3254 
3255 static void
3256 fdilate_2_48(l_uint32 *datad,
3257  l_int32 w,
3258  l_int32 h,
3259  l_int32 wpld,
3260  l_uint32 *datas,
3261  l_int32 wpls)
3262 {
3263 l_int32 i;
3264 register l_int32 j, pwpls;
3265 register l_uint32 *sptr, *dptr;
3266 
3267  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3268 
3269  for (i = 0; i < h; i++) {
3270  sptr = datas + i * wpls;
3271  dptr = datad + i * wpld;
3272  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3273  *dptr = ((*(sptr) << 13) | (*(sptr + 1) >> 19)) |
3274  (*sptr) |
3275  ((*(sptr) >> 13) | (*(sptr - 1) << 19));
3276  }
3277  }
3278 }
3279 
3280 static void
3281 ferode_2_48(l_uint32 *datad,
3282  l_int32 w,
3283  l_int32 h,
3284  l_int32 wpld,
3285  l_uint32 *datas,
3286  l_int32 wpls)
3287 {
3288 l_int32 i;
3289 register l_int32 j, pwpls;
3290 register l_uint32 *sptr, *dptr;
3291 
3292  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3293 
3294  for (i = 0; i < h; i++) {
3295  sptr = datas + i * wpls;
3296  dptr = datad + i * wpld;
3297  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3298  *dptr = ((*(sptr) >> 13) | (*(sptr - 1) << 19)) &
3299  (*sptr) &
3300  ((*(sptr) << 13) | (*(sptr + 1) >> 19));
3301  }
3302  }
3303 }
3304 
3305 static void
3306 fdilate_2_49(l_uint32 *datad,
3307  l_int32 w,
3308  l_int32 h,
3309  l_int32 wpld,
3310  l_uint32 *datas,
3311  l_int32 wpls)
3312 {
3313 l_int32 i;
3314 register l_int32 j, pwpls;
3315 register l_uint32 *sptr, *dptr;
3316 l_int32 wpls13;
3317 
3318  wpls13 = 13 * wpls;
3319  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3320 
3321  for (i = 0; i < h; i++) {
3322  sptr = datas + i * wpls;
3323  dptr = datad + i * wpld;
3324  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3325  *dptr = (*(sptr + wpls13)) |
3326  (*sptr) |
3327  (*(sptr - wpls13));
3328  }
3329  }
3330 }
3331 
3332 static void
3333 ferode_2_49(l_uint32 *datad,
3334  l_int32 w,
3335  l_int32 h,
3336  l_int32 wpld,
3337  l_uint32 *datas,
3338  l_int32 wpls)
3339 {
3340 l_int32 i;
3341 register l_int32 j, pwpls;
3342 register l_uint32 *sptr, *dptr;
3343 l_int32 wpls13;
3344 
3345  wpls13 = 13 * wpls;
3346  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3347 
3348  for (i = 0; i < h; i++) {
3349  sptr = datas + i * wpls;
3350  dptr = datad + i * wpld;
3351  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3352  *dptr = (*(sptr - wpls13)) &
3353  (*sptr) &
3354  (*(sptr + wpls13));
3355  }
3356  }
3357 }
3358 
3359 static void
3360 fdilate_2_50(l_uint32 *datad,
3361  l_int32 w,
3362  l_int32 h,
3363  l_int32 wpld,
3364  l_uint32 *datas,
3365  l_int32 wpls)
3366 {
3367 l_int32 i;
3368 register l_int32 j, pwpls;
3369 register l_uint32 *sptr, *dptr;
3370 
3371  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3372 
3373  for (i = 0; i < h; i++) {
3374  sptr = datas + i * wpls;
3375  dptr = datad + i * wpld;
3376  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3377  *dptr = ((*(sptr) << 16) | (*(sptr + 1) >> 16)) |
3378  ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
3379  (*sptr) |
3380  ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
3381  ((*(sptr) >> 16) | (*(sptr - 1) << 16));
3382  }
3383  }
3384 }
3385 
3386 static void
3387 ferode_2_50(l_uint32 *datad,
3388  l_int32 w,
3389  l_int32 h,
3390  l_int32 wpld,
3391  l_uint32 *datas,
3392  l_int32 wpls)
3393 {
3394 l_int32 i;
3395 register l_int32 j, pwpls;
3396 register l_uint32 *sptr, *dptr;
3397 
3398  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3399 
3400  for (i = 0; i < h; i++) {
3401  sptr = datas + i * wpls;
3402  dptr = datad + i * wpld;
3403  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3404  *dptr = ((*(sptr) >> 16) | (*(sptr - 1) << 16)) &
3405  ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
3406  (*sptr) &
3407  ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
3408  ((*(sptr) << 16) | (*(sptr + 1) >> 16));
3409  }
3410  }
3411 }
3412 
3413 static void
3414 fdilate_2_51(l_uint32 *datad,
3415  l_int32 w,
3416  l_int32 h,
3417  l_int32 wpld,
3418  l_uint32 *datas,
3419  l_int32 wpls)
3420 {
3421 l_int32 i;
3422 register l_int32 j, pwpls;
3423 register l_uint32 *sptr, *dptr;
3424 l_int32 wpls8;
3425 l_int32 wpls16;
3426 
3427  wpls8 = 8 * wpls;
3428  wpls16 = 16 * wpls;
3429  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3430 
3431  for (i = 0; i < h; i++) {
3432  sptr = datas + i * wpls;
3433  dptr = datad + i * wpld;
3434  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3435  *dptr = (*(sptr + wpls16)) |
3436  (*(sptr + wpls8)) |
3437  (*sptr) |
3438  (*(sptr - wpls8)) |
3439  (*(sptr - wpls16));
3440  }
3441  }
3442 }
3443 
3444 static void
3445 ferode_2_51(l_uint32 *datad,
3446  l_int32 w,
3447  l_int32 h,
3448  l_int32 wpld,
3449  l_uint32 *datas,
3450  l_int32 wpls)
3451 {
3452 l_int32 i;
3453 register l_int32 j, pwpls;
3454 register l_uint32 *sptr, *dptr;
3455 l_int32 wpls8;
3456 l_int32 wpls16;
3457 
3458  wpls8 = 8 * wpls;
3459  wpls16 = 16 * wpls;
3460  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3461 
3462  for (i = 0; i < h; i++) {
3463  sptr = datas + i * wpls;
3464  dptr = datad + i * wpld;
3465  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3466  *dptr = (*(sptr - wpls16)) &
3467  (*(sptr - wpls8)) &
3468  (*sptr) &
3469  (*(sptr + wpls8)) &
3470  (*(sptr + wpls16));
3471  }
3472  }
3473 }
3474 
3475 static void
3476 fdilate_2_52(l_uint32 *datad,
3477  l_int32 w,
3478  l_int32 h,
3479  l_int32 wpld,
3480  l_uint32 *datas,
3481  l_int32 wpls)
3482 {
3483 l_int32 i;
3484 register l_int32 j, pwpls;
3485 register l_uint32 *sptr, *dptr;
3486 
3487  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3488 
3489  for (i = 0; i < h; i++) {
3490  sptr = datas + i * wpls;
3491  dptr = datad + i * wpld;
3492  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3493  *dptr = ((*(sptr) << 18) | (*(sptr + 1) >> 14)) |
3494  ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
3495  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
3496  ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
3497  ((*(sptr) >> 10) | (*(sptr - 1) << 22)) |
3498  ((*(sptr) >> 17) | (*(sptr - 1) << 15));
3499  }
3500  }
3501 }
3502 
3503 static void
3504 ferode_2_52(l_uint32 *datad,
3505  l_int32 w,
3506  l_int32 h,
3507  l_int32 wpld,
3508  l_uint32 *datas,
3509  l_int32 wpls)
3510 {
3511 l_int32 i;
3512 register l_int32 j, pwpls;
3513 register l_uint32 *sptr, *dptr;
3514 
3515  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3516 
3517  for (i = 0; i < h; i++) {
3518  sptr = datas + i * wpls;
3519  dptr = datad + i * wpld;
3520  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3521  *dptr = ((*(sptr) >> 18) | (*(sptr - 1) << 14)) &
3522  ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
3523  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
3524  ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
3525  ((*(sptr) << 10) | (*(sptr + 1) >> 22)) &
3526  ((*(sptr) << 17) | (*(sptr + 1) >> 15));
3527  }
3528  }
3529 }
3530 
3531 static void
3532 fdilate_2_53(l_uint32 *datad,
3533  l_int32 w,
3534  l_int32 h,
3535  l_int32 wpld,
3536  l_uint32 *datas,
3537  l_int32 wpls)
3538 {
3539 l_int32 i;
3540 register l_int32 j, pwpls;
3541 register l_uint32 *sptr, *dptr;
3542 l_int32 wpls3;
3543 l_int32 wpls4;
3544 l_int32 wpls10;
3545 l_int32 wpls11;
3546 l_int32 wpls17;
3547 l_int32 wpls18;
3548 
3549  wpls3 = 3 * wpls;
3550  wpls4 = 4 * wpls;
3551  wpls10 = 10 * wpls;
3552  wpls11 = 11 * wpls;
3553  wpls17 = 17 * wpls;
3554  wpls18 = 18 * wpls;
3555  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3556 
3557  for (i = 0; i < h; i++) {
3558  sptr = datas + i * wpls;
3559  dptr = datad + i * wpld;
3560  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3561  *dptr = (*(sptr + wpls18)) |
3562  (*(sptr + wpls11)) |
3563  (*(sptr + wpls4)) |
3564  (*(sptr - wpls3)) |
3565  (*(sptr - wpls10)) |
3566  (*(sptr - wpls17));
3567  }
3568  }
3569 }
3570 
3571 static void
3572 ferode_2_53(l_uint32 *datad,
3573  l_int32 w,
3574  l_int32 h,
3575  l_int32 wpld,
3576  l_uint32 *datas,
3577  l_int32 wpls)
3578 {
3579 l_int32 i;
3580 register l_int32 j, pwpls;
3581 register l_uint32 *sptr, *dptr;
3582 l_int32 wpls3;
3583 l_int32 wpls4;
3584 l_int32 wpls10;
3585 l_int32 wpls11;
3586 l_int32 wpls17;
3587 l_int32 wpls18;
3588 
3589  wpls3 = 3 * wpls;
3590  wpls4 = 4 * wpls;
3591  wpls10 = 10 * wpls;
3592  wpls11 = 11 * wpls;
3593  wpls17 = 17 * wpls;
3594  wpls18 = 18 * wpls;
3595  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3596 
3597  for (i = 0; i < h; i++) {
3598  sptr = datas + i * wpls;
3599  dptr = datad + i * wpld;
3600  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3601  *dptr = (*(sptr - wpls18)) &
3602  (*(sptr - wpls11)) &
3603  (*(sptr - wpls4)) &
3604  (*(sptr + wpls3)) &
3605  (*(sptr + wpls10)) &
3606  (*(sptr + wpls17));
3607  }
3608  }
3609 }
3610 
3611 static void
3612 fdilate_2_54(l_uint32 *datad,
3613  l_int32 w,
3614  l_int32 h,
3615  l_int32 wpld,
3616  l_uint32 *datas,
3617  l_int32 wpls)
3618 {
3619 l_int32 i;
3620 register l_int32 j, pwpls;
3621 register l_uint32 *sptr, *dptr;
3622 
3623  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3624 
3625  for (i = 0; i < h; i++) {
3626  sptr = datas + i * wpls;
3627  dptr = datad + i * wpld;
3628  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3629  *dptr = ((*(sptr) << 17) | (*(sptr + 1) >> 15)) |
3630  ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
3631  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
3632  ((*(sptr) >> 16) | (*(sptr - 1) << 16));
3633  }
3634  }
3635 }
3636 
3637 static void
3638 ferode_2_54(l_uint32 *datad,
3639  l_int32 w,
3640  l_int32 h,
3641  l_int32 wpld,
3642  l_uint32 *datas,
3643  l_int32 wpls)
3644 {
3645 l_int32 i;
3646 register l_int32 j, pwpls;
3647 register l_uint32 *sptr, *dptr;
3648 
3649  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3650 
3651  for (i = 0; i < h; i++) {
3652  sptr = datas + i * wpls;
3653  dptr = datad + i * wpld;
3654  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3655  *dptr = ((*(sptr) >> 17) | (*(sptr - 1) << 15)) &
3656  ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
3657  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
3658  ((*(sptr) << 16) | (*(sptr + 1) >> 16));
3659  }
3660  }
3661 }
3662 
3663 static void
3664 fdilate_2_55(l_uint32 *datad,
3665  l_int32 w,
3666  l_int32 h,
3667  l_int32 wpld,
3668  l_uint32 *datas,
3669  l_int32 wpls)
3670 {
3671 l_int32 i;
3672 register l_int32 j, pwpls;
3673 register l_uint32 *sptr, *dptr;
3674 l_int32 wpls5;
3675 l_int32 wpls6;
3676 l_int32 wpls16;
3677 l_int32 wpls17;
3678 
3679  wpls5 = 5 * wpls;
3680  wpls6 = 6 * wpls;
3681  wpls16 = 16 * wpls;
3682  wpls17 = 17 * wpls;
3683  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3684 
3685  for (i = 0; i < h; i++) {
3686  sptr = datas + i * wpls;
3687  dptr = datad + i * wpld;
3688  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3689  *dptr = (*(sptr + wpls17)) |
3690  (*(sptr + wpls6)) |
3691  (*(sptr - wpls5)) |
3692  (*(sptr - wpls16));
3693  }
3694  }
3695 }
3696 
3697 static void
3698 ferode_2_55(l_uint32 *datad,
3699  l_int32 w,
3700  l_int32 h,
3701  l_int32 wpld,
3702  l_uint32 *datas,
3703  l_int32 wpls)
3704 {
3705 l_int32 i;
3706 register l_int32 j, pwpls;
3707 register l_uint32 *sptr, *dptr;
3708 l_int32 wpls5;
3709 l_int32 wpls6;
3710 l_int32 wpls16;
3711 l_int32 wpls17;
3712 
3713  wpls5 = 5 * wpls;
3714  wpls6 = 6 * wpls;
3715  wpls16 = 16 * wpls;
3716  wpls17 = 17 * wpls;
3717  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3718 
3719  for (i = 0; i < h; i++) {
3720  sptr = datas + i * wpls;
3721  dptr = datad + i * wpld;
3722  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3723  *dptr = (*(sptr - wpls17)) &
3724  (*(sptr - wpls6)) &
3725  (*(sptr + wpls5)) &
3726  (*(sptr + wpls16));
3727  }
3728  }
3729 }
3730 
3731 static void
3732 fdilate_2_56(l_uint32 *datad,
3733  l_int32 w,
3734  l_int32 h,
3735  l_int32 wpld,
3736  l_uint32 *datas,
3737  l_int32 wpls)
3738 {
3739 l_int32 i;
3740 register l_int32 j, pwpls;
3741 register l_uint32 *sptr, *dptr;
3742 
3743  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3744 
3745  for (i = 0; i < h; i++) {
3746  sptr = datas + i * wpls;
3747  dptr = datad + i * wpld;
3748  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3749  *dptr = ((*(sptr) << 18) | (*(sptr + 1) >> 14)) |
3750  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
3751  (*sptr) |
3752  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
3753  ((*(sptr) >> 18) | (*(sptr - 1) << 14));
3754  }
3755  }
3756 }
3757 
3758 static void
3759 ferode_2_56(l_uint32 *datad,
3760  l_int32 w,
3761  l_int32 h,
3762  l_int32 wpld,
3763  l_uint32 *datas,
3764  l_int32 wpls)
3765 {
3766 l_int32 i;
3767 register l_int32 j, pwpls;
3768 register l_uint32 *sptr, *dptr;
3769 
3770  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3771 
3772  for (i = 0; i < h; i++) {
3773  sptr = datas + i * wpls;
3774  dptr = datad + i * wpld;
3775  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3776  *dptr = ((*(sptr) >> 18) | (*(sptr - 1) << 14)) &
3777  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
3778  (*sptr) &
3779  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
3780  ((*(sptr) << 18) | (*(sptr + 1) >> 14));
3781  }
3782  }
3783 }
3784 
3785 static void
3786 fdilate_2_57(l_uint32 *datad,
3787  l_int32 w,
3788  l_int32 h,
3789  l_int32 wpld,
3790  l_uint32 *datas,
3791  l_int32 wpls)
3792 {
3793 l_int32 i;
3794 register l_int32 j, pwpls;
3795 register l_uint32 *sptr, *dptr;
3796 l_int32 wpls9;
3797 l_int32 wpls18;
3798 
3799  wpls9 = 9 * wpls;
3800  wpls18 = 18 * wpls;
3801  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3802 
3803  for (i = 0; i < h; i++) {
3804  sptr = datas + i * wpls;
3805  dptr = datad + i * wpld;
3806  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3807  *dptr = (*(sptr + wpls18)) |
3808  (*(sptr + wpls9)) |
3809  (*sptr) |
3810  (*(sptr - wpls9)) |
3811  (*(sptr - wpls18));
3812  }
3813  }
3814 }
3815 
3816 static void
3817 ferode_2_57(l_uint32 *datad,
3818  l_int32 w,
3819  l_int32 h,
3820  l_int32 wpld,
3821  l_uint32 *datas,
3822  l_int32 wpls)
3823 {
3824 l_int32 i;
3825 register l_int32 j, pwpls;
3826 register l_uint32 *sptr, *dptr;
3827 l_int32 wpls9;
3828 l_int32 wpls18;
3829 
3830  wpls9 = 9 * wpls;
3831  wpls18 = 18 * wpls;
3832  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3833 
3834  for (i = 0; i < h; i++) {
3835  sptr = datas + i * wpls;
3836  dptr = datad + i * wpld;
3837  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3838  *dptr = (*(sptr - wpls18)) &
3839  (*(sptr - wpls9)) &
3840  (*sptr) &
3841  (*(sptr + wpls9)) &
3842  (*(sptr + wpls18));
3843  }
3844  }
3845 }
3846 
3847 static void
3848 fdilate_2_58(l_uint32 *datad,
3849  l_int32 w,
3850  l_int32 h,
3851  l_int32 wpld,
3852  l_uint32 *datas,
3853  l_int32 wpls)
3854 {
3855 l_int32 i;
3856 register l_int32 j, pwpls;
3857 register l_uint32 *sptr, *dptr;
3858 
3859  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3860 
3861  for (i = 0; i < h; i++) {
3862  sptr = datas + i * wpls;
3863  dptr = datad + i * wpld;
3864  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3865  *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) |
3866  ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
3867  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
3868  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
3869  ((*(sptr) >> 12) | (*(sptr - 1) << 20)) |
3870  ((*(sptr) >> 20) | (*(sptr - 1) << 12));
3871  }
3872  }
3873 }
3874 
3875 static void
3876 ferode_2_58(l_uint32 *datad,
3877  l_int32 w,
3878  l_int32 h,
3879  l_int32 wpld,
3880  l_uint32 *datas,
3881  l_int32 wpls)
3882 {
3883 l_int32 i;
3884 register l_int32 j, pwpls;
3885 register l_uint32 *sptr, *dptr;
3886 
3887  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3888 
3889  for (i = 0; i < h; i++) {
3890  sptr = datas + i * wpls;
3891  dptr = datad + i * wpld;
3892  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3893  *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) &
3894  ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
3895  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
3896  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
3897  ((*(sptr) << 12) | (*(sptr + 1) >> 20)) &
3898  ((*(sptr) << 20) | (*(sptr + 1) >> 12));
3899  }
3900  }
3901 }
3902 
3903 static void
3904 fdilate_2_59(l_uint32 *datad,
3905  l_int32 w,
3906  l_int32 h,
3907  l_int32 wpld,
3908  l_uint32 *datas,
3909  l_int32 wpls)
3910 {
3911 l_int32 i;
3912 register l_int32 j, pwpls;
3913 register l_uint32 *sptr, *dptr;
3914 l_int32 wpls4;
3915 l_int32 wpls12;
3916 l_int32 wpls20;
3917 
3918  wpls4 = 4 * wpls;
3919  wpls12 = 12 * wpls;
3920  wpls20 = 20 * wpls;
3921  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3922 
3923  for (i = 0; i < h; i++) {
3924  sptr = datas + i * wpls;
3925  dptr = datad + i * wpld;
3926  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3927  *dptr = (*(sptr + wpls20)) |
3928  (*(sptr + wpls12)) |
3929  (*(sptr + wpls4)) |
3930  (*(sptr - wpls4)) |
3931  (*(sptr - wpls12)) |
3932  (*(sptr - wpls20));
3933  }
3934  }
3935 }
3936 
3937 static void
3938 ferode_2_59(l_uint32 *datad,
3939  l_int32 w,
3940  l_int32 h,
3941  l_int32 wpld,
3942  l_uint32 *datas,
3943  l_int32 wpls)
3944 {
3945 l_int32 i;
3946 register l_int32 j, pwpls;
3947 register l_uint32 *sptr, *dptr;
3948 l_int32 wpls4;
3949 l_int32 wpls12;
3950 l_int32 wpls20;
3951 
3952  wpls4 = 4 * wpls;
3953  wpls12 = 12 * wpls;
3954  wpls20 = 20 * wpls;
3955  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3956 
3957  for (i = 0; i < h; i++) {
3958  sptr = datas + i * wpls;
3959  dptr = datad + i * wpld;
3960  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3961  *dptr = (*(sptr - wpls20)) &
3962  (*(sptr - wpls12)) &
3963  (*(sptr - wpls4)) &
3964  (*(sptr + wpls4)) &
3965  (*(sptr + wpls12)) &
3966  (*(sptr + wpls20));
3967  }
3968  }
3969 }
3970 
3971 static void
3972 fdilate_2_60(l_uint32 *datad,
3973  l_int32 w,
3974  l_int32 h,
3975  l_int32 wpld,
3976  l_uint32 *datas,
3977  l_int32 wpls)
3978 {
3979 l_int32 i;
3980 register l_int32 j, pwpls;
3981 register l_uint32 *sptr, *dptr;
3982 
3983  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
3984 
3985  for (i = 0; i < h; i++) {
3986  sptr = datas + i * wpls;
3987  dptr = datad + i * wpld;
3988  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
3989  *dptr = ((*(sptr) << 21) | (*(sptr + 1) >> 11)) |
3990  ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
3991  ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
3992  (*sptr) |
3993  ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
3994  ((*(sptr) >> 14) | (*(sptr - 1) << 18)) |
3995  ((*(sptr) >> 21) | (*(sptr - 1) << 11));
3996  }
3997  }
3998 }
3999 
4000 static void
4001 ferode_2_60(l_uint32 *datad,
4002  l_int32 w,
4003  l_int32 h,
4004  l_int32 wpld,
4005  l_uint32 *datas,
4006  l_int32 wpls)
4007 {
4008 l_int32 i;
4009 register l_int32 j, pwpls;
4010 register l_uint32 *sptr, *dptr;
4011 
4012  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4013 
4014  for (i = 0; i < h; i++) {
4015  sptr = datas + i * wpls;
4016  dptr = datad + i * wpld;
4017  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4018  *dptr = ((*(sptr) >> 21) | (*(sptr - 1) << 11)) &
4019  ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
4020  ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
4021  (*sptr) &
4022  ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
4023  ((*(sptr) << 14) | (*(sptr + 1) >> 18)) &
4024  ((*(sptr) << 21) | (*(sptr + 1) >> 11));
4025  }
4026  }
4027 }
4028 
4029 static void
4030 fdilate_2_61(l_uint32 *datad,
4031  l_int32 w,
4032  l_int32 h,
4033  l_int32 wpld,
4034  l_uint32 *datas,
4035  l_int32 wpls)
4036 {
4037 l_int32 i;
4038 register l_int32 j, pwpls;
4039 register l_uint32 *sptr, *dptr;
4040 l_int32 wpls7;
4041 l_int32 wpls14;
4042 l_int32 wpls21;
4043 
4044  wpls7 = 7 * wpls;
4045  wpls14 = 14 * wpls;
4046  wpls21 = 21 * wpls;
4047  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4048 
4049  for (i = 0; i < h; i++) {
4050  sptr = datas + i * wpls;
4051  dptr = datad + i * wpld;
4052  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4053  *dptr = (*(sptr + wpls21)) |
4054  (*(sptr + wpls14)) |
4055  (*(sptr + wpls7)) |
4056  (*sptr) |
4057  (*(sptr - wpls7)) |
4058  (*(sptr - wpls14)) |
4059  (*(sptr - wpls21));
4060  }
4061  }
4062 }
4063 
4064 static void
4065 ferode_2_61(l_uint32 *datad,
4066  l_int32 w,
4067  l_int32 h,
4068  l_int32 wpld,
4069  l_uint32 *datas,
4070  l_int32 wpls)
4071 {
4072 l_int32 i;
4073 register l_int32 j, pwpls;
4074 register l_uint32 *sptr, *dptr;
4075 l_int32 wpls7;
4076 l_int32 wpls14;
4077 l_int32 wpls21;
4078 
4079  wpls7 = 7 * wpls;
4080  wpls14 = 14 * wpls;
4081  wpls21 = 21 * wpls;
4082  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4083 
4084  for (i = 0; i < h; i++) {
4085  sptr = datas + i * wpls;
4086  dptr = datad + i * wpld;
4087  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4088  *dptr = (*(sptr - wpls21)) &
4089  (*(sptr - wpls14)) &
4090  (*(sptr - wpls7)) &
4091  (*sptr) &
4092  (*(sptr + wpls7)) &
4093  (*(sptr + wpls14)) &
4094  (*(sptr + wpls21));
4095  }
4096  }
4097 }
4098 
4099 static void
4100 fdilate_2_62(l_uint32 *datad,
4101  l_int32 w,
4102  l_int32 h,
4103  l_int32 wpld,
4104  l_uint32 *datas,
4105  l_int32 wpls)
4106 {
4107 l_int32 i;
4108 register l_int32 j, pwpls;
4109 register l_uint32 *sptr, *dptr;
4110 
4111  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4112 
4113  for (i = 0; i < h; i++) {
4114  sptr = datas + i * wpls;
4115  dptr = datad + i * wpld;
4116  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4117  *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) |
4118  ((*(sptr) << 10) | (*(sptr + 1) >> 22)) |
4119  (*sptr) |
4120  ((*(sptr) >> 10) | (*(sptr - 1) << 22)) |
4121  ((*(sptr) >> 20) | (*(sptr - 1) << 12));
4122  }
4123  }
4124 }
4125 
4126 static void
4127 ferode_2_62(l_uint32 *datad,
4128  l_int32 w,
4129  l_int32 h,
4130  l_int32 wpld,
4131  l_uint32 *datas,
4132  l_int32 wpls)
4133 {
4134 l_int32 i;
4135 register l_int32 j, pwpls;
4136 register l_uint32 *sptr, *dptr;
4137 
4138  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4139 
4140  for (i = 0; i < h; i++) {
4141  sptr = datas + i * wpls;
4142  dptr = datad + i * wpld;
4143  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4144  *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) &
4145  ((*(sptr) >> 10) | (*(sptr - 1) << 22)) &
4146  (*sptr) &
4147  ((*(sptr) << 10) | (*(sptr + 1) >> 22)) &
4148  ((*(sptr) << 20) | (*(sptr + 1) >> 12));
4149  }
4150  }
4151 }
4152 
4153 static void
4154 fdilate_2_63(l_uint32 *datad,
4155  l_int32 w,
4156  l_int32 h,
4157  l_int32 wpld,
4158  l_uint32 *datas,
4159  l_int32 wpls)
4160 {
4161 l_int32 i;
4162 register l_int32 j, pwpls;
4163 register l_uint32 *sptr, *dptr;
4164 l_int32 wpls10;
4165 l_int32 wpls20;
4166 
4167  wpls10 = 10 * wpls;
4168  wpls20 = 20 * wpls;
4169  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4170 
4171  for (i = 0; i < h; i++) {
4172  sptr = datas + i * wpls;
4173  dptr = datad + i * wpld;
4174  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4175  *dptr = (*(sptr + wpls20)) |
4176  (*(sptr + wpls10)) |
4177  (*sptr) |
4178  (*(sptr - wpls10)) |
4179  (*(sptr - wpls20));
4180  }
4181  }
4182 }
4183 
4184 static void
4185 ferode_2_63(l_uint32 *datad,
4186  l_int32 w,
4187  l_int32 h,
4188  l_int32 wpld,
4189  l_uint32 *datas,
4190  l_int32 wpls)
4191 {
4192 l_int32 i;
4193 register l_int32 j, pwpls;
4194 register l_uint32 *sptr, *dptr;
4195 l_int32 wpls10;
4196 l_int32 wpls20;
4197 
4198  wpls10 = 10 * wpls;
4199  wpls20 = 20 * wpls;
4200  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4201 
4202  for (i = 0; i < h; i++) {
4203  sptr = datas + i * wpls;
4204  dptr = datad + i * wpld;
4205  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4206  *dptr = (*(sptr - wpls20)) &
4207  (*(sptr - wpls10)) &
4208  (*sptr) &
4209  (*(sptr + wpls10)) &
4210  (*(sptr + wpls20));
4211  }
4212  }
4213 }
4214 
4215 static void
4216 fdilate_2_64(l_uint32 *datad,
4217  l_int32 w,
4218  l_int32 h,
4219  l_int32 wpld,
4220  l_uint32 *datas,
4221  l_int32 wpls)
4222 {
4223 l_int32 i;
4224 register l_int32 j, pwpls;
4225 register l_uint32 *sptr, *dptr;
4226 
4227  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4228 
4229  for (i = 0; i < h; i++) {
4230  sptr = datas + i * wpls;
4231  dptr = datad + i * wpld;
4232  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4233  *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) |
4234  ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
4235  ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
4236  ((*(sptr) >> 19) | (*(sptr - 1) << 13));
4237  }
4238  }
4239 }
4240 
4241 static void
4242 ferode_2_64(l_uint32 *datad,
4243  l_int32 w,
4244  l_int32 h,
4245  l_int32 wpld,
4246  l_uint32 *datas,
4247  l_int32 wpls)
4248 {
4249 l_int32 i;
4250 register l_int32 j, pwpls;
4251 register l_uint32 *sptr, *dptr;
4252 
4253  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4254 
4255  for (i = 0; i < h; i++) {
4256  sptr = datas + i * wpls;
4257  dptr = datad + i * wpld;
4258  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4259  *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) &
4260  ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
4261  ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
4262  ((*(sptr) << 19) | (*(sptr + 1) >> 13));
4263  }
4264  }
4265 }
4266 
4267 static void
4268 fdilate_2_65(l_uint32 *datad,
4269  l_int32 w,
4270  l_int32 h,
4271  l_int32 wpld,
4272  l_uint32 *datas,
4273  l_int32 wpls)
4274 {
4275 l_int32 i;
4276 register l_int32 j, pwpls;
4277 register l_uint32 *sptr, *dptr;
4278 l_int32 wpls6;
4279 l_int32 wpls7;
4280 l_int32 wpls19;
4281 l_int32 wpls20;
4282 
4283  wpls6 = 6 * wpls;
4284  wpls7 = 7 * wpls;
4285  wpls19 = 19 * wpls;
4286  wpls20 = 20 * wpls;
4287  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4288 
4289  for (i = 0; i < h; i++) {
4290  sptr = datas + i * wpls;
4291  dptr = datad + i * wpld;
4292  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4293  *dptr = (*(sptr + wpls20)) |
4294  (*(sptr + wpls7)) |
4295  (*(sptr - wpls6)) |
4296  (*(sptr - wpls19));
4297  }
4298  }
4299 }
4300 
4301 static void
4302 ferode_2_65(l_uint32 *datad,
4303  l_int32 w,
4304  l_int32 h,
4305  l_int32 wpld,
4306  l_uint32 *datas,
4307  l_int32 wpls)
4308 {
4309 l_int32 i;
4310 register l_int32 j, pwpls;
4311 register l_uint32 *sptr, *dptr;
4312 l_int32 wpls6;
4313 l_int32 wpls7;
4314 l_int32 wpls19;
4315 l_int32 wpls20;
4316 
4317  wpls6 = 6 * wpls;
4318  wpls7 = 7 * wpls;
4319  wpls19 = 19 * wpls;
4320  wpls20 = 20 * wpls;
4321  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4322 
4323  for (i = 0; i < h; i++) {
4324  sptr = datas + i * wpls;
4325  dptr = datad + i * wpld;
4326  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4327  *dptr = (*(sptr - wpls20)) &
4328  (*(sptr - wpls7)) &
4329  (*(sptr + wpls6)) &
4330  (*(sptr + wpls19));
4331  }
4332  }
4333 }
4334 
4335 static void
4336 fdilate_2_66(l_uint32 *datad,
4337  l_int32 w,
4338  l_int32 h,
4339  l_int32 wpld,
4340  l_uint32 *datas,
4341  l_int32 wpls)
4342 {
4343 l_int32 i;
4344 register l_int32 j, pwpls;
4345 register l_uint32 *sptr, *dptr;
4346 
4347  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4348 
4349  for (i = 0; i < h; i++) {
4350  sptr = datas + i * wpls;
4351  dptr = datad + i * wpld;
4352  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4353  *dptr = ((*(sptr) << 23) | (*(sptr + 1) >> 9)) |
4354  ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
4355  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
4356  ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
4357  ((*(sptr) >> 13) | (*(sptr - 1) << 19)) |
4358  ((*(sptr) >> 22) | (*(sptr - 1) << 10));
4359  }
4360  }
4361 }
4362 
4363 static void
4364 ferode_2_66(l_uint32 *datad,
4365  l_int32 w,
4366  l_int32 h,
4367  l_int32 wpld,
4368  l_uint32 *datas,
4369  l_int32 wpls)
4370 {
4371 l_int32 i;
4372 register l_int32 j, pwpls;
4373 register l_uint32 *sptr, *dptr;
4374 
4375  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4376 
4377  for (i = 0; i < h; i++) {
4378  sptr = datas + i * wpls;
4379  dptr = datad + i * wpld;
4380  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4381  *dptr = ((*(sptr) >> 23) | (*(sptr - 1) << 9)) &
4382  ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
4383  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
4384  ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
4385  ((*(sptr) << 13) | (*(sptr + 1) >> 19)) &
4386  ((*(sptr) << 22) | (*(sptr + 1) >> 10));
4387  }
4388  }
4389 }
4390 
4391 static void
4392 fdilate_2_67(l_uint32 *datad,
4393  l_int32 w,
4394  l_int32 h,
4395  l_int32 wpld,
4396  l_uint32 *datas,
4397  l_int32 wpls)
4398 {
4399 l_int32 i;
4400 register l_int32 j, pwpls;
4401 register l_uint32 *sptr, *dptr;
4402 l_int32 wpls4;
4403 l_int32 wpls5;
4404 l_int32 wpls13;
4405 l_int32 wpls14;
4406 l_int32 wpls22;
4407 l_int32 wpls23;
4408 
4409  wpls4 = 4 * wpls;
4410  wpls5 = 5 * wpls;
4411  wpls13 = 13 * wpls;
4412  wpls14 = 14 * wpls;
4413  wpls22 = 22 * wpls;
4414  wpls23 = 23 * wpls;
4415  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4416 
4417  for (i = 0; i < h; i++) {
4418  sptr = datas + i * wpls;
4419  dptr = datad + i * wpld;
4420  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4421  *dptr = (*(sptr + wpls23)) |
4422  (*(sptr + wpls14)) |
4423  (*(sptr + wpls5)) |
4424  (*(sptr - wpls4)) |
4425  (*(sptr - wpls13)) |
4426  (*(sptr - wpls22));
4427  }
4428  }
4429 }
4430 
4431 static void
4432 ferode_2_67(l_uint32 *datad,
4433  l_int32 w,
4434  l_int32 h,
4435  l_int32 wpld,
4436  l_uint32 *datas,
4437  l_int32 wpls)
4438 {
4439 l_int32 i;
4440 register l_int32 j, pwpls;
4441 register l_uint32 *sptr, *dptr;
4442 l_int32 wpls4;
4443 l_int32 wpls5;
4444 l_int32 wpls13;
4445 l_int32 wpls14;
4446 l_int32 wpls22;
4447 l_int32 wpls23;
4448 
4449  wpls4 = 4 * wpls;
4450  wpls5 = 5 * wpls;
4451  wpls13 = 13 * wpls;
4452  wpls14 = 14 * wpls;
4453  wpls22 = 22 * wpls;
4454  wpls23 = 23 * wpls;
4455  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4456 
4457  for (i = 0; i < h; i++) {
4458  sptr = datas + i * wpls;
4459  dptr = datad + i * wpld;
4460  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4461  *dptr = (*(sptr - wpls23)) &
4462  (*(sptr - wpls14)) &
4463  (*(sptr - wpls5)) &
4464  (*(sptr + wpls4)) &
4465  (*(sptr + wpls13)) &
4466  (*(sptr + wpls22));
4467  }
4468  }
4469 }
4470 
4471 static void
4472 fdilate_2_68(l_uint32 *datad,
4473  l_int32 w,
4474  l_int32 h,
4475  l_int32 wpld,
4476  l_uint32 *datas,
4477  l_int32 wpls)
4478 {
4479 l_int32 i;
4480 register l_int32 j, pwpls;
4481 register l_uint32 *sptr, *dptr;
4482 
4483  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4484 
4485  for (i = 0; i < h; i++) {
4486  sptr = datas + i * wpls;
4487  dptr = datad + i * wpld;
4488  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4489  *dptr = ((*(sptr) << 22) | (*(sptr + 1) >> 10)) |
4490  ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
4491  (*sptr) |
4492  ((*(sptr) >> 11) | (*(sptr - 1) << 21)) |
4493  ((*(sptr) >> 22) | (*(sptr - 1) << 10));
4494  }
4495  }
4496 }
4497 
4498 static void
4499 ferode_2_68(l_uint32 *datad,
4500  l_int32 w,
4501  l_int32 h,
4502  l_int32 wpld,
4503  l_uint32 *datas,
4504  l_int32 wpls)
4505 {
4506 l_int32 i;
4507 register l_int32 j, pwpls;
4508 register l_uint32 *sptr, *dptr;
4509 
4510  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4511 
4512  for (i = 0; i < h; i++) {
4513  sptr = datas + i * wpls;
4514  dptr = datad + i * wpld;
4515  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4516  *dptr = ((*(sptr) >> 22) | (*(sptr - 1) << 10)) &
4517  ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
4518  (*sptr) &
4519  ((*(sptr) << 11) | (*(sptr + 1) >> 21)) &
4520  ((*(sptr) << 22) | (*(sptr + 1) >> 10));
4521  }
4522  }
4523 }
4524 
4525 static void
4526 fdilate_2_69(l_uint32 *datad,
4527  l_int32 w,
4528  l_int32 h,
4529  l_int32 wpld,
4530  l_uint32 *datas,
4531  l_int32 wpls)
4532 {
4533 l_int32 i;
4534 register l_int32 j, pwpls;
4535 register l_uint32 *sptr, *dptr;
4536 l_int32 wpls11;
4537 l_int32 wpls22;
4538 
4539  wpls11 = 11 * wpls;
4540  wpls22 = 22 * wpls;
4541  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4542 
4543  for (i = 0; i < h; i++) {
4544  sptr = datas + i * wpls;
4545  dptr = datad + i * wpld;
4546  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4547  *dptr = (*(sptr + wpls22)) |
4548  (*(sptr + wpls11)) |
4549  (*sptr) |
4550  (*(sptr - wpls11)) |
4551  (*(sptr - wpls22));
4552  }
4553  }
4554 }
4555 
4556 static void
4557 ferode_2_69(l_uint32 *datad,
4558  l_int32 w,
4559  l_int32 h,
4560  l_int32 wpld,
4561  l_uint32 *datas,
4562  l_int32 wpls)
4563 {
4564 l_int32 i;
4565 register l_int32 j, pwpls;
4566 register l_uint32 *sptr, *dptr;
4567 l_int32 wpls11;
4568 l_int32 wpls22;
4569 
4570  wpls11 = 11 * wpls;
4571  wpls22 = 22 * wpls;
4572  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4573 
4574  for (i = 0; i < h; i++) {
4575  sptr = datas + i * wpls;
4576  dptr = datad + i * wpld;
4577  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4578  *dptr = (*(sptr - wpls22)) &
4579  (*(sptr - wpls11)) &
4580  (*sptr) &
4581  (*(sptr + wpls11)) &
4582  (*(sptr + wpls22));
4583  }
4584  }
4585 }
4586 
4587 static void
4588 fdilate_2_70(l_uint32 *datad,
4589  l_int32 w,
4590  l_int32 h,
4591  l_int32 wpld,
4592  l_uint32 *datas,
4593  l_int32 wpls)
4594 {
4595 l_int32 i;
4596 register l_int32 j, pwpls;
4597 register l_uint32 *sptr, *dptr;
4598 
4599  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4600 
4601  for (i = 0; i < h; i++) {
4602  sptr = datas + i * wpls;
4603  dptr = datad + i * wpld;
4604  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4605  *dptr = ((*(sptr) << 24) | (*(sptr + 1) >> 8)) |
4606  ((*(sptr) << 16) | (*(sptr + 1) >> 16)) |
4607  ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
4608  (*sptr) |
4609  ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
4610  ((*(sptr) >> 16) | (*(sptr - 1) << 16)) |
4611  ((*(sptr) >> 24) | (*(sptr - 1) << 8));
4612  }
4613  }
4614 }
4615 
4616 static void
4617 ferode_2_70(l_uint32 *datad,
4618  l_int32 w,
4619  l_int32 h,
4620  l_int32 wpld,
4621  l_uint32 *datas,
4622  l_int32 wpls)
4623 {
4624 l_int32 i;
4625 register l_int32 j, pwpls;
4626 register l_uint32 *sptr, *dptr;
4627 
4628  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4629 
4630  for (i = 0; i < h; i++) {
4631  sptr = datas + i * wpls;
4632  dptr = datad + i * wpld;
4633  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4634  *dptr = ((*(sptr) >> 24) | (*(sptr - 1) << 8)) &
4635  ((*(sptr) >> 16) | (*(sptr - 1) << 16)) &
4636  ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
4637  (*sptr) &
4638  ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
4639  ((*(sptr) << 16) | (*(sptr + 1) >> 16)) &
4640  ((*(sptr) << 24) | (*(sptr + 1) >> 8));
4641  }
4642  }
4643 }
4644 
4645 static void
4646 fdilate_2_71(l_uint32 *datad,
4647  l_int32 w,
4648  l_int32 h,
4649  l_int32 wpld,
4650  l_uint32 *datas,
4651  l_int32 wpls)
4652 {
4653 l_int32 i;
4654 register l_int32 j, pwpls;
4655 register l_uint32 *sptr, *dptr;
4656 l_int32 wpls8;
4657 l_int32 wpls16;
4658 l_int32 wpls24;
4659 
4660  wpls8 = 8 * wpls;
4661  wpls16 = 16 * wpls;
4662  wpls24 = 24 * wpls;
4663  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4664 
4665  for (i = 0; i < h; i++) {
4666  sptr = datas + i * wpls;
4667  dptr = datad + i * wpld;
4668  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4669  *dptr = (*(sptr + wpls24)) |
4670  (*(sptr + wpls16)) |
4671  (*(sptr + wpls8)) |
4672  (*sptr) |
4673  (*(sptr - wpls8)) |
4674  (*(sptr - wpls16)) |
4675  (*(sptr - wpls24));
4676  }
4677  }
4678 }
4679 
4680 static void
4681 ferode_2_71(l_uint32 *datad,
4682  l_int32 w,
4683  l_int32 h,
4684  l_int32 wpld,
4685  l_uint32 *datas,
4686  l_int32 wpls)
4687 {
4688 l_int32 i;
4689 register l_int32 j, pwpls;
4690 register l_uint32 *sptr, *dptr;
4691 l_int32 wpls8;
4692 l_int32 wpls16;
4693 l_int32 wpls24;
4694 
4695  wpls8 = 8 * wpls;
4696  wpls16 = 16 * wpls;
4697  wpls24 = 24 * wpls;
4698  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4699 
4700  for (i = 0; i < h; i++) {
4701  sptr = datas + i * wpls;
4702  dptr = datad + i * wpld;
4703  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4704  *dptr = (*(sptr - wpls24)) &
4705  (*(sptr - wpls16)) &
4706  (*(sptr - wpls8)) &
4707  (*sptr) &
4708  (*(sptr + wpls8)) &
4709  (*(sptr + wpls16)) &
4710  (*(sptr + wpls24));
4711  }
4712  }
4713 }
4714 
4715 static void
4716 fdilate_2_72(l_uint32 *datad,
4717  l_int32 w,
4718  l_int32 h,
4719  l_int32 wpld,
4720  l_uint32 *datas,
4721  l_int32 wpls)
4722 {
4723 l_int32 i;
4724 register l_int32 j, pwpls;
4725 register l_uint32 *sptr, *dptr;
4726 
4727  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4728 
4729  for (i = 0; i < h; i++) {
4730  sptr = datas + i * wpls;
4731  dptr = datad + i * wpld;
4732  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4733  *dptr = ((*(sptr) << 25) | (*(sptr + 1) >> 7)) |
4734  ((*(sptr) << 15) | (*(sptr + 1) >> 17)) |
4735  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
4736  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
4737  ((*(sptr) >> 15) | (*(sptr - 1) << 17)) |
4738  ((*(sptr) >> 25) | (*(sptr - 1) << 7));
4739  }
4740  }
4741 }
4742 
4743 static void
4744 ferode_2_72(l_uint32 *datad,
4745  l_int32 w,
4746  l_int32 h,
4747  l_int32 wpld,
4748  l_uint32 *datas,
4749  l_int32 wpls)
4750 {
4751 l_int32 i;
4752 register l_int32 j, pwpls;
4753 register l_uint32 *sptr, *dptr;
4754 
4755  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4756 
4757  for (i = 0; i < h; i++) {
4758  sptr = datas + i * wpls;
4759  dptr = datad + i * wpld;
4760  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4761  *dptr = ((*(sptr) >> 25) | (*(sptr - 1) << 7)) &
4762  ((*(sptr) >> 15) | (*(sptr - 1) << 17)) &
4763  ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
4764  ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
4765  ((*(sptr) << 15) | (*(sptr + 1) >> 17)) &
4766  ((*(sptr) << 25) | (*(sptr + 1) >> 7));
4767  }
4768  }
4769 }
4770 
4771 static void
4772 fdilate_2_73(l_uint32 *datad,
4773  l_int32 w,
4774  l_int32 h,
4775  l_int32 wpld,
4776  l_uint32 *datas,
4777  l_int32 wpls)
4778 {
4779 l_int32 i;
4780 register l_int32 j, pwpls;
4781 register l_uint32 *sptr, *dptr;
4782 l_int32 wpls5;
4783 l_int32 wpls15;
4784 l_int32 wpls25;
4785 
4786  wpls5 = 5 * wpls;
4787  wpls15 = 15 * wpls;
4788  wpls25 = 25 * wpls;
4789  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4790 
4791  for (i = 0; i < h; i++) {
4792  sptr = datas + i * wpls;
4793  dptr = datad + i * wpld;
4794  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4795  *dptr = (*(sptr + wpls25)) |
4796  (*(sptr + wpls15)) |
4797  (*(sptr + wpls5)) |
4798  (*(sptr - wpls5)) |
4799  (*(sptr - wpls15)) |
4800  (*(sptr - wpls25));
4801  }
4802  }
4803 }
4804 
4805 static void
4806 ferode_2_73(l_uint32 *datad,
4807  l_int32 w,
4808  l_int32 h,
4809  l_int32 wpld,
4810  l_uint32 *datas,
4811  l_int32 wpls)
4812 {
4813 l_int32 i;
4814 register l_int32 j, pwpls;
4815 register l_uint32 *sptr, *dptr;
4816 l_int32 wpls5;
4817 l_int32 wpls15;
4818 l_int32 wpls25;
4819 
4820  wpls5 = 5 * wpls;
4821  wpls15 = 15 * wpls;
4822  wpls25 = 25 * wpls;
4823  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4824 
4825  for (i = 0; i < h; i++) {
4826  sptr = datas + i * wpls;
4827  dptr = datad + i * wpld;
4828  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4829  *dptr = (*(sptr - wpls25)) &
4830  (*(sptr - wpls15)) &
4831  (*(sptr - wpls5)) &
4832  (*(sptr + wpls5)) &
4833  (*(sptr + wpls15)) &
4834  (*(sptr + wpls25));
4835  }
4836  }
4837 }
4838 
4839 static void
4840 fdilate_2_74(l_uint32 *datad,
4841  l_int32 w,
4842  l_int32 h,
4843  l_int32 wpld,
4844  l_uint32 *datas,
4845  l_int32 wpls)
4846 {
4847 l_int32 i;
4848 register l_int32 j, pwpls;
4849 register l_uint32 *sptr, *dptr;
4850 
4851  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4852 
4853  for (i = 0; i < h; i++) {
4854  sptr = datas + i * wpls;
4855  dptr = datad + i * wpld;
4856  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4857  *dptr = ((*(sptr) << 27) | (*(sptr + 1) >> 5)) |
4858  ((*(sptr) << 18) | (*(sptr + 1) >> 14)) |
4859  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
4860  (*sptr) |
4861  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
4862  ((*(sptr) >> 18) | (*(sptr - 1) << 14)) |
4863  ((*(sptr) >> 27) | (*(sptr - 1) << 5));
4864  }
4865  }
4866 }
4867 
4868 static void
4869 ferode_2_74(l_uint32 *datad,
4870  l_int32 w,
4871  l_int32 h,
4872  l_int32 wpld,
4873  l_uint32 *datas,
4874  l_int32 wpls)
4875 {
4876 l_int32 i;
4877 register l_int32 j, pwpls;
4878 register l_uint32 *sptr, *dptr;
4879 
4880  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4881 
4882  for (i = 0; i < h; i++) {
4883  sptr = datas + i * wpls;
4884  dptr = datad + i * wpld;
4885  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4886  *dptr = ((*(sptr) >> 27) | (*(sptr - 1) << 5)) &
4887  ((*(sptr) >> 18) | (*(sptr - 1) << 14)) &
4888  ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
4889  (*sptr) &
4890  ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
4891  ((*(sptr) << 18) | (*(sptr + 1) >> 14)) &
4892  ((*(sptr) << 27) | (*(sptr + 1) >> 5));
4893  }
4894  }
4895 }
4896 
4897 static void
4898 fdilate_2_75(l_uint32 *datad,
4899  l_int32 w,
4900  l_int32 h,
4901  l_int32 wpld,
4902  l_uint32 *datas,
4903  l_int32 wpls)
4904 {
4905 l_int32 i;
4906 register l_int32 j, pwpls;
4907 register l_uint32 *sptr, *dptr;
4908 l_int32 wpls9;
4909 l_int32 wpls18;
4910 l_int32 wpls27;
4911 
4912  wpls9 = 9 * wpls;
4913  wpls18 = 18 * wpls;
4914  wpls27 = 27 * wpls;
4915  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4916 
4917  for (i = 0; i < h; i++) {
4918  sptr = datas + i * wpls;
4919  dptr = datad + i * wpld;
4920  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4921  *dptr = (*(sptr + wpls27)) |
4922  (*(sptr + wpls18)) |
4923  (*(sptr + wpls9)) |
4924  (*sptr) |
4925  (*(sptr - wpls9)) |
4926  (*(sptr - wpls18)) |
4927  (*(sptr - wpls27));
4928  }
4929  }
4930 }
4931 
4932 static void
4933 ferode_2_75(l_uint32 *datad,
4934  l_int32 w,
4935  l_int32 h,
4936  l_int32 wpld,
4937  l_uint32 *datas,
4938  l_int32 wpls)
4939 {
4940 l_int32 i;
4941 register l_int32 j, pwpls;
4942 register l_uint32 *sptr, *dptr;
4943 l_int32 wpls9;
4944 l_int32 wpls18;
4945 l_int32 wpls27;
4946 
4947  wpls9 = 9 * wpls;
4948  wpls18 = 18 * wpls;
4949  wpls27 = 27 * wpls;
4950  pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */
4951 
4952  for (i = 0; i < h; i++) {
4953  sptr = datas + i * wpls;
4954  dptr = datad + i * wpld;
4955  for (j = 0; j < pwpls; j++, sptr++, dptr++) {
4956  *dptr = (*(sptr - wpls27)) &
4957  (*(sptr - wpls18)) &
4958  (*(sptr - wpls9)) &
4959  (*sptr) &
4960  (*(sptr + wpls9)) &
4961  (*(sptr + wpls18)) &
4962  (*(sptr + wpls27));
4963  }
4964  }
4965 }
l_int32 h
Definition: dewarp.h:164
l_int32 w
Definition: dewarp.h:163