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