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