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