Mercurial > hgrepos > Python2 > PyMuPDF
comparison mupdf-source/thirdparty/leptonica/src/dwacomblow.2.c @ 2:b50eed0cc0ef upstream
ADD: MuPDF v1.26.7: the MuPDF source as downloaded by a default build of PyMuPDF 1.26.4.
The directory name has changed: no version number in the expanded directory now.
| author | Franz Glasner <fzglas.hg@dom66.de> |
|---|---|
| date | Mon, 15 Sep 2025 11:43:07 +0200 |
| parents | |
| children |
comparison
equal
deleted
inserted
replaced
| 1:1d09e1dec1d9 | 2:b50eed0cc0ef |
|---|---|
| 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 { | |
| 215 | |
| 216 switch (index) | |
| 217 { | |
| 218 case 0: | |
| 219 fdilate_2_0(datad, w, h, wpld, datas, wpls); | |
| 220 break; | |
| 221 case 1: | |
| 222 ferode_2_0(datad, w, h, wpld, datas, wpls); | |
| 223 break; | |
| 224 case 2: | |
| 225 fdilate_2_1(datad, w, h, wpld, datas, wpls); | |
| 226 break; | |
| 227 case 3: | |
| 228 ferode_2_1(datad, w, h, wpld, datas, wpls); | |
| 229 break; | |
| 230 case 4: | |
| 231 fdilate_2_2(datad, w, h, wpld, datas, wpls); | |
| 232 break; | |
| 233 case 5: | |
| 234 ferode_2_2(datad, w, h, wpld, datas, wpls); | |
| 235 break; | |
| 236 case 6: | |
| 237 fdilate_2_3(datad, w, h, wpld, datas, wpls); | |
| 238 break; | |
| 239 case 7: | |
| 240 ferode_2_3(datad, w, h, wpld, datas, wpls); | |
| 241 break; | |
| 242 case 8: | |
| 243 fdilate_2_4(datad, w, h, wpld, datas, wpls); | |
| 244 break; | |
| 245 case 9: | |
| 246 ferode_2_4(datad, w, h, wpld, datas, wpls); | |
| 247 break; | |
| 248 case 10: | |
| 249 fdilate_2_5(datad, w, h, wpld, datas, wpls); | |
| 250 break; | |
| 251 case 11: | |
| 252 ferode_2_5(datad, w, h, wpld, datas, wpls); | |
| 253 break; | |
| 254 case 12: | |
| 255 fdilate_2_6(datad, w, h, wpld, datas, wpls); | |
| 256 break; | |
| 257 case 13: | |
| 258 ferode_2_6(datad, w, h, wpld, datas, wpls); | |
| 259 break; | |
| 260 case 14: | |
| 261 fdilate_2_7(datad, w, h, wpld, datas, wpls); | |
| 262 break; | |
| 263 case 15: | |
| 264 ferode_2_7(datad, w, h, wpld, datas, wpls); | |
| 265 break; | |
| 266 case 16: | |
| 267 fdilate_2_8(datad, w, h, wpld, datas, wpls); | |
| 268 break; | |
| 269 case 17: | |
| 270 ferode_2_8(datad, w, h, wpld, datas, wpls); | |
| 271 break; | |
| 272 case 18: | |
| 273 fdilate_2_9(datad, w, h, wpld, datas, wpls); | |
| 274 break; | |
| 275 case 19: | |
| 276 ferode_2_9(datad, w, h, wpld, datas, wpls); | |
| 277 break; | |
| 278 case 20: | |
| 279 fdilate_2_10(datad, w, h, wpld, datas, wpls); | |
| 280 break; | |
| 281 case 21: | |
| 282 ferode_2_10(datad, w, h, wpld, datas, wpls); | |
| 283 break; | |
| 284 case 22: | |
| 285 fdilate_2_11(datad, w, h, wpld, datas, wpls); | |
| 286 break; | |
| 287 case 23: | |
| 288 ferode_2_11(datad, w, h, wpld, datas, wpls); | |
| 289 break; | |
| 290 case 24: | |
| 291 fdilate_2_12(datad, w, h, wpld, datas, wpls); | |
| 292 break; | |
| 293 case 25: | |
| 294 ferode_2_12(datad, w, h, wpld, datas, wpls); | |
| 295 break; | |
| 296 case 26: | |
| 297 fdilate_2_13(datad, w, h, wpld, datas, wpls); | |
| 298 break; | |
| 299 case 27: | |
| 300 ferode_2_13(datad, w, h, wpld, datas, wpls); | |
| 301 break; | |
| 302 case 28: | |
| 303 fdilate_2_14(datad, w, h, wpld, datas, wpls); | |
| 304 break; | |
| 305 case 29: | |
| 306 ferode_2_14(datad, w, h, wpld, datas, wpls); | |
| 307 break; | |
| 308 case 30: | |
| 309 fdilate_2_15(datad, w, h, wpld, datas, wpls); | |
| 310 break; | |
| 311 case 31: | |
| 312 ferode_2_15(datad, w, h, wpld, datas, wpls); | |
| 313 break; | |
| 314 case 32: | |
| 315 fdilate_2_16(datad, w, h, wpld, datas, wpls); | |
| 316 break; | |
| 317 case 33: | |
| 318 ferode_2_16(datad, w, h, wpld, datas, wpls); | |
| 319 break; | |
| 320 case 34: | |
| 321 fdilate_2_17(datad, w, h, wpld, datas, wpls); | |
| 322 break; | |
| 323 case 35: | |
| 324 ferode_2_17(datad, w, h, wpld, datas, wpls); | |
| 325 break; | |
| 326 case 36: | |
| 327 fdilate_2_18(datad, w, h, wpld, datas, wpls); | |
| 328 break; | |
| 329 case 37: | |
| 330 ferode_2_18(datad, w, h, wpld, datas, wpls); | |
| 331 break; | |
| 332 case 38: | |
| 333 fdilate_2_19(datad, w, h, wpld, datas, wpls); | |
| 334 break; | |
| 335 case 39: | |
| 336 ferode_2_19(datad, w, h, wpld, datas, wpls); | |
| 337 break; | |
| 338 case 40: | |
| 339 fdilate_2_20(datad, w, h, wpld, datas, wpls); | |
| 340 break; | |
| 341 case 41: | |
| 342 ferode_2_20(datad, w, h, wpld, datas, wpls); | |
| 343 break; | |
| 344 case 42: | |
| 345 fdilate_2_21(datad, w, h, wpld, datas, wpls); | |
| 346 break; | |
| 347 case 43: | |
| 348 ferode_2_21(datad, w, h, wpld, datas, wpls); | |
| 349 break; | |
| 350 case 44: | |
| 351 fdilate_2_22(datad, w, h, wpld, datas, wpls); | |
| 352 break; | |
| 353 case 45: | |
| 354 ferode_2_22(datad, w, h, wpld, datas, wpls); | |
| 355 break; | |
| 356 case 46: | |
| 357 fdilate_2_23(datad, w, h, wpld, datas, wpls); | |
| 358 break; | |
| 359 case 47: | |
| 360 ferode_2_23(datad, w, h, wpld, datas, wpls); | |
| 361 break; | |
| 362 case 48: | |
| 363 fdilate_2_24(datad, w, h, wpld, datas, wpls); | |
| 364 break; | |
| 365 case 49: | |
| 366 ferode_2_24(datad, w, h, wpld, datas, wpls); | |
| 367 break; | |
| 368 case 50: | |
| 369 fdilate_2_25(datad, w, h, wpld, datas, wpls); | |
| 370 break; | |
| 371 case 51: | |
| 372 ferode_2_25(datad, w, h, wpld, datas, wpls); | |
| 373 break; | |
| 374 case 52: | |
| 375 fdilate_2_26(datad, w, h, wpld, datas, wpls); | |
| 376 break; | |
| 377 case 53: | |
| 378 ferode_2_26(datad, w, h, wpld, datas, wpls); | |
| 379 break; | |
| 380 case 54: | |
| 381 fdilate_2_27(datad, w, h, wpld, datas, wpls); | |
| 382 break; | |
| 383 case 55: | |
| 384 ferode_2_27(datad, w, h, wpld, datas, wpls); | |
| 385 break; | |
| 386 case 56: | |
| 387 fdilate_2_28(datad, w, h, wpld, datas, wpls); | |
| 388 break; | |
| 389 case 57: | |
| 390 ferode_2_28(datad, w, h, wpld, datas, wpls); | |
| 391 break; | |
| 392 case 58: | |
| 393 fdilate_2_29(datad, w, h, wpld, datas, wpls); | |
| 394 break; | |
| 395 case 59: | |
| 396 ferode_2_29(datad, w, h, wpld, datas, wpls); | |
| 397 break; | |
| 398 case 60: | |
| 399 fdilate_2_30(datad, w, h, wpld, datas, wpls); | |
| 400 break; | |
| 401 case 61: | |
| 402 ferode_2_30(datad, w, h, wpld, datas, wpls); | |
| 403 break; | |
| 404 case 62: | |
| 405 fdilate_2_31(datad, w, h, wpld, datas, wpls); | |
| 406 break; | |
| 407 case 63: | |
| 408 ferode_2_31(datad, w, h, wpld, datas, wpls); | |
| 409 break; | |
| 410 case 64: | |
| 411 fdilate_2_32(datad, w, h, wpld, datas, wpls); | |
| 412 break; | |
| 413 case 65: | |
| 414 ferode_2_32(datad, w, h, wpld, datas, wpls); | |
| 415 break; | |
| 416 case 66: | |
| 417 fdilate_2_33(datad, w, h, wpld, datas, wpls); | |
| 418 break; | |
| 419 case 67: | |
| 420 ferode_2_33(datad, w, h, wpld, datas, wpls); | |
| 421 break; | |
| 422 case 68: | |
| 423 fdilate_2_34(datad, w, h, wpld, datas, wpls); | |
| 424 break; | |
| 425 case 69: | |
| 426 ferode_2_34(datad, w, h, wpld, datas, wpls); | |
| 427 break; | |
| 428 case 70: | |
| 429 fdilate_2_35(datad, w, h, wpld, datas, wpls); | |
| 430 break; | |
| 431 case 71: | |
| 432 ferode_2_35(datad, w, h, wpld, datas, wpls); | |
| 433 break; | |
| 434 case 72: | |
| 435 fdilate_2_36(datad, w, h, wpld, datas, wpls); | |
| 436 break; | |
| 437 case 73: | |
| 438 ferode_2_36(datad, w, h, wpld, datas, wpls); | |
| 439 break; | |
| 440 case 74: | |
| 441 fdilate_2_37(datad, w, h, wpld, datas, wpls); | |
| 442 break; | |
| 443 case 75: | |
| 444 ferode_2_37(datad, w, h, wpld, datas, wpls); | |
| 445 break; | |
| 446 case 76: | |
| 447 fdilate_2_38(datad, w, h, wpld, datas, wpls); | |
| 448 break; | |
| 449 case 77: | |
| 450 ferode_2_38(datad, w, h, wpld, datas, wpls); | |
| 451 break; | |
| 452 case 78: | |
| 453 fdilate_2_39(datad, w, h, wpld, datas, wpls); | |
| 454 break; | |
| 455 case 79: | |
| 456 ferode_2_39(datad, w, h, wpld, datas, wpls); | |
| 457 break; | |
| 458 case 80: | |
| 459 fdilate_2_40(datad, w, h, wpld, datas, wpls); | |
| 460 break; | |
| 461 case 81: | |
| 462 ferode_2_40(datad, w, h, wpld, datas, wpls); | |
| 463 break; | |
| 464 case 82: | |
| 465 fdilate_2_41(datad, w, h, wpld, datas, wpls); | |
| 466 break; | |
| 467 case 83: | |
| 468 ferode_2_41(datad, w, h, wpld, datas, wpls); | |
| 469 break; | |
| 470 case 84: | |
| 471 fdilate_2_42(datad, w, h, wpld, datas, wpls); | |
| 472 break; | |
| 473 case 85: | |
| 474 ferode_2_42(datad, w, h, wpld, datas, wpls); | |
| 475 break; | |
| 476 case 86: | |
| 477 fdilate_2_43(datad, w, h, wpld, datas, wpls); | |
| 478 break; | |
| 479 case 87: | |
| 480 ferode_2_43(datad, w, h, wpld, datas, wpls); | |
| 481 break; | |
| 482 case 88: | |
| 483 fdilate_2_44(datad, w, h, wpld, datas, wpls); | |
| 484 break; | |
| 485 case 89: | |
| 486 ferode_2_44(datad, w, h, wpld, datas, wpls); | |
| 487 break; | |
| 488 case 90: | |
| 489 fdilate_2_45(datad, w, h, wpld, datas, wpls); | |
| 490 break; | |
| 491 case 91: | |
| 492 ferode_2_45(datad, w, h, wpld, datas, wpls); | |
| 493 break; | |
| 494 case 92: | |
| 495 fdilate_2_46(datad, w, h, wpld, datas, wpls); | |
| 496 break; | |
| 497 case 93: | |
| 498 ferode_2_46(datad, w, h, wpld, datas, wpls); | |
| 499 break; | |
| 500 case 94: | |
| 501 fdilate_2_47(datad, w, h, wpld, datas, wpls); | |
| 502 break; | |
| 503 case 95: | |
| 504 ferode_2_47(datad, w, h, wpld, datas, wpls); | |
| 505 break; | |
| 506 case 96: | |
| 507 fdilate_2_48(datad, w, h, wpld, datas, wpls); | |
| 508 break; | |
| 509 case 97: | |
| 510 ferode_2_48(datad, w, h, wpld, datas, wpls); | |
| 511 break; | |
| 512 case 98: | |
| 513 fdilate_2_49(datad, w, h, wpld, datas, wpls); | |
| 514 break; | |
| 515 case 99: | |
| 516 ferode_2_49(datad, w, h, wpld, datas, wpls); | |
| 517 break; | |
| 518 case 100: | |
| 519 fdilate_2_50(datad, w, h, wpld, datas, wpls); | |
| 520 break; | |
| 521 case 101: | |
| 522 ferode_2_50(datad, w, h, wpld, datas, wpls); | |
| 523 break; | |
| 524 case 102: | |
| 525 fdilate_2_51(datad, w, h, wpld, datas, wpls); | |
| 526 break; | |
| 527 case 103: | |
| 528 ferode_2_51(datad, w, h, wpld, datas, wpls); | |
| 529 break; | |
| 530 case 104: | |
| 531 fdilate_2_52(datad, w, h, wpld, datas, wpls); | |
| 532 break; | |
| 533 case 105: | |
| 534 ferode_2_52(datad, w, h, wpld, datas, wpls); | |
| 535 break; | |
| 536 case 106: | |
| 537 fdilate_2_53(datad, w, h, wpld, datas, wpls); | |
| 538 break; | |
| 539 case 107: | |
| 540 ferode_2_53(datad, w, h, wpld, datas, wpls); | |
| 541 break; | |
| 542 case 108: | |
| 543 fdilate_2_54(datad, w, h, wpld, datas, wpls); | |
| 544 break; | |
| 545 case 109: | |
| 546 ferode_2_54(datad, w, h, wpld, datas, wpls); | |
| 547 break; | |
| 548 case 110: | |
| 549 fdilate_2_55(datad, w, h, wpld, datas, wpls); | |
| 550 break; | |
| 551 case 111: | |
| 552 ferode_2_55(datad, w, h, wpld, datas, wpls); | |
| 553 break; | |
| 554 case 112: | |
| 555 fdilate_2_56(datad, w, h, wpld, datas, wpls); | |
| 556 break; | |
| 557 case 113: | |
| 558 ferode_2_56(datad, w, h, wpld, datas, wpls); | |
| 559 break; | |
| 560 case 114: | |
| 561 fdilate_2_57(datad, w, h, wpld, datas, wpls); | |
| 562 break; | |
| 563 case 115: | |
| 564 ferode_2_57(datad, w, h, wpld, datas, wpls); | |
| 565 break; | |
| 566 case 116: | |
| 567 fdilate_2_58(datad, w, h, wpld, datas, wpls); | |
| 568 break; | |
| 569 case 117: | |
| 570 ferode_2_58(datad, w, h, wpld, datas, wpls); | |
| 571 break; | |
| 572 case 118: | |
| 573 fdilate_2_59(datad, w, h, wpld, datas, wpls); | |
| 574 break; | |
| 575 case 119: | |
| 576 ferode_2_59(datad, w, h, wpld, datas, wpls); | |
| 577 break; | |
| 578 case 120: | |
| 579 fdilate_2_60(datad, w, h, wpld, datas, wpls); | |
| 580 break; | |
| 581 case 121: | |
| 582 ferode_2_60(datad, w, h, wpld, datas, wpls); | |
| 583 break; | |
| 584 case 122: | |
| 585 fdilate_2_61(datad, w, h, wpld, datas, wpls); | |
| 586 break; | |
| 587 case 123: | |
| 588 ferode_2_61(datad, w, h, wpld, datas, wpls); | |
| 589 break; | |
| 590 case 124: | |
| 591 fdilate_2_62(datad, w, h, wpld, datas, wpls); | |
| 592 break; | |
| 593 case 125: | |
| 594 ferode_2_62(datad, w, h, wpld, datas, wpls); | |
| 595 break; | |
| 596 case 126: | |
| 597 fdilate_2_63(datad, w, h, wpld, datas, wpls); | |
| 598 break; | |
| 599 case 127: | |
| 600 ferode_2_63(datad, w, h, wpld, datas, wpls); | |
| 601 break; | |
| 602 case 128: | |
| 603 fdilate_2_64(datad, w, h, wpld, datas, wpls); | |
| 604 break; | |
| 605 case 129: | |
| 606 ferode_2_64(datad, w, h, wpld, datas, wpls); | |
| 607 break; | |
| 608 case 130: | |
| 609 fdilate_2_65(datad, w, h, wpld, datas, wpls); | |
| 610 break; | |
| 611 case 131: | |
| 612 ferode_2_65(datad, w, h, wpld, datas, wpls); | |
| 613 break; | |
| 614 case 132: | |
| 615 fdilate_2_66(datad, w, h, wpld, datas, wpls); | |
| 616 break; | |
| 617 case 133: | |
| 618 ferode_2_66(datad, w, h, wpld, datas, wpls); | |
| 619 break; | |
| 620 case 134: | |
| 621 fdilate_2_67(datad, w, h, wpld, datas, wpls); | |
| 622 break; | |
| 623 case 135: | |
| 624 ferode_2_67(datad, w, h, wpld, datas, wpls); | |
| 625 break; | |
| 626 case 136: | |
| 627 fdilate_2_68(datad, w, h, wpld, datas, wpls); | |
| 628 break; | |
| 629 case 137: | |
| 630 ferode_2_68(datad, w, h, wpld, datas, wpls); | |
| 631 break; | |
| 632 case 138: | |
| 633 fdilate_2_69(datad, w, h, wpld, datas, wpls); | |
| 634 break; | |
| 635 case 139: | |
| 636 ferode_2_69(datad, w, h, wpld, datas, wpls); | |
| 637 break; | |
| 638 case 140: | |
| 639 fdilate_2_70(datad, w, h, wpld, datas, wpls); | |
| 640 break; | |
| 641 case 141: | |
| 642 ferode_2_70(datad, w, h, wpld, datas, wpls); | |
| 643 break; | |
| 644 case 142: | |
| 645 fdilate_2_71(datad, w, h, wpld, datas, wpls); | |
| 646 break; | |
| 647 case 143: | |
| 648 ferode_2_71(datad, w, h, wpld, datas, wpls); | |
| 649 break; | |
| 650 case 144: | |
| 651 fdilate_2_72(datad, w, h, wpld, datas, wpls); | |
| 652 break; | |
| 653 case 145: | |
| 654 ferode_2_72(datad, w, h, wpld, datas, wpls); | |
| 655 break; | |
| 656 case 146: | |
| 657 fdilate_2_73(datad, w, h, wpld, datas, wpls); | |
| 658 break; | |
| 659 case 147: | |
| 660 ferode_2_73(datad, w, h, wpld, datas, wpls); | |
| 661 break; | |
| 662 case 148: | |
| 663 fdilate_2_74(datad, w, h, wpld, datas, wpls); | |
| 664 break; | |
| 665 case 149: | |
| 666 ferode_2_74(datad, w, h, wpld, datas, wpls); | |
| 667 break; | |
| 668 case 150: | |
| 669 fdilate_2_75(datad, w, h, wpld, datas, wpls); | |
| 670 break; | |
| 671 case 151: | |
| 672 ferode_2_75(datad, w, h, wpld, datas, wpls); | |
| 673 break; | |
| 674 } | |
| 675 | |
| 676 return 0; | |
| 677 } | |
| 678 | |
| 679 | |
| 680 /*--------------------------------------------------------------------------* | |
| 681 * Low-level auto-generated static routines * | |
| 682 *--------------------------------------------------------------------------*/ | |
| 683 /* | |
| 684 * N.B. In all the low-level routines, the part of the image | |
| 685 * that is accessed has been clipped by 32 pixels on | |
| 686 * all four sides. This is done in the higher level | |
| 687 * code by redefining w and h smaller and by moving the | |
| 688 * start-of-image pointers up to the beginning of this | |
| 689 * interior rectangle. | |
| 690 */ | |
| 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 { | |
| 699 l_int32 i; | |
| 700 l_int32 j, pwpls; | |
| 701 l_uint32 *sptr, *dptr; | |
| 702 | |
| 703 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 704 | |
| 705 for (i = 0; i < h; i++) { | |
| 706 sptr = datas + i * wpls; | |
| 707 dptr = datad + i * wpld; | |
| 708 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 709 *dptr = ((*(sptr) << 1) | (*(sptr + 1) >> 31)) | | |
| 710 ((*(sptr) >> 1) | (*(sptr - 1) << 31)); | |
| 711 } | |
| 712 } | |
| 713 } | |
| 714 | |
| 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 { | |
| 723 l_int32 i; | |
| 724 l_int32 j, pwpls; | |
| 725 l_uint32 *sptr, *dptr; | |
| 726 | |
| 727 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 728 | |
| 729 for (i = 0; i < h; i++) { | |
| 730 sptr = datas + i * wpls; | |
| 731 dptr = datad + i * wpld; | |
| 732 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 733 *dptr = ((*(sptr) >> 1) | (*(sptr - 1) << 31)) & | |
| 734 ((*(sptr) << 1) | (*(sptr + 1) >> 31)); | |
| 735 } | |
| 736 } | |
| 737 } | |
| 738 | |
| 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 { | |
| 747 l_int32 i; | |
| 748 l_int32 j, pwpls; | |
| 749 l_uint32 *sptr, *dptr; | |
| 750 | |
| 751 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 752 | |
| 753 for (i = 0; i < h; i++) { | |
| 754 sptr = datas + i * wpls; | |
| 755 dptr = datad + i * wpld; | |
| 756 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 757 *dptr = (*(sptr + wpls)) | | |
| 758 (*(sptr - wpls)); | |
| 759 } | |
| 760 } | |
| 761 } | |
| 762 | |
| 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 { | |
| 771 l_int32 i; | |
| 772 l_int32 j, pwpls; | |
| 773 l_uint32 *sptr, *dptr; | |
| 774 | |
| 775 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 776 | |
| 777 for (i = 0; i < h; i++) { | |
| 778 sptr = datas + i * wpls; | |
| 779 dptr = datad + i * wpld; | |
| 780 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 781 *dptr = (*(sptr - wpls)) & | |
| 782 (*(sptr + wpls)); | |
| 783 } | |
| 784 } | |
| 785 } | |
| 786 | |
| 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 { | |
| 795 l_int32 i; | |
| 796 l_int32 j, pwpls; | |
| 797 l_uint32 *sptr, *dptr; | |
| 798 | |
| 799 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 800 | |
| 801 for (i = 0; i < h; i++) { | |
| 802 sptr = datas + i * wpls; | |
| 803 dptr = datad + i * wpld; | |
| 804 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 805 *dptr = (*sptr); | |
| 806 } | |
| 807 } | |
| 808 } | |
| 809 | |
| 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 { | |
| 818 l_int32 i; | |
| 819 l_int32 j, pwpls; | |
| 820 l_uint32 *sptr, *dptr; | |
| 821 | |
| 822 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 823 | |
| 824 for (i = 0; i < h; i++) { | |
| 825 sptr = datas + i * wpls; | |
| 826 dptr = datad + i * wpld; | |
| 827 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 828 *dptr = (*sptr); | |
| 829 } | |
| 830 } | |
| 831 } | |
| 832 | |
| 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 { | |
| 841 l_int32 i; | |
| 842 l_int32 j, pwpls; | |
| 843 l_uint32 *sptr, *dptr; | |
| 844 | |
| 845 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 846 | |
| 847 for (i = 0; i < h; i++) { | |
| 848 sptr = datas + i * wpls; | |
| 849 dptr = datad + i * wpld; | |
| 850 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 851 *dptr = (*sptr); | |
| 852 } | |
| 853 } | |
| 854 } | |
| 855 | |
| 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 { | |
| 864 l_int32 i; | |
| 865 l_int32 j, pwpls; | |
| 866 l_uint32 *sptr, *dptr; | |
| 867 | |
| 868 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 869 | |
| 870 for (i = 0; i < h; i++) { | |
| 871 sptr = datas + i * wpls; | |
| 872 dptr = datad + i * wpld; | |
| 873 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 874 *dptr = (*sptr); | |
| 875 } | |
| 876 } | |
| 877 } | |
| 878 | |
| 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 { | |
| 887 l_int32 i; | |
| 888 l_int32 j, pwpls; | |
| 889 l_uint32 *sptr, *dptr; | |
| 890 | |
| 891 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 892 | |
| 893 for (i = 0; i < h; i++) { | |
| 894 sptr = datas + i * wpls; | |
| 895 dptr = datad + i * wpld; | |
| 896 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 897 *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) | | |
| 898 ((*(sptr) >> 1) | (*(sptr - 1) << 31)); | |
| 899 } | |
| 900 } | |
| 901 } | |
| 902 | |
| 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 { | |
| 911 l_int32 i; | |
| 912 l_int32 j, pwpls; | |
| 913 l_uint32 *sptr, *dptr; | |
| 914 | |
| 915 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 916 | |
| 917 for (i = 0; i < h; i++) { | |
| 918 sptr = datas + i * wpls; | |
| 919 dptr = datad + i * wpld; | |
| 920 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 921 *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) & | |
| 922 ((*(sptr) << 1) | (*(sptr + 1) >> 31)); | |
| 923 } | |
| 924 } | |
| 925 } | |
| 926 | |
| 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 { | |
| 935 l_int32 i; | |
| 936 l_int32 j, pwpls; | |
| 937 l_uint32 *sptr, *dptr; | |
| 938 l_int32 wpls2; | |
| 939 | |
| 940 wpls2 = 2 * wpls; | |
| 941 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 942 | |
| 943 for (i = 0; i < h; i++) { | |
| 944 sptr = datas + i * wpls; | |
| 945 dptr = datad + i * wpld; | |
| 946 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 947 *dptr = (*(sptr + wpls2)) | | |
| 948 (*(sptr - wpls)); | |
| 949 } | |
| 950 } | |
| 951 } | |
| 952 | |
| 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 { | |
| 961 l_int32 i; | |
| 962 l_int32 j, pwpls; | |
| 963 l_uint32 *sptr, *dptr; | |
| 964 l_int32 wpls2; | |
| 965 | |
| 966 wpls2 = 2 * wpls; | |
| 967 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 968 | |
| 969 for (i = 0; i < h; i++) { | |
| 970 sptr = datas + i * wpls; | |
| 971 dptr = datad + i * wpld; | |
| 972 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 973 *dptr = (*(sptr - wpls2)) & | |
| 974 (*(sptr + wpls)); | |
| 975 } | |
| 976 } | |
| 977 } | |
| 978 | |
| 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 { | |
| 987 l_int32 i; | |
| 988 l_int32 j, pwpls; | |
| 989 l_uint32 *sptr, *dptr; | |
| 990 | |
| 991 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 992 | |
| 993 for (i = 0; i < h; i++) { | |
| 994 sptr = datas + i * wpls; | |
| 995 dptr = datad + i * wpld; | |
| 996 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 997 *dptr = (*sptr); | |
| 998 } | |
| 999 } | |
| 1000 } | |
| 1001 | |
| 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 { | |
| 1010 l_int32 i; | |
| 1011 l_int32 j, pwpls; | |
| 1012 l_uint32 *sptr, *dptr; | |
| 1013 | |
| 1014 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1015 | |
| 1016 for (i = 0; i < h; i++) { | |
| 1017 sptr = datas + i * wpls; | |
| 1018 dptr = datad + i * wpld; | |
| 1019 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1020 *dptr = (*sptr); | |
| 1021 } | |
| 1022 } | |
| 1023 } | |
| 1024 | |
| 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 { | |
| 1033 l_int32 i; | |
| 1034 l_int32 j, pwpls; | |
| 1035 l_uint32 *sptr, *dptr; | |
| 1036 | |
| 1037 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1038 | |
| 1039 for (i = 0; i < h; i++) { | |
| 1040 sptr = datas + i * wpls; | |
| 1041 dptr = datad + i * wpld; | |
| 1042 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1043 *dptr = (*sptr); | |
| 1044 } | |
| 1045 } | |
| 1046 } | |
| 1047 | |
| 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 { | |
| 1056 l_int32 i; | |
| 1057 l_int32 j, pwpls; | |
| 1058 l_uint32 *sptr, *dptr; | |
| 1059 | |
| 1060 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1061 | |
| 1062 for (i = 0; i < h; i++) { | |
| 1063 sptr = datas + i * wpls; | |
| 1064 dptr = datad + i * wpld; | |
| 1065 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1066 *dptr = (*sptr); | |
| 1067 } | |
| 1068 } | |
| 1069 } | |
| 1070 | |
| 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 { | |
| 1079 l_int32 i; | |
| 1080 l_int32 j, pwpls; | |
| 1081 l_uint32 *sptr, *dptr; | |
| 1082 | |
| 1083 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1084 | |
| 1085 for (i = 0; i < h; i++) { | |
| 1086 sptr = datas + i * wpls; | |
| 1087 dptr = datad + i * wpld; | |
| 1088 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1089 *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) | | |
| 1090 ((*(sptr) >> 2) | (*(sptr - 1) << 30)); | |
| 1091 } | |
| 1092 } | |
| 1093 } | |
| 1094 | |
| 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 { | |
| 1103 l_int32 i; | |
| 1104 l_int32 j, pwpls; | |
| 1105 l_uint32 *sptr, *dptr; | |
| 1106 | |
| 1107 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1108 | |
| 1109 for (i = 0; i < h; i++) { | |
| 1110 sptr = datas + i * wpls; | |
| 1111 dptr = datad + i * wpld; | |
| 1112 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1113 *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) & | |
| 1114 ((*(sptr) << 2) | (*(sptr + 1) >> 30)); | |
| 1115 } | |
| 1116 } | |
| 1117 } | |
| 1118 | |
| 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 { | |
| 1127 l_int32 i; | |
| 1128 l_int32 j, pwpls; | |
| 1129 l_uint32 *sptr, *dptr; | |
| 1130 l_int32 wpls2; | |
| 1131 | |
| 1132 wpls2 = 2 * wpls; | |
| 1133 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1134 | |
| 1135 for (i = 0; i < h; i++) { | |
| 1136 sptr = datas + i * wpls; | |
| 1137 dptr = datad + i * wpld; | |
| 1138 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1139 *dptr = (*(sptr + wpls2)) | | |
| 1140 (*(sptr - wpls2)); | |
| 1141 } | |
| 1142 } | |
| 1143 } | |
| 1144 | |
| 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 { | |
| 1153 l_int32 i; | |
| 1154 l_int32 j, pwpls; | |
| 1155 l_uint32 *sptr, *dptr; | |
| 1156 l_int32 wpls2; | |
| 1157 | |
| 1158 wpls2 = 2 * wpls; | |
| 1159 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1160 | |
| 1161 for (i = 0; i < h; i++) { | |
| 1162 sptr = datas + i * wpls; | |
| 1163 dptr = datad + i * wpld; | |
| 1164 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1165 *dptr = (*(sptr - wpls2)) & | |
| 1166 (*(sptr + wpls2)); | |
| 1167 } | |
| 1168 } | |
| 1169 } | |
| 1170 | |
| 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 { | |
| 1179 l_int32 i; | |
| 1180 l_int32 j, pwpls; | |
| 1181 l_uint32 *sptr, *dptr; | |
| 1182 | |
| 1183 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1184 | |
| 1185 for (i = 0; i < h; i++) { | |
| 1186 sptr = datas + i * wpls; | |
| 1187 dptr = datad + i * wpld; | |
| 1188 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1189 *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) | | |
| 1190 (*sptr) | | |
| 1191 ((*(sptr) >> 3) | (*(sptr - 1) << 29)); | |
| 1192 } | |
| 1193 } | |
| 1194 } | |
| 1195 | |
| 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 { | |
| 1204 l_int32 i; | |
| 1205 l_int32 j, pwpls; | |
| 1206 l_uint32 *sptr, *dptr; | |
| 1207 | |
| 1208 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1209 | |
| 1210 for (i = 0; i < h; i++) { | |
| 1211 sptr = datas + i * wpls; | |
| 1212 dptr = datad + i * wpld; | |
| 1213 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1214 *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) & | |
| 1215 (*sptr) & | |
| 1216 ((*(sptr) << 3) | (*(sptr + 1) >> 29)); | |
| 1217 } | |
| 1218 } | |
| 1219 } | |
| 1220 | |
| 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 { | |
| 1229 l_int32 i; | |
| 1230 l_int32 j, pwpls; | |
| 1231 l_uint32 *sptr, *dptr; | |
| 1232 l_int32 wpls3; | |
| 1233 | |
| 1234 wpls3 = 3 * wpls; | |
| 1235 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1236 | |
| 1237 for (i = 0; i < h; i++) { | |
| 1238 sptr = datas + i * wpls; | |
| 1239 dptr = datad + i * wpld; | |
| 1240 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1241 *dptr = (*(sptr + wpls3)) | | |
| 1242 (*sptr) | | |
| 1243 (*(sptr - wpls3)); | |
| 1244 } | |
| 1245 } | |
| 1246 } | |
| 1247 | |
| 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 { | |
| 1256 l_int32 i; | |
| 1257 l_int32 j, pwpls; | |
| 1258 l_uint32 *sptr, *dptr; | |
| 1259 l_int32 wpls3; | |
| 1260 | |
| 1261 wpls3 = 3 * wpls; | |
| 1262 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1263 | |
| 1264 for (i = 0; i < h; i++) { | |
| 1265 sptr = datas + i * wpls; | |
| 1266 dptr = datad + i * wpld; | |
| 1267 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1268 *dptr = (*(sptr - wpls3)) & | |
| 1269 (*sptr) & | |
| 1270 (*(sptr + wpls3)); | |
| 1271 } | |
| 1272 } | |
| 1273 } | |
| 1274 | |
| 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 { | |
| 1283 l_int32 i; | |
| 1284 l_int32 j, pwpls; | |
| 1285 l_uint32 *sptr, *dptr; | |
| 1286 | |
| 1287 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1288 | |
| 1289 for (i = 0; i < h; i++) { | |
| 1290 sptr = datas + i * wpls; | |
| 1291 dptr = datad + i * wpld; | |
| 1292 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1293 *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) | | |
| 1294 ((*(sptr) >> 2) | (*(sptr - 1) << 30)); | |
| 1295 } | |
| 1296 } | |
| 1297 } | |
| 1298 | |
| 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 { | |
| 1307 l_int32 i; | |
| 1308 l_int32 j, pwpls; | |
| 1309 l_uint32 *sptr, *dptr; | |
| 1310 | |
| 1311 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1312 | |
| 1313 for (i = 0; i < h; i++) { | |
| 1314 sptr = datas + i * wpls; | |
| 1315 dptr = datad + i * wpld; | |
| 1316 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1317 *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) & | |
| 1318 ((*(sptr) << 2) | (*(sptr + 1) >> 30)); | |
| 1319 } | |
| 1320 } | |
| 1321 } | |
| 1322 | |
| 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 { | |
| 1331 l_int32 i; | |
| 1332 l_int32 j, pwpls; | |
| 1333 l_uint32 *sptr, *dptr; | |
| 1334 l_int32 wpls2; | |
| 1335 l_int32 wpls3; | |
| 1336 | |
| 1337 wpls2 = 2 * wpls; | |
| 1338 wpls3 = 3 * wpls; | |
| 1339 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1340 | |
| 1341 for (i = 0; i < h; i++) { | |
| 1342 sptr = datas + i * wpls; | |
| 1343 dptr = datad + i * wpld; | |
| 1344 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1345 *dptr = (*(sptr + wpls3)) | | |
| 1346 (*(sptr - wpls2)); | |
| 1347 } | |
| 1348 } | |
| 1349 } | |
| 1350 | |
| 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 { | |
| 1359 l_int32 i; | |
| 1360 l_int32 j, pwpls; | |
| 1361 l_uint32 *sptr, *dptr; | |
| 1362 l_int32 wpls2; | |
| 1363 l_int32 wpls3; | |
| 1364 | |
| 1365 wpls2 = 2 * wpls; | |
| 1366 wpls3 = 3 * wpls; | |
| 1367 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1368 | |
| 1369 for (i = 0; i < h; i++) { | |
| 1370 sptr = datas + i * wpls; | |
| 1371 dptr = datad + i * wpld; | |
| 1372 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1373 *dptr = (*(sptr - wpls3)) & | |
| 1374 (*(sptr + wpls2)); | |
| 1375 } | |
| 1376 } | |
| 1377 } | |
| 1378 | |
| 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 { | |
| 1387 l_int32 i; | |
| 1388 l_int32 j, pwpls; | |
| 1389 l_uint32 *sptr, *dptr; | |
| 1390 | |
| 1391 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1392 | |
| 1393 for (i = 0; i < h; i++) { | |
| 1394 sptr = datas + i * wpls; | |
| 1395 dptr = datad + i * wpld; | |
| 1396 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1397 *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 1398 (*sptr) | | |
| 1399 ((*(sptr) >> 4) | (*(sptr - 1) << 28)); | |
| 1400 } | |
| 1401 } | |
| 1402 } | |
| 1403 | |
| 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 { | |
| 1412 l_int32 i; | |
| 1413 l_int32 j, pwpls; | |
| 1414 l_uint32 *sptr, *dptr; | |
| 1415 | |
| 1416 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1417 | |
| 1418 for (i = 0; i < h; i++) { | |
| 1419 sptr = datas + i * wpls; | |
| 1420 dptr = datad + i * wpld; | |
| 1421 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1422 *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 1423 (*sptr) & | |
| 1424 ((*(sptr) << 4) | (*(sptr + 1) >> 28)); | |
| 1425 } | |
| 1426 } | |
| 1427 } | |
| 1428 | |
| 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 { | |
| 1437 l_int32 i; | |
| 1438 l_int32 j, pwpls; | |
| 1439 l_uint32 *sptr, *dptr; | |
| 1440 l_int32 wpls4; | |
| 1441 | |
| 1442 wpls4 = 4 * wpls; | |
| 1443 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1444 | |
| 1445 for (i = 0; i < h; i++) { | |
| 1446 sptr = datas + i * wpls; | |
| 1447 dptr = datad + i * wpld; | |
| 1448 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1449 *dptr = (*(sptr + wpls4)) | | |
| 1450 (*sptr) | | |
| 1451 (*(sptr - wpls4)); | |
| 1452 } | |
| 1453 } | |
| 1454 } | |
| 1455 | |
| 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 { | |
| 1464 l_int32 i; | |
| 1465 l_int32 j, pwpls; | |
| 1466 l_uint32 *sptr, *dptr; | |
| 1467 l_int32 wpls4; | |
| 1468 | |
| 1469 wpls4 = 4 * wpls; | |
| 1470 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1471 | |
| 1472 for (i = 0; i < h; i++) { | |
| 1473 sptr = datas + i * wpls; | |
| 1474 dptr = datad + i * wpld; | |
| 1475 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1476 *dptr = (*(sptr - wpls4)) & | |
| 1477 (*sptr) & | |
| 1478 (*(sptr + wpls4)); | |
| 1479 } | |
| 1480 } | |
| 1481 } | |
| 1482 | |
| 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 { | |
| 1491 l_int32 i; | |
| 1492 l_int32 j, pwpls; | |
| 1493 l_uint32 *sptr, *dptr; | |
| 1494 | |
| 1495 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1496 | |
| 1497 for (i = 0; i < h; i++) { | |
| 1498 sptr = datas + i * wpls; | |
| 1499 dptr = datad + i * wpld; | |
| 1500 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1501 *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 1502 ((*(sptr) >> 3) | (*(sptr - 1) << 29)); | |
| 1503 } | |
| 1504 } | |
| 1505 } | |
| 1506 | |
| 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 { | |
| 1515 l_int32 i; | |
| 1516 l_int32 j, pwpls; | |
| 1517 l_uint32 *sptr, *dptr; | |
| 1518 | |
| 1519 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1520 | |
| 1521 for (i = 0; i < h; i++) { | |
| 1522 sptr = datas + i * wpls; | |
| 1523 dptr = datad + i * wpld; | |
| 1524 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1525 *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 1526 ((*(sptr) << 3) | (*(sptr + 1) >> 29)); | |
| 1527 } | |
| 1528 } | |
| 1529 } | |
| 1530 | |
| 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 { | |
| 1539 l_int32 i; | |
| 1540 l_int32 j, pwpls; | |
| 1541 l_uint32 *sptr, *dptr; | |
| 1542 l_int32 wpls3; | |
| 1543 l_int32 wpls4; | |
| 1544 | |
| 1545 wpls3 = 3 * wpls; | |
| 1546 wpls4 = 4 * wpls; | |
| 1547 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1548 | |
| 1549 for (i = 0; i < h; i++) { | |
| 1550 sptr = datas + i * wpls; | |
| 1551 dptr = datad + i * wpld; | |
| 1552 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1553 *dptr = (*(sptr + wpls4)) | | |
| 1554 (*(sptr - wpls3)); | |
| 1555 } | |
| 1556 } | |
| 1557 } | |
| 1558 | |
| 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 { | |
| 1567 l_int32 i; | |
| 1568 l_int32 j, pwpls; | |
| 1569 l_uint32 *sptr, *dptr; | |
| 1570 l_int32 wpls3; | |
| 1571 l_int32 wpls4; | |
| 1572 | |
| 1573 wpls3 = 3 * wpls; | |
| 1574 wpls4 = 4 * wpls; | |
| 1575 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1576 | |
| 1577 for (i = 0; i < h; i++) { | |
| 1578 sptr = datas + i * wpls; | |
| 1579 dptr = datad + i * wpld; | |
| 1580 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1581 *dptr = (*(sptr - wpls4)) & | |
| 1582 (*(sptr + wpls3)); | |
| 1583 } | |
| 1584 } | |
| 1585 } | |
| 1586 | |
| 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 { | |
| 1595 l_int32 i; | |
| 1596 l_int32 j, pwpls; | |
| 1597 l_uint32 *sptr, *dptr; | |
| 1598 | |
| 1599 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1600 | |
| 1601 for (i = 0; i < h; i++) { | |
| 1602 sptr = datas + i * wpls; | |
| 1603 dptr = datad + i * wpld; | |
| 1604 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1605 *dptr = ((*(sptr) << 5) | (*(sptr + 1) >> 27)) | | |
| 1606 (*sptr) | | |
| 1607 ((*(sptr) >> 5) | (*(sptr - 1) << 27)); | |
| 1608 } | |
| 1609 } | |
| 1610 } | |
| 1611 | |
| 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 { | |
| 1620 l_int32 i; | |
| 1621 l_int32 j, pwpls; | |
| 1622 l_uint32 *sptr, *dptr; | |
| 1623 | |
| 1624 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1625 | |
| 1626 for (i = 0; i < h; i++) { | |
| 1627 sptr = datas + i * wpls; | |
| 1628 dptr = datad + i * wpld; | |
| 1629 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1630 *dptr = ((*(sptr) >> 5) | (*(sptr - 1) << 27)) & | |
| 1631 (*sptr) & | |
| 1632 ((*(sptr) << 5) | (*(sptr + 1) >> 27)); | |
| 1633 } | |
| 1634 } | |
| 1635 } | |
| 1636 | |
| 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 { | |
| 1645 l_int32 i; | |
| 1646 l_int32 j, pwpls; | |
| 1647 l_uint32 *sptr, *dptr; | |
| 1648 l_int32 wpls5; | |
| 1649 | |
| 1650 wpls5 = 5 * wpls; | |
| 1651 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1652 | |
| 1653 for (i = 0; i < h; i++) { | |
| 1654 sptr = datas + i * wpls; | |
| 1655 dptr = datad + i * wpld; | |
| 1656 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1657 *dptr = (*(sptr + wpls5)) | | |
| 1658 (*sptr) | | |
| 1659 (*(sptr - wpls5)); | |
| 1660 } | |
| 1661 } | |
| 1662 } | |
| 1663 | |
| 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 { | |
| 1672 l_int32 i; | |
| 1673 l_int32 j, pwpls; | |
| 1674 l_uint32 *sptr, *dptr; | |
| 1675 l_int32 wpls5; | |
| 1676 | |
| 1677 wpls5 = 5 * wpls; | |
| 1678 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1679 | |
| 1680 for (i = 0; i < h; i++) { | |
| 1681 sptr = datas + i * wpls; | |
| 1682 dptr = datad + i * wpld; | |
| 1683 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1684 *dptr = (*(sptr - wpls5)) & | |
| 1685 (*sptr) & | |
| 1686 (*(sptr + wpls5)); | |
| 1687 } | |
| 1688 } | |
| 1689 } | |
| 1690 | |
| 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 { | |
| 1699 l_int32 i; | |
| 1700 l_int32 j, pwpls; | |
| 1701 l_uint32 *sptr, *dptr; | |
| 1702 | |
| 1703 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1704 | |
| 1705 for (i = 0; i < h; i++) { | |
| 1706 sptr = datas + i * wpls; | |
| 1707 dptr = datad + i * wpld; | |
| 1708 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1709 *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) | | |
| 1710 ((*(sptr) << 2) | (*(sptr + 1) >> 30)) | | |
| 1711 ((*(sptr) >> 2) | (*(sptr - 1) << 30)) | | |
| 1712 ((*(sptr) >> 6) | (*(sptr - 1) << 26)); | |
| 1713 } | |
| 1714 } | |
| 1715 } | |
| 1716 | |
| 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 { | |
| 1725 l_int32 i; | |
| 1726 l_int32 j, pwpls; | |
| 1727 l_uint32 *sptr, *dptr; | |
| 1728 | |
| 1729 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1730 | |
| 1731 for (i = 0; i < h; i++) { | |
| 1732 sptr = datas + i * wpls; | |
| 1733 dptr = datad + i * wpld; | |
| 1734 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1735 *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) & | |
| 1736 ((*(sptr) >> 2) | (*(sptr - 1) << 30)) & | |
| 1737 ((*(sptr) << 2) | (*(sptr + 1) >> 30)) & | |
| 1738 ((*(sptr) << 6) | (*(sptr + 1) >> 26)); | |
| 1739 } | |
| 1740 } | |
| 1741 } | |
| 1742 | |
| 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 { | |
| 1751 l_int32 i; | |
| 1752 l_int32 j, pwpls; | |
| 1753 l_uint32 *sptr, *dptr; | |
| 1754 l_int32 wpls2; | |
| 1755 l_int32 wpls6; | |
| 1756 | |
| 1757 wpls2 = 2 * wpls; | |
| 1758 wpls6 = 6 * wpls; | |
| 1759 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1760 | |
| 1761 for (i = 0; i < h; i++) { | |
| 1762 sptr = datas + i * wpls; | |
| 1763 dptr = datad + i * wpld; | |
| 1764 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1765 *dptr = (*(sptr + wpls6)) | | |
| 1766 (*(sptr + wpls2)) | | |
| 1767 (*(sptr - wpls2)) | | |
| 1768 (*(sptr - wpls6)); | |
| 1769 } | |
| 1770 } | |
| 1771 } | |
| 1772 | |
| 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 { | |
| 1781 l_int32 i; | |
| 1782 l_int32 j, pwpls; | |
| 1783 l_uint32 *sptr, *dptr; | |
| 1784 l_int32 wpls2; | |
| 1785 l_int32 wpls6; | |
| 1786 | |
| 1787 wpls2 = 2 * wpls; | |
| 1788 wpls6 = 6 * wpls; | |
| 1789 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1790 | |
| 1791 for (i = 0; i < h; i++) { | |
| 1792 sptr = datas + i * wpls; | |
| 1793 dptr = datad + i * wpld; | |
| 1794 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1795 *dptr = (*(sptr - wpls6)) & | |
| 1796 (*(sptr - wpls2)) & | |
| 1797 (*(sptr + wpls2)) & | |
| 1798 (*(sptr + wpls6)); | |
| 1799 } | |
| 1800 } | |
| 1801 } | |
| 1802 | |
| 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 { | |
| 1811 l_int32 i; | |
| 1812 l_int32 j, pwpls; | |
| 1813 l_uint32 *sptr, *dptr; | |
| 1814 | |
| 1815 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1816 | |
| 1817 for (i = 0; i < h; i++) { | |
| 1818 sptr = datas + i * wpls; | |
| 1819 dptr = datad + i * wpld; | |
| 1820 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1821 *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) | | |
| 1822 (*sptr) | | |
| 1823 ((*(sptr) >> 6) | (*(sptr - 1) << 26)); | |
| 1824 } | |
| 1825 } | |
| 1826 } | |
| 1827 | |
| 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 { | |
| 1836 l_int32 i; | |
| 1837 l_int32 j, pwpls; | |
| 1838 l_uint32 *sptr, *dptr; | |
| 1839 | |
| 1840 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1841 | |
| 1842 for (i = 0; i < h; i++) { | |
| 1843 sptr = datas + i * wpls; | |
| 1844 dptr = datad + i * wpld; | |
| 1845 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1846 *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) & | |
| 1847 (*sptr) & | |
| 1848 ((*(sptr) << 6) | (*(sptr + 1) >> 26)); | |
| 1849 } | |
| 1850 } | |
| 1851 } | |
| 1852 | |
| 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 { | |
| 1861 l_int32 i; | |
| 1862 l_int32 j, pwpls; | |
| 1863 l_uint32 *sptr, *dptr; | |
| 1864 l_int32 wpls6; | |
| 1865 | |
| 1866 wpls6 = 6 * wpls; | |
| 1867 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1868 | |
| 1869 for (i = 0; i < h; i++) { | |
| 1870 sptr = datas + i * wpls; | |
| 1871 dptr = datad + i * wpld; | |
| 1872 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1873 *dptr = (*(sptr + wpls6)) | | |
| 1874 (*sptr) | | |
| 1875 (*(sptr - wpls6)); | |
| 1876 } | |
| 1877 } | |
| 1878 } | |
| 1879 | |
| 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 { | |
| 1888 l_int32 i; | |
| 1889 l_int32 j, pwpls; | |
| 1890 l_uint32 *sptr, *dptr; | |
| 1891 l_int32 wpls6; | |
| 1892 | |
| 1893 wpls6 = 6 * wpls; | |
| 1894 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1895 | |
| 1896 for (i = 0; i < h; i++) { | |
| 1897 sptr = datas + i * wpls; | |
| 1898 dptr = datad + i * wpld; | |
| 1899 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1900 *dptr = (*(sptr - wpls6)) & | |
| 1901 (*sptr) & | |
| 1902 (*(sptr + wpls6)); | |
| 1903 } | |
| 1904 } | |
| 1905 } | |
| 1906 | |
| 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 { | |
| 1915 l_int32 i; | |
| 1916 l_int32 j, pwpls; | |
| 1917 l_uint32 *sptr, *dptr; | |
| 1918 | |
| 1919 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1920 | |
| 1921 for (i = 0; i < h; i++) { | |
| 1922 sptr = datas + i * wpls; | |
| 1923 dptr = datad + i * wpld; | |
| 1924 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1925 *dptr = ((*(sptr) << 8) | (*(sptr + 1) >> 24)) | | |
| 1926 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) | | |
| 1927 ((*(sptr) >> 2) | (*(sptr - 1) << 30)) | | |
| 1928 ((*(sptr) >> 7) | (*(sptr - 1) << 25)); | |
| 1929 } | |
| 1930 } | |
| 1931 } | |
| 1932 | |
| 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 { | |
| 1941 l_int32 i; | |
| 1942 l_int32 j, pwpls; | |
| 1943 l_uint32 *sptr, *dptr; | |
| 1944 | |
| 1945 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1946 | |
| 1947 for (i = 0; i < h; i++) { | |
| 1948 sptr = datas + i * wpls; | |
| 1949 dptr = datad + i * wpld; | |
| 1950 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1951 *dptr = ((*(sptr) >> 8) | (*(sptr - 1) << 24)) & | |
| 1952 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) & | |
| 1953 ((*(sptr) << 2) | (*(sptr + 1) >> 30)) & | |
| 1954 ((*(sptr) << 7) | (*(sptr + 1) >> 25)); | |
| 1955 } | |
| 1956 } | |
| 1957 } | |
| 1958 | |
| 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 { | |
| 1967 l_int32 i; | |
| 1968 l_int32 j, pwpls; | |
| 1969 l_uint32 *sptr, *dptr; | |
| 1970 l_int32 wpls2; | |
| 1971 l_int32 wpls3; | |
| 1972 l_int32 wpls7; | |
| 1973 l_int32 wpls8; | |
| 1974 | |
| 1975 wpls2 = 2 * wpls; | |
| 1976 wpls3 = 3 * wpls; | |
| 1977 wpls7 = 7 * wpls; | |
| 1978 wpls8 = 8 * wpls; | |
| 1979 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 1980 | |
| 1981 for (i = 0; i < h; i++) { | |
| 1982 sptr = datas + i * wpls; | |
| 1983 dptr = datad + i * wpld; | |
| 1984 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 1985 *dptr = (*(sptr + wpls8)) | | |
| 1986 (*(sptr + wpls3)) | | |
| 1987 (*(sptr - wpls2)) | | |
| 1988 (*(sptr - wpls7)); | |
| 1989 } | |
| 1990 } | |
| 1991 } | |
| 1992 | |
| 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 { | |
| 2001 l_int32 i; | |
| 2002 l_int32 j, pwpls; | |
| 2003 l_uint32 *sptr, *dptr; | |
| 2004 l_int32 wpls2; | |
| 2005 l_int32 wpls3; | |
| 2006 l_int32 wpls7; | |
| 2007 l_int32 wpls8; | |
| 2008 | |
| 2009 wpls2 = 2 * wpls; | |
| 2010 wpls3 = 3 * wpls; | |
| 2011 wpls7 = 7 * wpls; | |
| 2012 wpls8 = 8 * wpls; | |
| 2013 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2014 | |
| 2015 for (i = 0; i < h; i++) { | |
| 2016 sptr = datas + i * wpls; | |
| 2017 dptr = datad + i * wpld; | |
| 2018 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2019 *dptr = (*(sptr - wpls8)) & | |
| 2020 (*(sptr - wpls3)) & | |
| 2021 (*(sptr + wpls2)) & | |
| 2022 (*(sptr + wpls7)); | |
| 2023 } | |
| 2024 } | |
| 2025 } | |
| 2026 | |
| 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 { | |
| 2035 l_int32 i; | |
| 2036 l_int32 j, pwpls; | |
| 2037 l_uint32 *sptr, *dptr; | |
| 2038 | |
| 2039 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2040 | |
| 2041 for (i = 0; i < h; i++) { | |
| 2042 sptr = datas + i * wpls; | |
| 2043 dptr = datad + i * wpld; | |
| 2044 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2045 *dptr = ((*(sptr) << 7) | (*(sptr + 1) >> 25)) | | |
| 2046 (*sptr) | | |
| 2047 ((*(sptr) >> 7) | (*(sptr - 1) << 25)); | |
| 2048 } | |
| 2049 } | |
| 2050 } | |
| 2051 | |
| 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 { | |
| 2060 l_int32 i; | |
| 2061 l_int32 j, pwpls; | |
| 2062 l_uint32 *sptr, *dptr; | |
| 2063 | |
| 2064 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2065 | |
| 2066 for (i = 0; i < h; i++) { | |
| 2067 sptr = datas + i * wpls; | |
| 2068 dptr = datad + i * wpld; | |
| 2069 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2070 *dptr = ((*(sptr) >> 7) | (*(sptr - 1) << 25)) & | |
| 2071 (*sptr) & | |
| 2072 ((*(sptr) << 7) | (*(sptr + 1) >> 25)); | |
| 2073 } | |
| 2074 } | |
| 2075 } | |
| 2076 | |
| 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 { | |
| 2085 l_int32 i; | |
| 2086 l_int32 j, pwpls; | |
| 2087 l_uint32 *sptr, *dptr; | |
| 2088 l_int32 wpls7; | |
| 2089 | |
| 2090 wpls7 = 7 * wpls; | |
| 2091 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2092 | |
| 2093 for (i = 0; i < h; i++) { | |
| 2094 sptr = datas + i * wpls; | |
| 2095 dptr = datad + i * wpld; | |
| 2096 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2097 *dptr = (*(sptr + wpls7)) | | |
| 2098 (*sptr) | | |
| 2099 (*(sptr - wpls7)); | |
| 2100 } | |
| 2101 } | |
| 2102 } | |
| 2103 | |
| 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 { | |
| 2112 l_int32 i; | |
| 2113 l_int32 j, pwpls; | |
| 2114 l_uint32 *sptr, *dptr; | |
| 2115 l_int32 wpls7; | |
| 2116 | |
| 2117 wpls7 = 7 * wpls; | |
| 2118 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2119 | |
| 2120 for (i = 0; i < h; i++) { | |
| 2121 sptr = datas + i * wpls; | |
| 2122 dptr = datad + i * wpld; | |
| 2123 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2124 *dptr = (*(sptr - wpls7)) & | |
| 2125 (*sptr) & | |
| 2126 (*(sptr + wpls7)); | |
| 2127 } | |
| 2128 } | |
| 2129 } | |
| 2130 | |
| 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 { | |
| 2139 l_int32 i; | |
| 2140 l_int32 j, pwpls; | |
| 2141 l_uint32 *sptr, *dptr; | |
| 2142 | |
| 2143 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2144 | |
| 2145 for (i = 0; i < h; i++) { | |
| 2146 sptr = datas + i * wpls; | |
| 2147 dptr = datad + i * wpld; | |
| 2148 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2149 *dptr = ((*(sptr) << 6) | (*(sptr + 1) >> 26)) | | |
| 2150 ((*(sptr) >> 5) | (*(sptr - 1) << 27)); | |
| 2151 } | |
| 2152 } | |
| 2153 } | |
| 2154 | |
| 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 { | |
| 2163 l_int32 i; | |
| 2164 l_int32 j, pwpls; | |
| 2165 l_uint32 *sptr, *dptr; | |
| 2166 | |
| 2167 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2168 | |
| 2169 for (i = 0; i < h; i++) { | |
| 2170 sptr = datas + i * wpls; | |
| 2171 dptr = datad + i * wpld; | |
| 2172 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2173 *dptr = ((*(sptr) >> 6) | (*(sptr - 1) << 26)) & | |
| 2174 ((*(sptr) << 5) | (*(sptr + 1) >> 27)); | |
| 2175 } | |
| 2176 } | |
| 2177 } | |
| 2178 | |
| 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 { | |
| 2187 l_int32 i; | |
| 2188 l_int32 j, pwpls; | |
| 2189 l_uint32 *sptr, *dptr; | |
| 2190 l_int32 wpls5; | |
| 2191 l_int32 wpls6; | |
| 2192 | |
| 2193 wpls5 = 5 * wpls; | |
| 2194 wpls6 = 6 * wpls; | |
| 2195 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2196 | |
| 2197 for (i = 0; i < h; i++) { | |
| 2198 sptr = datas + i * wpls; | |
| 2199 dptr = datad + i * wpld; | |
| 2200 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2201 *dptr = (*(sptr + wpls6)) | | |
| 2202 (*(sptr - wpls5)); | |
| 2203 } | |
| 2204 } | |
| 2205 } | |
| 2206 | |
| 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 { | |
| 2215 l_int32 i; | |
| 2216 l_int32 j, pwpls; | |
| 2217 l_uint32 *sptr, *dptr; | |
| 2218 l_int32 wpls5; | |
| 2219 l_int32 wpls6; | |
| 2220 | |
| 2221 wpls5 = 5 * wpls; | |
| 2222 wpls6 = 6 * wpls; | |
| 2223 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2224 | |
| 2225 for (i = 0; i < h; i++) { | |
| 2226 sptr = datas + i * wpls; | |
| 2227 dptr = datad + i * wpld; | |
| 2228 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2229 *dptr = (*(sptr - wpls6)) & | |
| 2230 (*(sptr + wpls5)); | |
| 2231 } | |
| 2232 } | |
| 2233 } | |
| 2234 | |
| 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 { | |
| 2243 l_int32 i; | |
| 2244 l_int32 j, pwpls; | |
| 2245 l_uint32 *sptr, *dptr; | |
| 2246 | |
| 2247 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2248 | |
| 2249 for (i = 0; i < h; i++) { | |
| 2250 sptr = datas + i * wpls; | |
| 2251 dptr = datad + i * wpld; | |
| 2252 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2253 *dptr = ((*(sptr) << 9) | (*(sptr + 1) >> 23)) | | |
| 2254 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) | | |
| 2255 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) | | |
| 2256 ((*(sptr) >> 9) | (*(sptr - 1) << 23)); | |
| 2257 } | |
| 2258 } | |
| 2259 } | |
| 2260 | |
| 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 { | |
| 2269 l_int32 i; | |
| 2270 l_int32 j, pwpls; | |
| 2271 l_uint32 *sptr, *dptr; | |
| 2272 | |
| 2273 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2274 | |
| 2275 for (i = 0; i < h; i++) { | |
| 2276 sptr = datas + i * wpls; | |
| 2277 dptr = datad + i * wpld; | |
| 2278 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2279 *dptr = ((*(sptr) >> 9) | (*(sptr - 1) << 23)) & | |
| 2280 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) & | |
| 2281 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) & | |
| 2282 ((*(sptr) << 9) | (*(sptr + 1) >> 23)); | |
| 2283 } | |
| 2284 } | |
| 2285 } | |
| 2286 | |
| 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 { | |
| 2295 l_int32 i; | |
| 2296 l_int32 j, pwpls; | |
| 2297 l_uint32 *sptr, *dptr; | |
| 2298 l_int32 wpls3; | |
| 2299 l_int32 wpls9; | |
| 2300 | |
| 2301 wpls3 = 3 * wpls; | |
| 2302 wpls9 = 9 * wpls; | |
| 2303 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2304 | |
| 2305 for (i = 0; i < h; i++) { | |
| 2306 sptr = datas + i * wpls; | |
| 2307 dptr = datad + i * wpld; | |
| 2308 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2309 *dptr = (*(sptr + wpls9)) | | |
| 2310 (*(sptr + wpls3)) | | |
| 2311 (*(sptr - wpls3)) | | |
| 2312 (*(sptr - wpls9)); | |
| 2313 } | |
| 2314 } | |
| 2315 } | |
| 2316 | |
| 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 { | |
| 2325 l_int32 i; | |
| 2326 l_int32 j, pwpls; | |
| 2327 l_uint32 *sptr, *dptr; | |
| 2328 l_int32 wpls3; | |
| 2329 l_int32 wpls9; | |
| 2330 | |
| 2331 wpls3 = 3 * wpls; | |
| 2332 wpls9 = 9 * wpls; | |
| 2333 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2334 | |
| 2335 for (i = 0; i < h; i++) { | |
| 2336 sptr = datas + i * wpls; | |
| 2337 dptr = datad + i * wpld; | |
| 2338 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2339 *dptr = (*(sptr - wpls9)) & | |
| 2340 (*(sptr - wpls3)) & | |
| 2341 (*(sptr + wpls3)) & | |
| 2342 (*(sptr + wpls9)); | |
| 2343 } | |
| 2344 } | |
| 2345 } | |
| 2346 | |
| 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 { | |
| 2355 l_int32 i; | |
| 2356 l_int32 j, pwpls; | |
| 2357 l_uint32 *sptr, *dptr; | |
| 2358 | |
| 2359 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2360 | |
| 2361 for (i = 0; i < h; i++) { | |
| 2362 sptr = datas + i * wpls; | |
| 2363 dptr = datad + i * wpld; | |
| 2364 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2365 *dptr = ((*(sptr) << 10) | (*(sptr + 1) >> 22)) | | |
| 2366 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) | | |
| 2367 (*sptr) | | |
| 2368 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) | | |
| 2369 ((*(sptr) >> 10) | (*(sptr - 1) << 22)); | |
| 2370 } | |
| 2371 } | |
| 2372 } | |
| 2373 | |
| 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 { | |
| 2382 l_int32 i; | |
| 2383 l_int32 j, pwpls; | |
| 2384 l_uint32 *sptr, *dptr; | |
| 2385 | |
| 2386 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2387 | |
| 2388 for (i = 0; i < h; i++) { | |
| 2389 sptr = datas + i * wpls; | |
| 2390 dptr = datad + i * wpld; | |
| 2391 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2392 *dptr = ((*(sptr) >> 10) | (*(sptr - 1) << 22)) & | |
| 2393 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) & | |
| 2394 (*sptr) & | |
| 2395 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) & | |
| 2396 ((*(sptr) << 10) | (*(sptr + 1) >> 22)); | |
| 2397 } | |
| 2398 } | |
| 2399 } | |
| 2400 | |
| 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 { | |
| 2409 l_int32 i; | |
| 2410 l_int32 j, pwpls; | |
| 2411 l_uint32 *sptr, *dptr; | |
| 2412 l_int32 wpls5; | |
| 2413 l_int32 wpls10; | |
| 2414 | |
| 2415 wpls5 = 5 * wpls; | |
| 2416 wpls10 = 10 * wpls; | |
| 2417 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2418 | |
| 2419 for (i = 0; i < h; i++) { | |
| 2420 sptr = datas + i * wpls; | |
| 2421 dptr = datad + i * wpld; | |
| 2422 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2423 *dptr = (*(sptr + wpls10)) | | |
| 2424 (*(sptr + wpls5)) | | |
| 2425 (*sptr) | | |
| 2426 (*(sptr - wpls5)) | | |
| 2427 (*(sptr - wpls10)); | |
| 2428 } | |
| 2429 } | |
| 2430 } | |
| 2431 | |
| 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 { | |
| 2440 l_int32 i; | |
| 2441 l_int32 j, pwpls; | |
| 2442 l_uint32 *sptr, *dptr; | |
| 2443 l_int32 wpls5; | |
| 2444 l_int32 wpls10; | |
| 2445 | |
| 2446 wpls5 = 5 * wpls; | |
| 2447 wpls10 = 10 * wpls; | |
| 2448 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2449 | |
| 2450 for (i = 0; i < h; i++) { | |
| 2451 sptr = datas + i * wpls; | |
| 2452 dptr = datad + i * wpld; | |
| 2453 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2454 *dptr = (*(sptr - wpls10)) & | |
| 2455 (*(sptr - wpls5)) & | |
| 2456 (*sptr) & | |
| 2457 (*(sptr + wpls5)) & | |
| 2458 (*(sptr + wpls10)); | |
| 2459 } | |
| 2460 } | |
| 2461 } | |
| 2462 | |
| 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 { | |
| 2471 l_int32 i; | |
| 2472 l_int32 j, pwpls; | |
| 2473 l_uint32 *sptr, *dptr; | |
| 2474 | |
| 2475 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2476 | |
| 2477 for (i = 0; i < h; i++) { | |
| 2478 sptr = datas + i * wpls; | |
| 2479 dptr = datad + i * wpld; | |
| 2480 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2481 *dptr = ((*(sptr) << 9) | (*(sptr + 1) >> 23)) | | |
| 2482 (*sptr) | | |
| 2483 ((*(sptr) >> 9) | (*(sptr - 1) << 23)); | |
| 2484 } | |
| 2485 } | |
| 2486 } | |
| 2487 | |
| 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 { | |
| 2496 l_int32 i; | |
| 2497 l_int32 j, pwpls; | |
| 2498 l_uint32 *sptr, *dptr; | |
| 2499 | |
| 2500 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2501 | |
| 2502 for (i = 0; i < h; i++) { | |
| 2503 sptr = datas + i * wpls; | |
| 2504 dptr = datad + i * wpld; | |
| 2505 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2506 *dptr = ((*(sptr) >> 9) | (*(sptr - 1) << 23)) & | |
| 2507 (*sptr) & | |
| 2508 ((*(sptr) << 9) | (*(sptr + 1) >> 23)); | |
| 2509 } | |
| 2510 } | |
| 2511 } | |
| 2512 | |
| 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 { | |
| 2521 l_int32 i; | |
| 2522 l_int32 j, pwpls; | |
| 2523 l_uint32 *sptr, *dptr; | |
| 2524 l_int32 wpls9; | |
| 2525 | |
| 2526 wpls9 = 9 * wpls; | |
| 2527 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2528 | |
| 2529 for (i = 0; i < h; i++) { | |
| 2530 sptr = datas + i * wpls; | |
| 2531 dptr = datad + i * wpld; | |
| 2532 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2533 *dptr = (*(sptr + wpls9)) | | |
| 2534 (*sptr) | | |
| 2535 (*(sptr - wpls9)); | |
| 2536 } | |
| 2537 } | |
| 2538 } | |
| 2539 | |
| 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 { | |
| 2548 l_int32 i; | |
| 2549 l_int32 j, pwpls; | |
| 2550 l_uint32 *sptr, *dptr; | |
| 2551 l_int32 wpls9; | |
| 2552 | |
| 2553 wpls9 = 9 * wpls; | |
| 2554 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2555 | |
| 2556 for (i = 0; i < h; i++) { | |
| 2557 sptr = datas + i * wpls; | |
| 2558 dptr = datad + i * wpld; | |
| 2559 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2560 *dptr = (*(sptr - wpls9)) & | |
| 2561 (*sptr) & | |
| 2562 (*(sptr + wpls9)); | |
| 2563 } | |
| 2564 } | |
| 2565 } | |
| 2566 | |
| 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 { | |
| 2575 l_int32 i; | |
| 2576 l_int32 j, pwpls; | |
| 2577 l_uint32 *sptr, *dptr; | |
| 2578 | |
| 2579 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2580 | |
| 2581 for (i = 0; i < h; i++) { | |
| 2582 sptr = datas + i * wpls; | |
| 2583 dptr = datad + i * wpld; | |
| 2584 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2585 *dptr = ((*(sptr) << 11) | (*(sptr + 1) >> 21)) | | |
| 2586 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 2587 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) | | |
| 2588 ((*(sptr) >> 10) | (*(sptr - 1) << 22)); | |
| 2589 } | |
| 2590 } | |
| 2591 } | |
| 2592 | |
| 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 { | |
| 2601 l_int32 i; | |
| 2602 l_int32 j, pwpls; | |
| 2603 l_uint32 *sptr, *dptr; | |
| 2604 | |
| 2605 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2606 | |
| 2607 for (i = 0; i < h; i++) { | |
| 2608 sptr = datas + i * wpls; | |
| 2609 dptr = datad + i * wpld; | |
| 2610 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2611 *dptr = ((*(sptr) >> 11) | (*(sptr - 1) << 21)) & | |
| 2612 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 2613 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) & | |
| 2614 ((*(sptr) << 10) | (*(sptr + 1) >> 22)); | |
| 2615 } | |
| 2616 } | |
| 2617 } | |
| 2618 | |
| 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 { | |
| 2627 l_int32 i; | |
| 2628 l_int32 j, pwpls; | |
| 2629 l_uint32 *sptr, *dptr; | |
| 2630 l_int32 wpls3; | |
| 2631 l_int32 wpls4; | |
| 2632 l_int32 wpls10; | |
| 2633 l_int32 wpls11; | |
| 2634 | |
| 2635 wpls3 = 3 * wpls; | |
| 2636 wpls4 = 4 * wpls; | |
| 2637 wpls10 = 10 * wpls; | |
| 2638 wpls11 = 11 * wpls; | |
| 2639 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2640 | |
| 2641 for (i = 0; i < h; i++) { | |
| 2642 sptr = datas + i * wpls; | |
| 2643 dptr = datad + i * wpld; | |
| 2644 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2645 *dptr = (*(sptr + wpls11)) | | |
| 2646 (*(sptr + wpls4)) | | |
| 2647 (*(sptr - wpls3)) | | |
| 2648 (*(sptr - wpls10)); | |
| 2649 } | |
| 2650 } | |
| 2651 } | |
| 2652 | |
| 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 { | |
| 2661 l_int32 i; | |
| 2662 l_int32 j, pwpls; | |
| 2663 l_uint32 *sptr, *dptr; | |
| 2664 l_int32 wpls3; | |
| 2665 l_int32 wpls4; | |
| 2666 l_int32 wpls10; | |
| 2667 l_int32 wpls11; | |
| 2668 | |
| 2669 wpls3 = 3 * wpls; | |
| 2670 wpls4 = 4 * wpls; | |
| 2671 wpls10 = 10 * wpls; | |
| 2672 wpls11 = 11 * wpls; | |
| 2673 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2674 | |
| 2675 for (i = 0; i < h; i++) { | |
| 2676 sptr = datas + i * wpls; | |
| 2677 dptr = datad + i * wpld; | |
| 2678 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2679 *dptr = (*(sptr - wpls11)) & | |
| 2680 (*(sptr - wpls4)) & | |
| 2681 (*(sptr + wpls3)) & | |
| 2682 (*(sptr + wpls10)); | |
| 2683 } | |
| 2684 } | |
| 2685 } | |
| 2686 | |
| 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 { | |
| 2695 l_int32 i; | |
| 2696 l_int32 j, pwpls; | |
| 2697 l_uint32 *sptr, *dptr; | |
| 2698 | |
| 2699 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2700 | |
| 2701 for (i = 0; i < h; i++) { | |
| 2702 sptr = datas + i * wpls; | |
| 2703 dptr = datad + i * wpld; | |
| 2704 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2705 *dptr = ((*(sptr) << 12) | (*(sptr + 1) >> 20)) | | |
| 2706 ((*(sptr) << 6) | (*(sptr + 1) >> 26)) | | |
| 2707 (*sptr) | | |
| 2708 ((*(sptr) >> 6) | (*(sptr - 1) << 26)) | | |
| 2709 ((*(sptr) >> 12) | (*(sptr - 1) << 20)); | |
| 2710 } | |
| 2711 } | |
| 2712 } | |
| 2713 | |
| 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 { | |
| 2722 l_int32 i; | |
| 2723 l_int32 j, pwpls; | |
| 2724 l_uint32 *sptr, *dptr; | |
| 2725 | |
| 2726 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2727 | |
| 2728 for (i = 0; i < h; i++) { | |
| 2729 sptr = datas + i * wpls; | |
| 2730 dptr = datad + i * wpld; | |
| 2731 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2732 *dptr = ((*(sptr) >> 12) | (*(sptr - 1) << 20)) & | |
| 2733 ((*(sptr) >> 6) | (*(sptr - 1) << 26)) & | |
| 2734 (*sptr) & | |
| 2735 ((*(sptr) << 6) | (*(sptr + 1) >> 26)) & | |
| 2736 ((*(sptr) << 12) | (*(sptr + 1) >> 20)); | |
| 2737 } | |
| 2738 } | |
| 2739 } | |
| 2740 | |
| 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 { | |
| 2749 l_int32 i; | |
| 2750 l_int32 j, pwpls; | |
| 2751 l_uint32 *sptr, *dptr; | |
| 2752 l_int32 wpls6; | |
| 2753 l_int32 wpls12; | |
| 2754 | |
| 2755 wpls6 = 6 * wpls; | |
| 2756 wpls12 = 12 * wpls; | |
| 2757 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2758 | |
| 2759 for (i = 0; i < h; i++) { | |
| 2760 sptr = datas + i * wpls; | |
| 2761 dptr = datad + i * wpld; | |
| 2762 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2763 *dptr = (*(sptr + wpls12)) | | |
| 2764 (*(sptr + wpls6)) | | |
| 2765 (*sptr) | | |
| 2766 (*(sptr - wpls6)) | | |
| 2767 (*(sptr - wpls12)); | |
| 2768 } | |
| 2769 } | |
| 2770 } | |
| 2771 | |
| 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 { | |
| 2780 l_int32 i; | |
| 2781 l_int32 j, pwpls; | |
| 2782 l_uint32 *sptr, *dptr; | |
| 2783 l_int32 wpls6; | |
| 2784 l_int32 wpls12; | |
| 2785 | |
| 2786 wpls6 = 6 * wpls; | |
| 2787 wpls12 = 12 * wpls; | |
| 2788 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2789 | |
| 2790 for (i = 0; i < h; i++) { | |
| 2791 sptr = datas + i * wpls; | |
| 2792 dptr = datad + i * wpld; | |
| 2793 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2794 *dptr = (*(sptr - wpls12)) & | |
| 2795 (*(sptr - wpls6)) & | |
| 2796 (*sptr) & | |
| 2797 (*(sptr + wpls6)) & | |
| 2798 (*(sptr + wpls12)); | |
| 2799 } | |
| 2800 } | |
| 2801 } | |
| 2802 | |
| 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 { | |
| 2811 l_int32 i; | |
| 2812 l_int32 j, pwpls; | |
| 2813 l_uint32 *sptr, *dptr; | |
| 2814 | |
| 2815 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2816 | |
| 2817 for (i = 0; i < h; i++) { | |
| 2818 sptr = datas + i * wpls; | |
| 2819 dptr = datad + i * wpld; | |
| 2820 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2821 *dptr = ((*(sptr) << 12) | (*(sptr + 1) >> 20)) | | |
| 2822 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 2823 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) | | |
| 2824 ((*(sptr) >> 12) | (*(sptr - 1) << 20)); | |
| 2825 } | |
| 2826 } | |
| 2827 } | |
| 2828 | |
| 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 { | |
| 2837 l_int32 i; | |
| 2838 l_int32 j, pwpls; | |
| 2839 l_uint32 *sptr, *dptr; | |
| 2840 | |
| 2841 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2842 | |
| 2843 for (i = 0; i < h; i++) { | |
| 2844 sptr = datas + i * wpls; | |
| 2845 dptr = datad + i * wpld; | |
| 2846 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2847 *dptr = ((*(sptr) >> 12) | (*(sptr - 1) << 20)) & | |
| 2848 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 2849 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) & | |
| 2850 ((*(sptr) << 12) | (*(sptr + 1) >> 20)); | |
| 2851 } | |
| 2852 } | |
| 2853 } | |
| 2854 | |
| 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 { | |
| 2863 l_int32 i; | |
| 2864 l_int32 j, pwpls; | |
| 2865 l_uint32 *sptr, *dptr; | |
| 2866 l_int32 wpls4; | |
| 2867 l_int32 wpls12; | |
| 2868 | |
| 2869 wpls4 = 4 * wpls; | |
| 2870 wpls12 = 12 * wpls; | |
| 2871 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2872 | |
| 2873 for (i = 0; i < h; i++) { | |
| 2874 sptr = datas + i * wpls; | |
| 2875 dptr = datad + i * wpld; | |
| 2876 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2877 *dptr = (*(sptr + wpls12)) | | |
| 2878 (*(sptr + wpls4)) | | |
| 2879 (*(sptr - wpls4)) | | |
| 2880 (*(sptr - wpls12)); | |
| 2881 } | |
| 2882 } | |
| 2883 } | |
| 2884 | |
| 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 { | |
| 2893 l_int32 i; | |
| 2894 l_int32 j, pwpls; | |
| 2895 l_uint32 *sptr, *dptr; | |
| 2896 l_int32 wpls4; | |
| 2897 l_int32 wpls12; | |
| 2898 | |
| 2899 wpls4 = 4 * wpls; | |
| 2900 wpls12 = 12 * wpls; | |
| 2901 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2902 | |
| 2903 for (i = 0; i < h; i++) { | |
| 2904 sptr = datas + i * wpls; | |
| 2905 dptr = datad + i * wpld; | |
| 2906 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2907 *dptr = (*(sptr - wpls12)) & | |
| 2908 (*(sptr - wpls4)) & | |
| 2909 (*(sptr + wpls4)) & | |
| 2910 (*(sptr + wpls12)); | |
| 2911 } | |
| 2912 } | |
| 2913 } | |
| 2914 | |
| 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 { | |
| 2923 l_int32 i; | |
| 2924 l_int32 j, pwpls; | |
| 2925 l_uint32 *sptr, *dptr; | |
| 2926 | |
| 2927 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2928 | |
| 2929 for (i = 0; i < h; i++) { | |
| 2930 sptr = datas + i * wpls; | |
| 2931 dptr = datad + i * wpld; | |
| 2932 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2933 *dptr = ((*(sptr) << 11) | (*(sptr + 1) >> 21)) | | |
| 2934 (*sptr) | | |
| 2935 ((*(sptr) >> 11) | (*(sptr - 1) << 21)); | |
| 2936 } | |
| 2937 } | |
| 2938 } | |
| 2939 | |
| 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 { | |
| 2948 l_int32 i; | |
| 2949 l_int32 j, pwpls; | |
| 2950 l_uint32 *sptr, *dptr; | |
| 2951 | |
| 2952 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2953 | |
| 2954 for (i = 0; i < h; i++) { | |
| 2955 sptr = datas + i * wpls; | |
| 2956 dptr = datad + i * wpld; | |
| 2957 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2958 *dptr = ((*(sptr) >> 11) | (*(sptr - 1) << 21)) & | |
| 2959 (*sptr) & | |
| 2960 ((*(sptr) << 11) | (*(sptr + 1) >> 21)); | |
| 2961 } | |
| 2962 } | |
| 2963 } | |
| 2964 | |
| 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 { | |
| 2973 l_int32 i; | |
| 2974 l_int32 j, pwpls; | |
| 2975 l_uint32 *sptr, *dptr; | |
| 2976 l_int32 wpls11; | |
| 2977 | |
| 2978 wpls11 = 11 * wpls; | |
| 2979 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 2980 | |
| 2981 for (i = 0; i < h; i++) { | |
| 2982 sptr = datas + i * wpls; | |
| 2983 dptr = datad + i * wpld; | |
| 2984 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 2985 *dptr = (*(sptr + wpls11)) | | |
| 2986 (*sptr) | | |
| 2987 (*(sptr - wpls11)); | |
| 2988 } | |
| 2989 } | |
| 2990 } | |
| 2991 | |
| 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 { | |
| 3000 l_int32 i; | |
| 3001 l_int32 j, pwpls; | |
| 3002 l_uint32 *sptr, *dptr; | |
| 3003 l_int32 wpls11; | |
| 3004 | |
| 3005 wpls11 = 11 * wpls; | |
| 3006 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3007 | |
| 3008 for (i = 0; i < h; i++) { | |
| 3009 sptr = datas + i * wpls; | |
| 3010 dptr = datad + i * wpld; | |
| 3011 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3012 *dptr = (*(sptr - wpls11)) & | |
| 3013 (*sptr) & | |
| 3014 (*(sptr + wpls11)); | |
| 3015 } | |
| 3016 } | |
| 3017 } | |
| 3018 | |
| 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 { | |
| 3027 l_int32 i; | |
| 3028 l_int32 j, pwpls; | |
| 3029 l_uint32 *sptr, *dptr; | |
| 3030 | |
| 3031 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3032 | |
| 3033 for (i = 0; i < h; i++) { | |
| 3034 sptr = datas + i * wpls; | |
| 3035 dptr = datad + i * wpld; | |
| 3036 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3037 *dptr = ((*(sptr) << 14) | (*(sptr + 1) >> 18)) | | |
| 3038 ((*(sptr) << 7) | (*(sptr + 1) >> 25)) | | |
| 3039 (*sptr) | | |
| 3040 ((*(sptr) >> 7) | (*(sptr - 1) << 25)) | | |
| 3041 ((*(sptr) >> 14) | (*(sptr - 1) << 18)); | |
| 3042 } | |
| 3043 } | |
| 3044 } | |
| 3045 | |
| 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 { | |
| 3054 l_int32 i; | |
| 3055 l_int32 j, pwpls; | |
| 3056 l_uint32 *sptr, *dptr; | |
| 3057 | |
| 3058 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3059 | |
| 3060 for (i = 0; i < h; i++) { | |
| 3061 sptr = datas + i * wpls; | |
| 3062 dptr = datad + i * wpld; | |
| 3063 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3064 *dptr = ((*(sptr) >> 14) | (*(sptr - 1) << 18)) & | |
| 3065 ((*(sptr) >> 7) | (*(sptr - 1) << 25)) & | |
| 3066 (*sptr) & | |
| 3067 ((*(sptr) << 7) | (*(sptr + 1) >> 25)) & | |
| 3068 ((*(sptr) << 14) | (*(sptr + 1) >> 18)); | |
| 3069 } | |
| 3070 } | |
| 3071 } | |
| 3072 | |
| 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 { | |
| 3081 l_int32 i; | |
| 3082 l_int32 j, pwpls; | |
| 3083 l_uint32 *sptr, *dptr; | |
| 3084 l_int32 wpls7; | |
| 3085 l_int32 wpls14; | |
| 3086 | |
| 3087 wpls7 = 7 * wpls; | |
| 3088 wpls14 = 14 * wpls; | |
| 3089 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3090 | |
| 3091 for (i = 0; i < h; i++) { | |
| 3092 sptr = datas + i * wpls; | |
| 3093 dptr = datad + i * wpld; | |
| 3094 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3095 *dptr = (*(sptr + wpls14)) | | |
| 3096 (*(sptr + wpls7)) | | |
| 3097 (*sptr) | | |
| 3098 (*(sptr - wpls7)) | | |
| 3099 (*(sptr - wpls14)); | |
| 3100 } | |
| 3101 } | |
| 3102 } | |
| 3103 | |
| 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 { | |
| 3112 l_int32 i; | |
| 3113 l_int32 j, pwpls; | |
| 3114 l_uint32 *sptr, *dptr; | |
| 3115 l_int32 wpls7; | |
| 3116 l_int32 wpls14; | |
| 3117 | |
| 3118 wpls7 = 7 * wpls; | |
| 3119 wpls14 = 14 * wpls; | |
| 3120 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3121 | |
| 3122 for (i = 0; i < h; i++) { | |
| 3123 sptr = datas + i * wpls; | |
| 3124 dptr = datad + i * wpld; | |
| 3125 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3126 *dptr = (*(sptr - wpls14)) & | |
| 3127 (*(sptr - wpls7)) & | |
| 3128 (*sptr) & | |
| 3129 (*(sptr + wpls7)) & | |
| 3130 (*(sptr + wpls14)); | |
| 3131 } | |
| 3132 } | |
| 3133 } | |
| 3134 | |
| 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 { | |
| 3143 l_int32 i; | |
| 3144 l_int32 j, pwpls; | |
| 3145 l_uint32 *sptr, *dptr; | |
| 3146 | |
| 3147 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3148 | |
| 3149 for (i = 0; i < h; i++) { | |
| 3150 sptr = datas + i * wpls; | |
| 3151 dptr = datad + i * wpld; | |
| 3152 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3153 *dptr = ((*(sptr) << 15) | (*(sptr + 1) >> 17)) | | |
| 3154 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) | | |
| 3155 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) | | |
| 3156 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) | | |
| 3157 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) | | |
| 3158 ((*(sptr) >> 15) | (*(sptr - 1) << 17)); | |
| 3159 } | |
| 3160 } | |
| 3161 } | |
| 3162 | |
| 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 { | |
| 3171 l_int32 i; | |
| 3172 l_int32 j, pwpls; | |
| 3173 l_uint32 *sptr, *dptr; | |
| 3174 | |
| 3175 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3176 | |
| 3177 for (i = 0; i < h; i++) { | |
| 3178 sptr = datas + i * wpls; | |
| 3179 dptr = datad + i * wpld; | |
| 3180 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3181 *dptr = ((*(sptr) >> 15) | (*(sptr - 1) << 17)) & | |
| 3182 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) & | |
| 3183 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) & | |
| 3184 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) & | |
| 3185 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) & | |
| 3186 ((*(sptr) << 15) | (*(sptr + 1) >> 17)); | |
| 3187 } | |
| 3188 } | |
| 3189 } | |
| 3190 | |
| 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 { | |
| 3199 l_int32 i; | |
| 3200 l_int32 j, pwpls; | |
| 3201 l_uint32 *sptr, *dptr; | |
| 3202 l_int32 wpls3; | |
| 3203 l_int32 wpls9; | |
| 3204 l_int32 wpls15; | |
| 3205 | |
| 3206 wpls3 = 3 * wpls; | |
| 3207 wpls9 = 9 * wpls; | |
| 3208 wpls15 = 15 * wpls; | |
| 3209 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3210 | |
| 3211 for (i = 0; i < h; i++) { | |
| 3212 sptr = datas + i * wpls; | |
| 3213 dptr = datad + i * wpld; | |
| 3214 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3215 *dptr = (*(sptr + wpls15)) | | |
| 3216 (*(sptr + wpls9)) | | |
| 3217 (*(sptr + wpls3)) | | |
| 3218 (*(sptr - wpls3)) | | |
| 3219 (*(sptr - wpls9)) | | |
| 3220 (*(sptr - wpls15)); | |
| 3221 } | |
| 3222 } | |
| 3223 } | |
| 3224 | |
| 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 { | |
| 3233 l_int32 i; | |
| 3234 l_int32 j, pwpls; | |
| 3235 l_uint32 *sptr, *dptr; | |
| 3236 l_int32 wpls3; | |
| 3237 l_int32 wpls9; | |
| 3238 l_int32 wpls15; | |
| 3239 | |
| 3240 wpls3 = 3 * wpls; | |
| 3241 wpls9 = 9 * wpls; | |
| 3242 wpls15 = 15 * wpls; | |
| 3243 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3244 | |
| 3245 for (i = 0; i < h; i++) { | |
| 3246 sptr = datas + i * wpls; | |
| 3247 dptr = datad + i * wpld; | |
| 3248 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3249 *dptr = (*(sptr - wpls15)) & | |
| 3250 (*(sptr - wpls9)) & | |
| 3251 (*(sptr - wpls3)) & | |
| 3252 (*(sptr + wpls3)) & | |
| 3253 (*(sptr + wpls9)) & | |
| 3254 (*(sptr + wpls15)); | |
| 3255 } | |
| 3256 } | |
| 3257 } | |
| 3258 | |
| 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 { | |
| 3267 l_int32 i; | |
| 3268 l_int32 j, pwpls; | |
| 3269 l_uint32 *sptr, *dptr; | |
| 3270 | |
| 3271 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3272 | |
| 3273 for (i = 0; i < h; i++) { | |
| 3274 sptr = datas + i * wpls; | |
| 3275 dptr = datad + i * wpld; | |
| 3276 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3277 *dptr = ((*(sptr) << 13) | (*(sptr + 1) >> 19)) | | |
| 3278 (*sptr) | | |
| 3279 ((*(sptr) >> 13) | (*(sptr - 1) << 19)); | |
| 3280 } | |
| 3281 } | |
| 3282 } | |
| 3283 | |
| 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 { | |
| 3292 l_int32 i; | |
| 3293 l_int32 j, pwpls; | |
| 3294 l_uint32 *sptr, *dptr; | |
| 3295 | |
| 3296 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3297 | |
| 3298 for (i = 0; i < h; i++) { | |
| 3299 sptr = datas + i * wpls; | |
| 3300 dptr = datad + i * wpld; | |
| 3301 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3302 *dptr = ((*(sptr) >> 13) | (*(sptr - 1) << 19)) & | |
| 3303 (*sptr) & | |
| 3304 ((*(sptr) << 13) | (*(sptr + 1) >> 19)); | |
| 3305 } | |
| 3306 } | |
| 3307 } | |
| 3308 | |
| 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 { | |
| 3317 l_int32 i; | |
| 3318 l_int32 j, pwpls; | |
| 3319 l_uint32 *sptr, *dptr; | |
| 3320 l_int32 wpls13; | |
| 3321 | |
| 3322 wpls13 = 13 * wpls; | |
| 3323 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3324 | |
| 3325 for (i = 0; i < h; i++) { | |
| 3326 sptr = datas + i * wpls; | |
| 3327 dptr = datad + i * wpld; | |
| 3328 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3329 *dptr = (*(sptr + wpls13)) | | |
| 3330 (*sptr) | | |
| 3331 (*(sptr - wpls13)); | |
| 3332 } | |
| 3333 } | |
| 3334 } | |
| 3335 | |
| 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 { | |
| 3344 l_int32 i; | |
| 3345 l_int32 j, pwpls; | |
| 3346 l_uint32 *sptr, *dptr; | |
| 3347 l_int32 wpls13; | |
| 3348 | |
| 3349 wpls13 = 13 * wpls; | |
| 3350 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3351 | |
| 3352 for (i = 0; i < h; i++) { | |
| 3353 sptr = datas + i * wpls; | |
| 3354 dptr = datad + i * wpld; | |
| 3355 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3356 *dptr = (*(sptr - wpls13)) & | |
| 3357 (*sptr) & | |
| 3358 (*(sptr + wpls13)); | |
| 3359 } | |
| 3360 } | |
| 3361 } | |
| 3362 | |
| 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 { | |
| 3371 l_int32 i; | |
| 3372 l_int32 j, pwpls; | |
| 3373 l_uint32 *sptr, *dptr; | |
| 3374 | |
| 3375 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3376 | |
| 3377 for (i = 0; i < h; i++) { | |
| 3378 sptr = datas + i * wpls; | |
| 3379 dptr = datad + i * wpld; | |
| 3380 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3381 *dptr = ((*(sptr) << 16) | (*(sptr + 1) >> 16)) | | |
| 3382 ((*(sptr) << 8) | (*(sptr + 1) >> 24)) | | |
| 3383 (*sptr) | | |
| 3384 ((*(sptr) >> 8) | (*(sptr - 1) << 24)) | | |
| 3385 ((*(sptr) >> 16) | (*(sptr - 1) << 16)); | |
| 3386 } | |
| 3387 } | |
| 3388 } | |
| 3389 | |
| 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 { | |
| 3398 l_int32 i; | |
| 3399 l_int32 j, pwpls; | |
| 3400 l_uint32 *sptr, *dptr; | |
| 3401 | |
| 3402 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3403 | |
| 3404 for (i = 0; i < h; i++) { | |
| 3405 sptr = datas + i * wpls; | |
| 3406 dptr = datad + i * wpld; | |
| 3407 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3408 *dptr = ((*(sptr) >> 16) | (*(sptr - 1) << 16)) & | |
| 3409 ((*(sptr) >> 8) | (*(sptr - 1) << 24)) & | |
| 3410 (*sptr) & | |
| 3411 ((*(sptr) << 8) | (*(sptr + 1) >> 24)) & | |
| 3412 ((*(sptr) << 16) | (*(sptr + 1) >> 16)); | |
| 3413 } | |
| 3414 } | |
| 3415 } | |
| 3416 | |
| 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 { | |
| 3425 l_int32 i; | |
| 3426 l_int32 j, pwpls; | |
| 3427 l_uint32 *sptr, *dptr; | |
| 3428 l_int32 wpls8; | |
| 3429 l_int32 wpls16; | |
| 3430 | |
| 3431 wpls8 = 8 * wpls; | |
| 3432 wpls16 = 16 * wpls; | |
| 3433 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3434 | |
| 3435 for (i = 0; i < h; i++) { | |
| 3436 sptr = datas + i * wpls; | |
| 3437 dptr = datad + i * wpld; | |
| 3438 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3439 *dptr = (*(sptr + wpls16)) | | |
| 3440 (*(sptr + wpls8)) | | |
| 3441 (*sptr) | | |
| 3442 (*(sptr - wpls8)) | | |
| 3443 (*(sptr - wpls16)); | |
| 3444 } | |
| 3445 } | |
| 3446 } | |
| 3447 | |
| 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 { | |
| 3456 l_int32 i; | |
| 3457 l_int32 j, pwpls; | |
| 3458 l_uint32 *sptr, *dptr; | |
| 3459 l_int32 wpls8; | |
| 3460 l_int32 wpls16; | |
| 3461 | |
| 3462 wpls8 = 8 * wpls; | |
| 3463 wpls16 = 16 * wpls; | |
| 3464 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3465 | |
| 3466 for (i = 0; i < h; i++) { | |
| 3467 sptr = datas + i * wpls; | |
| 3468 dptr = datad + i * wpld; | |
| 3469 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3470 *dptr = (*(sptr - wpls16)) & | |
| 3471 (*(sptr - wpls8)) & | |
| 3472 (*sptr) & | |
| 3473 (*(sptr + wpls8)) & | |
| 3474 (*(sptr + wpls16)); | |
| 3475 } | |
| 3476 } | |
| 3477 } | |
| 3478 | |
| 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 { | |
| 3487 l_int32 i; | |
| 3488 l_int32 j, pwpls; | |
| 3489 l_uint32 *sptr, *dptr; | |
| 3490 | |
| 3491 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3492 | |
| 3493 for (i = 0; i < h; i++) { | |
| 3494 sptr = datas + i * wpls; | |
| 3495 dptr = datad + i * wpld; | |
| 3496 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3497 *dptr = ((*(sptr) << 18) | (*(sptr + 1) >> 14)) | | |
| 3498 ((*(sptr) << 11) | (*(sptr + 1) >> 21)) | | |
| 3499 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 3500 ((*(sptr) >> 3) | (*(sptr - 1) << 29)) | | |
| 3501 ((*(sptr) >> 10) | (*(sptr - 1) << 22)) | | |
| 3502 ((*(sptr) >> 17) | (*(sptr - 1) << 15)); | |
| 3503 } | |
| 3504 } | |
| 3505 } | |
| 3506 | |
| 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 { | |
| 3515 l_int32 i; | |
| 3516 l_int32 j, pwpls; | |
| 3517 l_uint32 *sptr, *dptr; | |
| 3518 | |
| 3519 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3520 | |
| 3521 for (i = 0; i < h; i++) { | |
| 3522 sptr = datas + i * wpls; | |
| 3523 dptr = datad + i * wpld; | |
| 3524 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3525 *dptr = ((*(sptr) >> 18) | (*(sptr - 1) << 14)) & | |
| 3526 ((*(sptr) >> 11) | (*(sptr - 1) << 21)) & | |
| 3527 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 3528 ((*(sptr) << 3) | (*(sptr + 1) >> 29)) & | |
| 3529 ((*(sptr) << 10) | (*(sptr + 1) >> 22)) & | |
| 3530 ((*(sptr) << 17) | (*(sptr + 1) >> 15)); | |
| 3531 } | |
| 3532 } | |
| 3533 } | |
| 3534 | |
| 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 { | |
| 3543 l_int32 i; | |
| 3544 l_int32 j, pwpls; | |
| 3545 l_uint32 *sptr, *dptr; | |
| 3546 l_int32 wpls3; | |
| 3547 l_int32 wpls4; | |
| 3548 l_int32 wpls10; | |
| 3549 l_int32 wpls11; | |
| 3550 l_int32 wpls17; | |
| 3551 l_int32 wpls18; | |
| 3552 | |
| 3553 wpls3 = 3 * wpls; | |
| 3554 wpls4 = 4 * wpls; | |
| 3555 wpls10 = 10 * wpls; | |
| 3556 wpls11 = 11 * wpls; | |
| 3557 wpls17 = 17 * wpls; | |
| 3558 wpls18 = 18 * wpls; | |
| 3559 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3560 | |
| 3561 for (i = 0; i < h; i++) { | |
| 3562 sptr = datas + i * wpls; | |
| 3563 dptr = datad + i * wpld; | |
| 3564 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3565 *dptr = (*(sptr + wpls18)) | | |
| 3566 (*(sptr + wpls11)) | | |
| 3567 (*(sptr + wpls4)) | | |
| 3568 (*(sptr - wpls3)) | | |
| 3569 (*(sptr - wpls10)) | | |
| 3570 (*(sptr - wpls17)); | |
| 3571 } | |
| 3572 } | |
| 3573 } | |
| 3574 | |
| 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 { | |
| 3583 l_int32 i; | |
| 3584 l_int32 j, pwpls; | |
| 3585 l_uint32 *sptr, *dptr; | |
| 3586 l_int32 wpls3; | |
| 3587 l_int32 wpls4; | |
| 3588 l_int32 wpls10; | |
| 3589 l_int32 wpls11; | |
| 3590 l_int32 wpls17; | |
| 3591 l_int32 wpls18; | |
| 3592 | |
| 3593 wpls3 = 3 * wpls; | |
| 3594 wpls4 = 4 * wpls; | |
| 3595 wpls10 = 10 * wpls; | |
| 3596 wpls11 = 11 * wpls; | |
| 3597 wpls17 = 17 * wpls; | |
| 3598 wpls18 = 18 * wpls; | |
| 3599 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3600 | |
| 3601 for (i = 0; i < h; i++) { | |
| 3602 sptr = datas + i * wpls; | |
| 3603 dptr = datad + i * wpld; | |
| 3604 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3605 *dptr = (*(sptr - wpls18)) & | |
| 3606 (*(sptr - wpls11)) & | |
| 3607 (*(sptr - wpls4)) & | |
| 3608 (*(sptr + wpls3)) & | |
| 3609 (*(sptr + wpls10)) & | |
| 3610 (*(sptr + wpls17)); | |
| 3611 } | |
| 3612 } | |
| 3613 } | |
| 3614 | |
| 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 { | |
| 3623 l_int32 i; | |
| 3624 l_int32 j, pwpls; | |
| 3625 l_uint32 *sptr, *dptr; | |
| 3626 | |
| 3627 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3628 | |
| 3629 for (i = 0; i < h; i++) { | |
| 3630 sptr = datas + i * wpls; | |
| 3631 dptr = datad + i * wpld; | |
| 3632 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3633 *dptr = ((*(sptr) << 17) | (*(sptr + 1) >> 15)) | | |
| 3634 ((*(sptr) << 6) | (*(sptr + 1) >> 26)) | | |
| 3635 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) | | |
| 3636 ((*(sptr) >> 16) | (*(sptr - 1) << 16)); | |
| 3637 } | |
| 3638 } | |
| 3639 } | |
| 3640 | |
| 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 { | |
| 3649 l_int32 i; | |
| 3650 l_int32 j, pwpls; | |
| 3651 l_uint32 *sptr, *dptr; | |
| 3652 | |
| 3653 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3654 | |
| 3655 for (i = 0; i < h; i++) { | |
| 3656 sptr = datas + i * wpls; | |
| 3657 dptr = datad + i * wpld; | |
| 3658 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3659 *dptr = ((*(sptr) >> 17) | (*(sptr - 1) << 15)) & | |
| 3660 ((*(sptr) >> 6) | (*(sptr - 1) << 26)) & | |
| 3661 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) & | |
| 3662 ((*(sptr) << 16) | (*(sptr + 1) >> 16)); | |
| 3663 } | |
| 3664 } | |
| 3665 } | |
| 3666 | |
| 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 { | |
| 3675 l_int32 i; | |
| 3676 l_int32 j, pwpls; | |
| 3677 l_uint32 *sptr, *dptr; | |
| 3678 l_int32 wpls5; | |
| 3679 l_int32 wpls6; | |
| 3680 l_int32 wpls16; | |
| 3681 l_int32 wpls17; | |
| 3682 | |
| 3683 wpls5 = 5 * wpls; | |
| 3684 wpls6 = 6 * wpls; | |
| 3685 wpls16 = 16 * wpls; | |
| 3686 wpls17 = 17 * wpls; | |
| 3687 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3688 | |
| 3689 for (i = 0; i < h; i++) { | |
| 3690 sptr = datas + i * wpls; | |
| 3691 dptr = datad + i * wpld; | |
| 3692 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3693 *dptr = (*(sptr + wpls17)) | | |
| 3694 (*(sptr + wpls6)) | | |
| 3695 (*(sptr - wpls5)) | | |
| 3696 (*(sptr - wpls16)); | |
| 3697 } | |
| 3698 } | |
| 3699 } | |
| 3700 | |
| 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 { | |
| 3709 l_int32 i; | |
| 3710 l_int32 j, pwpls; | |
| 3711 l_uint32 *sptr, *dptr; | |
| 3712 l_int32 wpls5; | |
| 3713 l_int32 wpls6; | |
| 3714 l_int32 wpls16; | |
| 3715 l_int32 wpls17; | |
| 3716 | |
| 3717 wpls5 = 5 * wpls; | |
| 3718 wpls6 = 6 * wpls; | |
| 3719 wpls16 = 16 * wpls; | |
| 3720 wpls17 = 17 * wpls; | |
| 3721 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3722 | |
| 3723 for (i = 0; i < h; i++) { | |
| 3724 sptr = datas + i * wpls; | |
| 3725 dptr = datad + i * wpld; | |
| 3726 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3727 *dptr = (*(sptr - wpls17)) & | |
| 3728 (*(sptr - wpls6)) & | |
| 3729 (*(sptr + wpls5)) & | |
| 3730 (*(sptr + wpls16)); | |
| 3731 } | |
| 3732 } | |
| 3733 } | |
| 3734 | |
| 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 { | |
| 3743 l_int32 i; | |
| 3744 l_int32 j, pwpls; | |
| 3745 l_uint32 *sptr, *dptr; | |
| 3746 | |
| 3747 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3748 | |
| 3749 for (i = 0; i < h; i++) { | |
| 3750 sptr = datas + i * wpls; | |
| 3751 dptr = datad + i * wpld; | |
| 3752 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3753 *dptr = ((*(sptr) << 18) | (*(sptr + 1) >> 14)) | | |
| 3754 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) | | |
| 3755 (*sptr) | | |
| 3756 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) | | |
| 3757 ((*(sptr) >> 18) | (*(sptr - 1) << 14)); | |
| 3758 } | |
| 3759 } | |
| 3760 } | |
| 3761 | |
| 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 { | |
| 3770 l_int32 i; | |
| 3771 l_int32 j, pwpls; | |
| 3772 l_uint32 *sptr, *dptr; | |
| 3773 | |
| 3774 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3775 | |
| 3776 for (i = 0; i < h; i++) { | |
| 3777 sptr = datas + i * wpls; | |
| 3778 dptr = datad + i * wpld; | |
| 3779 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3780 *dptr = ((*(sptr) >> 18) | (*(sptr - 1) << 14)) & | |
| 3781 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) & | |
| 3782 (*sptr) & | |
| 3783 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) & | |
| 3784 ((*(sptr) << 18) | (*(sptr + 1) >> 14)); | |
| 3785 } | |
| 3786 } | |
| 3787 } | |
| 3788 | |
| 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 { | |
| 3797 l_int32 i; | |
| 3798 l_int32 j, pwpls; | |
| 3799 l_uint32 *sptr, *dptr; | |
| 3800 l_int32 wpls9; | |
| 3801 l_int32 wpls18; | |
| 3802 | |
| 3803 wpls9 = 9 * wpls; | |
| 3804 wpls18 = 18 * wpls; | |
| 3805 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3806 | |
| 3807 for (i = 0; i < h; i++) { | |
| 3808 sptr = datas + i * wpls; | |
| 3809 dptr = datad + i * wpld; | |
| 3810 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3811 *dptr = (*(sptr + wpls18)) | | |
| 3812 (*(sptr + wpls9)) | | |
| 3813 (*sptr) | | |
| 3814 (*(sptr - wpls9)) | | |
| 3815 (*(sptr - wpls18)); | |
| 3816 } | |
| 3817 } | |
| 3818 } | |
| 3819 | |
| 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 { | |
| 3828 l_int32 i; | |
| 3829 l_int32 j, pwpls; | |
| 3830 l_uint32 *sptr, *dptr; | |
| 3831 l_int32 wpls9; | |
| 3832 l_int32 wpls18; | |
| 3833 | |
| 3834 wpls9 = 9 * wpls; | |
| 3835 wpls18 = 18 * wpls; | |
| 3836 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3837 | |
| 3838 for (i = 0; i < h; i++) { | |
| 3839 sptr = datas + i * wpls; | |
| 3840 dptr = datad + i * wpld; | |
| 3841 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3842 *dptr = (*(sptr - wpls18)) & | |
| 3843 (*(sptr - wpls9)) & | |
| 3844 (*sptr) & | |
| 3845 (*(sptr + wpls9)) & | |
| 3846 (*(sptr + wpls18)); | |
| 3847 } | |
| 3848 } | |
| 3849 } | |
| 3850 | |
| 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 { | |
| 3859 l_int32 i; | |
| 3860 l_int32 j, pwpls; | |
| 3861 l_uint32 *sptr, *dptr; | |
| 3862 | |
| 3863 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3864 | |
| 3865 for (i = 0; i < h; i++) { | |
| 3866 sptr = datas + i * wpls; | |
| 3867 dptr = datad + i * wpld; | |
| 3868 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3869 *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) | | |
| 3870 ((*(sptr) << 12) | (*(sptr + 1) >> 20)) | | |
| 3871 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) | | |
| 3872 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) | | |
| 3873 ((*(sptr) >> 12) | (*(sptr - 1) << 20)) | | |
| 3874 ((*(sptr) >> 20) | (*(sptr - 1) << 12)); | |
| 3875 } | |
| 3876 } | |
| 3877 } | |
| 3878 | |
| 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 { | |
| 3887 l_int32 i; | |
| 3888 l_int32 j, pwpls; | |
| 3889 l_uint32 *sptr, *dptr; | |
| 3890 | |
| 3891 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3892 | |
| 3893 for (i = 0; i < h; i++) { | |
| 3894 sptr = datas + i * wpls; | |
| 3895 dptr = datad + i * wpld; | |
| 3896 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3897 *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) & | |
| 3898 ((*(sptr) >> 12) | (*(sptr - 1) << 20)) & | |
| 3899 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) & | |
| 3900 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) & | |
| 3901 ((*(sptr) << 12) | (*(sptr + 1) >> 20)) & | |
| 3902 ((*(sptr) << 20) | (*(sptr + 1) >> 12)); | |
| 3903 } | |
| 3904 } | |
| 3905 } | |
| 3906 | |
| 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 { | |
| 3915 l_int32 i; | |
| 3916 l_int32 j, pwpls; | |
| 3917 l_uint32 *sptr, *dptr; | |
| 3918 l_int32 wpls4; | |
| 3919 l_int32 wpls12; | |
| 3920 l_int32 wpls20; | |
| 3921 | |
| 3922 wpls4 = 4 * wpls; | |
| 3923 wpls12 = 12 * wpls; | |
| 3924 wpls20 = 20 * wpls; | |
| 3925 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3926 | |
| 3927 for (i = 0; i < h; i++) { | |
| 3928 sptr = datas + i * wpls; | |
| 3929 dptr = datad + i * wpld; | |
| 3930 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3931 *dptr = (*(sptr + wpls20)) | | |
| 3932 (*(sptr + wpls12)) | | |
| 3933 (*(sptr + wpls4)) | | |
| 3934 (*(sptr - wpls4)) | | |
| 3935 (*(sptr - wpls12)) | | |
| 3936 (*(sptr - wpls20)); | |
| 3937 } | |
| 3938 } | |
| 3939 } | |
| 3940 | |
| 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 { | |
| 3949 l_int32 i; | |
| 3950 l_int32 j, pwpls; | |
| 3951 l_uint32 *sptr, *dptr; | |
| 3952 l_int32 wpls4; | |
| 3953 l_int32 wpls12; | |
| 3954 l_int32 wpls20; | |
| 3955 | |
| 3956 wpls4 = 4 * wpls; | |
| 3957 wpls12 = 12 * wpls; | |
| 3958 wpls20 = 20 * wpls; | |
| 3959 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3960 | |
| 3961 for (i = 0; i < h; i++) { | |
| 3962 sptr = datas + i * wpls; | |
| 3963 dptr = datad + i * wpld; | |
| 3964 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3965 *dptr = (*(sptr - wpls20)) & | |
| 3966 (*(sptr - wpls12)) & | |
| 3967 (*(sptr - wpls4)) & | |
| 3968 (*(sptr + wpls4)) & | |
| 3969 (*(sptr + wpls12)) & | |
| 3970 (*(sptr + wpls20)); | |
| 3971 } | |
| 3972 } | |
| 3973 } | |
| 3974 | |
| 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 { | |
| 3983 l_int32 i; | |
| 3984 l_int32 j, pwpls; | |
| 3985 l_uint32 *sptr, *dptr; | |
| 3986 | |
| 3987 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 3988 | |
| 3989 for (i = 0; i < h; i++) { | |
| 3990 sptr = datas + i * wpls; | |
| 3991 dptr = datad + i * wpld; | |
| 3992 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 3993 *dptr = ((*(sptr) << 21) | (*(sptr + 1) >> 11)) | | |
| 3994 ((*(sptr) << 14) | (*(sptr + 1) >> 18)) | | |
| 3995 ((*(sptr) << 7) | (*(sptr + 1) >> 25)) | | |
| 3996 (*sptr) | | |
| 3997 ((*(sptr) >> 7) | (*(sptr - 1) << 25)) | | |
| 3998 ((*(sptr) >> 14) | (*(sptr - 1) << 18)) | | |
| 3999 ((*(sptr) >> 21) | (*(sptr - 1) << 11)); | |
| 4000 } | |
| 4001 } | |
| 4002 } | |
| 4003 | |
| 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 { | |
| 4012 l_int32 i; | |
| 4013 l_int32 j, pwpls; | |
| 4014 l_uint32 *sptr, *dptr; | |
| 4015 | |
| 4016 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4017 | |
| 4018 for (i = 0; i < h; i++) { | |
| 4019 sptr = datas + i * wpls; | |
| 4020 dptr = datad + i * wpld; | |
| 4021 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4022 *dptr = ((*(sptr) >> 21) | (*(sptr - 1) << 11)) & | |
| 4023 ((*(sptr) >> 14) | (*(sptr - 1) << 18)) & | |
| 4024 ((*(sptr) >> 7) | (*(sptr - 1) << 25)) & | |
| 4025 (*sptr) & | |
| 4026 ((*(sptr) << 7) | (*(sptr + 1) >> 25)) & | |
| 4027 ((*(sptr) << 14) | (*(sptr + 1) >> 18)) & | |
| 4028 ((*(sptr) << 21) | (*(sptr + 1) >> 11)); | |
| 4029 } | |
| 4030 } | |
| 4031 } | |
| 4032 | |
| 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 { | |
| 4041 l_int32 i; | |
| 4042 l_int32 j, pwpls; | |
| 4043 l_uint32 *sptr, *dptr; | |
| 4044 l_int32 wpls7; | |
| 4045 l_int32 wpls14; | |
| 4046 l_int32 wpls21; | |
| 4047 | |
| 4048 wpls7 = 7 * wpls; | |
| 4049 wpls14 = 14 * wpls; | |
| 4050 wpls21 = 21 * wpls; | |
| 4051 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4052 | |
| 4053 for (i = 0; i < h; i++) { | |
| 4054 sptr = datas + i * wpls; | |
| 4055 dptr = datad + i * wpld; | |
| 4056 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4057 *dptr = (*(sptr + wpls21)) | | |
| 4058 (*(sptr + wpls14)) | | |
| 4059 (*(sptr + wpls7)) | | |
| 4060 (*sptr) | | |
| 4061 (*(sptr - wpls7)) | | |
| 4062 (*(sptr - wpls14)) | | |
| 4063 (*(sptr - wpls21)); | |
| 4064 } | |
| 4065 } | |
| 4066 } | |
| 4067 | |
| 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 { | |
| 4076 l_int32 i; | |
| 4077 l_int32 j, pwpls; | |
| 4078 l_uint32 *sptr, *dptr; | |
| 4079 l_int32 wpls7; | |
| 4080 l_int32 wpls14; | |
| 4081 l_int32 wpls21; | |
| 4082 | |
| 4083 wpls7 = 7 * wpls; | |
| 4084 wpls14 = 14 * wpls; | |
| 4085 wpls21 = 21 * wpls; | |
| 4086 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4087 | |
| 4088 for (i = 0; i < h; i++) { | |
| 4089 sptr = datas + i * wpls; | |
| 4090 dptr = datad + i * wpld; | |
| 4091 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4092 *dptr = (*(sptr - wpls21)) & | |
| 4093 (*(sptr - wpls14)) & | |
| 4094 (*(sptr - wpls7)) & | |
| 4095 (*sptr) & | |
| 4096 (*(sptr + wpls7)) & | |
| 4097 (*(sptr + wpls14)) & | |
| 4098 (*(sptr + wpls21)); | |
| 4099 } | |
| 4100 } | |
| 4101 } | |
| 4102 | |
| 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 { | |
| 4111 l_int32 i; | |
| 4112 l_int32 j, pwpls; | |
| 4113 l_uint32 *sptr, *dptr; | |
| 4114 | |
| 4115 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4116 | |
| 4117 for (i = 0; i < h; i++) { | |
| 4118 sptr = datas + i * wpls; | |
| 4119 dptr = datad + i * wpld; | |
| 4120 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4121 *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) | | |
| 4122 ((*(sptr) << 10) | (*(sptr + 1) >> 22)) | | |
| 4123 (*sptr) | | |
| 4124 ((*(sptr) >> 10) | (*(sptr - 1) << 22)) | | |
| 4125 ((*(sptr) >> 20) | (*(sptr - 1) << 12)); | |
| 4126 } | |
| 4127 } | |
| 4128 } | |
| 4129 | |
| 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 { | |
| 4138 l_int32 i; | |
| 4139 l_int32 j, pwpls; | |
| 4140 l_uint32 *sptr, *dptr; | |
| 4141 | |
| 4142 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4143 | |
| 4144 for (i = 0; i < h; i++) { | |
| 4145 sptr = datas + i * wpls; | |
| 4146 dptr = datad + i * wpld; | |
| 4147 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4148 *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) & | |
| 4149 ((*(sptr) >> 10) | (*(sptr - 1) << 22)) & | |
| 4150 (*sptr) & | |
| 4151 ((*(sptr) << 10) | (*(sptr + 1) >> 22)) & | |
| 4152 ((*(sptr) << 20) | (*(sptr + 1) >> 12)); | |
| 4153 } | |
| 4154 } | |
| 4155 } | |
| 4156 | |
| 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 { | |
| 4165 l_int32 i; | |
| 4166 l_int32 j, pwpls; | |
| 4167 l_uint32 *sptr, *dptr; | |
| 4168 l_int32 wpls10; | |
| 4169 l_int32 wpls20; | |
| 4170 | |
| 4171 wpls10 = 10 * wpls; | |
| 4172 wpls20 = 20 * wpls; | |
| 4173 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4174 | |
| 4175 for (i = 0; i < h; i++) { | |
| 4176 sptr = datas + i * wpls; | |
| 4177 dptr = datad + i * wpld; | |
| 4178 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4179 *dptr = (*(sptr + wpls20)) | | |
| 4180 (*(sptr + wpls10)) | | |
| 4181 (*sptr) | | |
| 4182 (*(sptr - wpls10)) | | |
| 4183 (*(sptr - wpls20)); | |
| 4184 } | |
| 4185 } | |
| 4186 } | |
| 4187 | |
| 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 { | |
| 4196 l_int32 i; | |
| 4197 l_int32 j, pwpls; | |
| 4198 l_uint32 *sptr, *dptr; | |
| 4199 l_int32 wpls10; | |
| 4200 l_int32 wpls20; | |
| 4201 | |
| 4202 wpls10 = 10 * wpls; | |
| 4203 wpls20 = 20 * wpls; | |
| 4204 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4205 | |
| 4206 for (i = 0; i < h; i++) { | |
| 4207 sptr = datas + i * wpls; | |
| 4208 dptr = datad + i * wpld; | |
| 4209 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4210 *dptr = (*(sptr - wpls20)) & | |
| 4211 (*(sptr - wpls10)) & | |
| 4212 (*sptr) & | |
| 4213 (*(sptr + wpls10)) & | |
| 4214 (*(sptr + wpls20)); | |
| 4215 } | |
| 4216 } | |
| 4217 } | |
| 4218 | |
| 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 { | |
| 4227 l_int32 i; | |
| 4228 l_int32 j, pwpls; | |
| 4229 l_uint32 *sptr, *dptr; | |
| 4230 | |
| 4231 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4232 | |
| 4233 for (i = 0; i < h; i++) { | |
| 4234 sptr = datas + i * wpls; | |
| 4235 dptr = datad + i * wpld; | |
| 4236 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4237 *dptr = ((*(sptr) << 20) | (*(sptr + 1) >> 12)) | | |
| 4238 ((*(sptr) << 7) | (*(sptr + 1) >> 25)) | | |
| 4239 ((*(sptr) >> 6) | (*(sptr - 1) << 26)) | | |
| 4240 ((*(sptr) >> 19) | (*(sptr - 1) << 13)); | |
| 4241 } | |
| 4242 } | |
| 4243 } | |
| 4244 | |
| 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 { | |
| 4253 l_int32 i; | |
| 4254 l_int32 j, pwpls; | |
| 4255 l_uint32 *sptr, *dptr; | |
| 4256 | |
| 4257 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4258 | |
| 4259 for (i = 0; i < h; i++) { | |
| 4260 sptr = datas + i * wpls; | |
| 4261 dptr = datad + i * wpld; | |
| 4262 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4263 *dptr = ((*(sptr) >> 20) | (*(sptr - 1) << 12)) & | |
| 4264 ((*(sptr) >> 7) | (*(sptr - 1) << 25)) & | |
| 4265 ((*(sptr) << 6) | (*(sptr + 1) >> 26)) & | |
| 4266 ((*(sptr) << 19) | (*(sptr + 1) >> 13)); | |
| 4267 } | |
| 4268 } | |
| 4269 } | |
| 4270 | |
| 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 { | |
| 4279 l_int32 i; | |
| 4280 l_int32 j, pwpls; | |
| 4281 l_uint32 *sptr, *dptr; | |
| 4282 l_int32 wpls6; | |
| 4283 l_int32 wpls7; | |
| 4284 l_int32 wpls19; | |
| 4285 l_int32 wpls20; | |
| 4286 | |
| 4287 wpls6 = 6 * wpls; | |
| 4288 wpls7 = 7 * wpls; | |
| 4289 wpls19 = 19 * wpls; | |
| 4290 wpls20 = 20 * wpls; | |
| 4291 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4292 | |
| 4293 for (i = 0; i < h; i++) { | |
| 4294 sptr = datas + i * wpls; | |
| 4295 dptr = datad + i * wpld; | |
| 4296 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4297 *dptr = (*(sptr + wpls20)) | | |
| 4298 (*(sptr + wpls7)) | | |
| 4299 (*(sptr - wpls6)) | | |
| 4300 (*(sptr - wpls19)); | |
| 4301 } | |
| 4302 } | |
| 4303 } | |
| 4304 | |
| 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 { | |
| 4313 l_int32 i; | |
| 4314 l_int32 j, pwpls; | |
| 4315 l_uint32 *sptr, *dptr; | |
| 4316 l_int32 wpls6; | |
| 4317 l_int32 wpls7; | |
| 4318 l_int32 wpls19; | |
| 4319 l_int32 wpls20; | |
| 4320 | |
| 4321 wpls6 = 6 * wpls; | |
| 4322 wpls7 = 7 * wpls; | |
| 4323 wpls19 = 19 * wpls; | |
| 4324 wpls20 = 20 * wpls; | |
| 4325 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4326 | |
| 4327 for (i = 0; i < h; i++) { | |
| 4328 sptr = datas + i * wpls; | |
| 4329 dptr = datad + i * wpld; | |
| 4330 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4331 *dptr = (*(sptr - wpls20)) & | |
| 4332 (*(sptr - wpls7)) & | |
| 4333 (*(sptr + wpls6)) & | |
| 4334 (*(sptr + wpls19)); | |
| 4335 } | |
| 4336 } | |
| 4337 } | |
| 4338 | |
| 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 { | |
| 4347 l_int32 i; | |
| 4348 l_int32 j, pwpls; | |
| 4349 l_uint32 *sptr, *dptr; | |
| 4350 | |
| 4351 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4352 | |
| 4353 for (i = 0; i < h; i++) { | |
| 4354 sptr = datas + i * wpls; | |
| 4355 dptr = datad + i * wpld; | |
| 4356 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4357 *dptr = ((*(sptr) << 23) | (*(sptr + 1) >> 9)) | | |
| 4358 ((*(sptr) << 14) | (*(sptr + 1) >> 18)) | | |
| 4359 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) | | |
| 4360 ((*(sptr) >> 4) | (*(sptr - 1) << 28)) | | |
| 4361 ((*(sptr) >> 13) | (*(sptr - 1) << 19)) | | |
| 4362 ((*(sptr) >> 22) | (*(sptr - 1) << 10)); | |
| 4363 } | |
| 4364 } | |
| 4365 } | |
| 4366 | |
| 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 { | |
| 4375 l_int32 i; | |
| 4376 l_int32 j, pwpls; | |
| 4377 l_uint32 *sptr, *dptr; | |
| 4378 | |
| 4379 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4380 | |
| 4381 for (i = 0; i < h; i++) { | |
| 4382 sptr = datas + i * wpls; | |
| 4383 dptr = datad + i * wpld; | |
| 4384 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4385 *dptr = ((*(sptr) >> 23) | (*(sptr - 1) << 9)) & | |
| 4386 ((*(sptr) >> 14) | (*(sptr - 1) << 18)) & | |
| 4387 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) & | |
| 4388 ((*(sptr) << 4) | (*(sptr + 1) >> 28)) & | |
| 4389 ((*(sptr) << 13) | (*(sptr + 1) >> 19)) & | |
| 4390 ((*(sptr) << 22) | (*(sptr + 1) >> 10)); | |
| 4391 } | |
| 4392 } | |
| 4393 } | |
| 4394 | |
| 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 { | |
| 4403 l_int32 i; | |
| 4404 l_int32 j, pwpls; | |
| 4405 l_uint32 *sptr, *dptr; | |
| 4406 l_int32 wpls4; | |
| 4407 l_int32 wpls5; | |
| 4408 l_int32 wpls13; | |
| 4409 l_int32 wpls14; | |
| 4410 l_int32 wpls22; | |
| 4411 l_int32 wpls23; | |
| 4412 | |
| 4413 wpls4 = 4 * wpls; | |
| 4414 wpls5 = 5 * wpls; | |
| 4415 wpls13 = 13 * wpls; | |
| 4416 wpls14 = 14 * wpls; | |
| 4417 wpls22 = 22 * wpls; | |
| 4418 wpls23 = 23 * wpls; | |
| 4419 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4420 | |
| 4421 for (i = 0; i < h; i++) { | |
| 4422 sptr = datas + i * wpls; | |
| 4423 dptr = datad + i * wpld; | |
| 4424 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4425 *dptr = (*(sptr + wpls23)) | | |
| 4426 (*(sptr + wpls14)) | | |
| 4427 (*(sptr + wpls5)) | | |
| 4428 (*(sptr - wpls4)) | | |
| 4429 (*(sptr - wpls13)) | | |
| 4430 (*(sptr - wpls22)); | |
| 4431 } | |
| 4432 } | |
| 4433 } | |
| 4434 | |
| 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 { | |
| 4443 l_int32 i; | |
| 4444 l_int32 j, pwpls; | |
| 4445 l_uint32 *sptr, *dptr; | |
| 4446 l_int32 wpls4; | |
| 4447 l_int32 wpls5; | |
| 4448 l_int32 wpls13; | |
| 4449 l_int32 wpls14; | |
| 4450 l_int32 wpls22; | |
| 4451 l_int32 wpls23; | |
| 4452 | |
| 4453 wpls4 = 4 * wpls; | |
| 4454 wpls5 = 5 * wpls; | |
| 4455 wpls13 = 13 * wpls; | |
| 4456 wpls14 = 14 * wpls; | |
| 4457 wpls22 = 22 * wpls; | |
| 4458 wpls23 = 23 * wpls; | |
| 4459 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4460 | |
| 4461 for (i = 0; i < h; i++) { | |
| 4462 sptr = datas + i * wpls; | |
| 4463 dptr = datad + i * wpld; | |
| 4464 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4465 *dptr = (*(sptr - wpls23)) & | |
| 4466 (*(sptr - wpls14)) & | |
| 4467 (*(sptr - wpls5)) & | |
| 4468 (*(sptr + wpls4)) & | |
| 4469 (*(sptr + wpls13)) & | |
| 4470 (*(sptr + wpls22)); | |
| 4471 } | |
| 4472 } | |
| 4473 } | |
| 4474 | |
| 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 { | |
| 4483 l_int32 i; | |
| 4484 l_int32 j, pwpls; | |
| 4485 l_uint32 *sptr, *dptr; | |
| 4486 | |
| 4487 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4488 | |
| 4489 for (i = 0; i < h; i++) { | |
| 4490 sptr = datas + i * wpls; | |
| 4491 dptr = datad + i * wpld; | |
| 4492 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4493 *dptr = ((*(sptr) << 22) | (*(sptr + 1) >> 10)) | | |
| 4494 ((*(sptr) << 11) | (*(sptr + 1) >> 21)) | | |
| 4495 (*sptr) | | |
| 4496 ((*(sptr) >> 11) | (*(sptr - 1) << 21)) | | |
| 4497 ((*(sptr) >> 22) | (*(sptr - 1) << 10)); | |
| 4498 } | |
| 4499 } | |
| 4500 } | |
| 4501 | |
| 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 { | |
| 4510 l_int32 i; | |
| 4511 l_int32 j, pwpls; | |
| 4512 l_uint32 *sptr, *dptr; | |
| 4513 | |
| 4514 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4515 | |
| 4516 for (i = 0; i < h; i++) { | |
| 4517 sptr = datas + i * wpls; | |
| 4518 dptr = datad + i * wpld; | |
| 4519 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4520 *dptr = ((*(sptr) >> 22) | (*(sptr - 1) << 10)) & | |
| 4521 ((*(sptr) >> 11) | (*(sptr - 1) << 21)) & | |
| 4522 (*sptr) & | |
| 4523 ((*(sptr) << 11) | (*(sptr + 1) >> 21)) & | |
| 4524 ((*(sptr) << 22) | (*(sptr + 1) >> 10)); | |
| 4525 } | |
| 4526 } | |
| 4527 } | |
| 4528 | |
| 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 { | |
| 4537 l_int32 i; | |
| 4538 l_int32 j, pwpls; | |
| 4539 l_uint32 *sptr, *dptr; | |
| 4540 l_int32 wpls11; | |
| 4541 l_int32 wpls22; | |
| 4542 | |
| 4543 wpls11 = 11 * wpls; | |
| 4544 wpls22 = 22 * wpls; | |
| 4545 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4546 | |
| 4547 for (i = 0; i < h; i++) { | |
| 4548 sptr = datas + i * wpls; | |
| 4549 dptr = datad + i * wpld; | |
| 4550 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4551 *dptr = (*(sptr + wpls22)) | | |
| 4552 (*(sptr + wpls11)) | | |
| 4553 (*sptr) | | |
| 4554 (*(sptr - wpls11)) | | |
| 4555 (*(sptr - wpls22)); | |
| 4556 } | |
| 4557 } | |
| 4558 } | |
| 4559 | |
| 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 { | |
| 4568 l_int32 i; | |
| 4569 l_int32 j, pwpls; | |
| 4570 l_uint32 *sptr, *dptr; | |
| 4571 l_int32 wpls11; | |
| 4572 l_int32 wpls22; | |
| 4573 | |
| 4574 wpls11 = 11 * wpls; | |
| 4575 wpls22 = 22 * wpls; | |
| 4576 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4577 | |
| 4578 for (i = 0; i < h; i++) { | |
| 4579 sptr = datas + i * wpls; | |
| 4580 dptr = datad + i * wpld; | |
| 4581 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4582 *dptr = (*(sptr - wpls22)) & | |
| 4583 (*(sptr - wpls11)) & | |
| 4584 (*sptr) & | |
| 4585 (*(sptr + wpls11)) & | |
| 4586 (*(sptr + wpls22)); | |
| 4587 } | |
| 4588 } | |
| 4589 } | |
| 4590 | |
| 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 { | |
| 4599 l_int32 i; | |
| 4600 l_int32 j, pwpls; | |
| 4601 l_uint32 *sptr, *dptr; | |
| 4602 | |
| 4603 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4604 | |
| 4605 for (i = 0; i < h; i++) { | |
| 4606 sptr = datas + i * wpls; | |
| 4607 dptr = datad + i * wpld; | |
| 4608 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4609 *dptr = ((*(sptr) << 24) | (*(sptr + 1) >> 8)) | | |
| 4610 ((*(sptr) << 16) | (*(sptr + 1) >> 16)) | | |
| 4611 ((*(sptr) << 8) | (*(sptr + 1) >> 24)) | | |
| 4612 (*sptr) | | |
| 4613 ((*(sptr) >> 8) | (*(sptr - 1) << 24)) | | |
| 4614 ((*(sptr) >> 16) | (*(sptr - 1) << 16)) | | |
| 4615 ((*(sptr) >> 24) | (*(sptr - 1) << 8)); | |
| 4616 } | |
| 4617 } | |
| 4618 } | |
| 4619 | |
| 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 { | |
| 4628 l_int32 i; | |
| 4629 l_int32 j, pwpls; | |
| 4630 l_uint32 *sptr, *dptr; | |
| 4631 | |
| 4632 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4633 | |
| 4634 for (i = 0; i < h; i++) { | |
| 4635 sptr = datas + i * wpls; | |
| 4636 dptr = datad + i * wpld; | |
| 4637 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4638 *dptr = ((*(sptr) >> 24) | (*(sptr - 1) << 8)) & | |
| 4639 ((*(sptr) >> 16) | (*(sptr - 1) << 16)) & | |
| 4640 ((*(sptr) >> 8) | (*(sptr - 1) << 24)) & | |
| 4641 (*sptr) & | |
| 4642 ((*(sptr) << 8) | (*(sptr + 1) >> 24)) & | |
| 4643 ((*(sptr) << 16) | (*(sptr + 1) >> 16)) & | |
| 4644 ((*(sptr) << 24) | (*(sptr + 1) >> 8)); | |
| 4645 } | |
| 4646 } | |
| 4647 } | |
| 4648 | |
| 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 { | |
| 4657 l_int32 i; | |
| 4658 l_int32 j, pwpls; | |
| 4659 l_uint32 *sptr, *dptr; | |
| 4660 l_int32 wpls8; | |
| 4661 l_int32 wpls16; | |
| 4662 l_int32 wpls24; | |
| 4663 | |
| 4664 wpls8 = 8 * wpls; | |
| 4665 wpls16 = 16 * wpls; | |
| 4666 wpls24 = 24 * wpls; | |
| 4667 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4668 | |
| 4669 for (i = 0; i < h; i++) { | |
| 4670 sptr = datas + i * wpls; | |
| 4671 dptr = datad + i * wpld; | |
| 4672 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4673 *dptr = (*(sptr + wpls24)) | | |
| 4674 (*(sptr + wpls16)) | | |
| 4675 (*(sptr + wpls8)) | | |
| 4676 (*sptr) | | |
| 4677 (*(sptr - wpls8)) | | |
| 4678 (*(sptr - wpls16)) | | |
| 4679 (*(sptr - wpls24)); | |
| 4680 } | |
| 4681 } | |
| 4682 } | |
| 4683 | |
| 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 { | |
| 4692 l_int32 i; | |
| 4693 l_int32 j, pwpls; | |
| 4694 l_uint32 *sptr, *dptr; | |
| 4695 l_int32 wpls8; | |
| 4696 l_int32 wpls16; | |
| 4697 l_int32 wpls24; | |
| 4698 | |
| 4699 wpls8 = 8 * wpls; | |
| 4700 wpls16 = 16 * wpls; | |
| 4701 wpls24 = 24 * wpls; | |
| 4702 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4703 | |
| 4704 for (i = 0; i < h; i++) { | |
| 4705 sptr = datas + i * wpls; | |
| 4706 dptr = datad + i * wpld; | |
| 4707 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4708 *dptr = (*(sptr - wpls24)) & | |
| 4709 (*(sptr - wpls16)) & | |
| 4710 (*(sptr - wpls8)) & | |
| 4711 (*sptr) & | |
| 4712 (*(sptr + wpls8)) & | |
| 4713 (*(sptr + wpls16)) & | |
| 4714 (*(sptr + wpls24)); | |
| 4715 } | |
| 4716 } | |
| 4717 } | |
| 4718 | |
| 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 { | |
| 4727 l_int32 i; | |
| 4728 l_int32 j, pwpls; | |
| 4729 l_uint32 *sptr, *dptr; | |
| 4730 | |
| 4731 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4732 | |
| 4733 for (i = 0; i < h; i++) { | |
| 4734 sptr = datas + i * wpls; | |
| 4735 dptr = datad + i * wpld; | |
| 4736 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4737 *dptr = ((*(sptr) << 25) | (*(sptr + 1) >> 7)) | | |
| 4738 ((*(sptr) << 15) | (*(sptr + 1) >> 17)) | | |
| 4739 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) | | |
| 4740 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) | | |
| 4741 ((*(sptr) >> 15) | (*(sptr - 1) << 17)) | | |
| 4742 ((*(sptr) >> 25) | (*(sptr - 1) << 7)); | |
| 4743 } | |
| 4744 } | |
| 4745 } | |
| 4746 | |
| 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 { | |
| 4755 l_int32 i; | |
| 4756 l_int32 j, pwpls; | |
| 4757 l_uint32 *sptr, *dptr; | |
| 4758 | |
| 4759 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4760 | |
| 4761 for (i = 0; i < h; i++) { | |
| 4762 sptr = datas + i * wpls; | |
| 4763 dptr = datad + i * wpld; | |
| 4764 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4765 *dptr = ((*(sptr) >> 25) | (*(sptr - 1) << 7)) & | |
| 4766 ((*(sptr) >> 15) | (*(sptr - 1) << 17)) & | |
| 4767 ((*(sptr) >> 5) | (*(sptr - 1) << 27)) & | |
| 4768 ((*(sptr) << 5) | (*(sptr + 1) >> 27)) & | |
| 4769 ((*(sptr) << 15) | (*(sptr + 1) >> 17)) & | |
| 4770 ((*(sptr) << 25) | (*(sptr + 1) >> 7)); | |
| 4771 } | |
| 4772 } | |
| 4773 } | |
| 4774 | |
| 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 { | |
| 4783 l_int32 i; | |
| 4784 l_int32 j, pwpls; | |
| 4785 l_uint32 *sptr, *dptr; | |
| 4786 l_int32 wpls5; | |
| 4787 l_int32 wpls15; | |
| 4788 l_int32 wpls25; | |
| 4789 | |
| 4790 wpls5 = 5 * wpls; | |
| 4791 wpls15 = 15 * wpls; | |
| 4792 wpls25 = 25 * wpls; | |
| 4793 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4794 | |
| 4795 for (i = 0; i < h; i++) { | |
| 4796 sptr = datas + i * wpls; | |
| 4797 dptr = datad + i * wpld; | |
| 4798 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4799 *dptr = (*(sptr + wpls25)) | | |
| 4800 (*(sptr + wpls15)) | | |
| 4801 (*(sptr + wpls5)) | | |
| 4802 (*(sptr - wpls5)) | | |
| 4803 (*(sptr - wpls15)) | | |
| 4804 (*(sptr - wpls25)); | |
| 4805 } | |
| 4806 } | |
| 4807 } | |
| 4808 | |
| 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 { | |
| 4817 l_int32 i; | |
| 4818 l_int32 j, pwpls; | |
| 4819 l_uint32 *sptr, *dptr; | |
| 4820 l_int32 wpls5; | |
| 4821 l_int32 wpls15; | |
| 4822 l_int32 wpls25; | |
| 4823 | |
| 4824 wpls5 = 5 * wpls; | |
| 4825 wpls15 = 15 * wpls; | |
| 4826 wpls25 = 25 * wpls; | |
| 4827 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4828 | |
| 4829 for (i = 0; i < h; i++) { | |
| 4830 sptr = datas + i * wpls; | |
| 4831 dptr = datad + i * wpld; | |
| 4832 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4833 *dptr = (*(sptr - wpls25)) & | |
| 4834 (*(sptr - wpls15)) & | |
| 4835 (*(sptr - wpls5)) & | |
| 4836 (*(sptr + wpls5)) & | |
| 4837 (*(sptr + wpls15)) & | |
| 4838 (*(sptr + wpls25)); | |
| 4839 } | |
| 4840 } | |
| 4841 } | |
| 4842 | |
| 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 { | |
| 4851 l_int32 i; | |
| 4852 l_int32 j, pwpls; | |
| 4853 l_uint32 *sptr, *dptr; | |
| 4854 | |
| 4855 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4856 | |
| 4857 for (i = 0; i < h; i++) { | |
| 4858 sptr = datas + i * wpls; | |
| 4859 dptr = datad + i * wpld; | |
| 4860 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4861 *dptr = ((*(sptr) << 27) | (*(sptr + 1) >> 5)) | | |
| 4862 ((*(sptr) << 18) | (*(sptr + 1) >> 14)) | | |
| 4863 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) | | |
| 4864 (*sptr) | | |
| 4865 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) | | |
| 4866 ((*(sptr) >> 18) | (*(sptr - 1) << 14)) | | |
| 4867 ((*(sptr) >> 27) | (*(sptr - 1) << 5)); | |
| 4868 } | |
| 4869 } | |
| 4870 } | |
| 4871 | |
| 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 { | |
| 4880 l_int32 i; | |
| 4881 l_int32 j, pwpls; | |
| 4882 l_uint32 *sptr, *dptr; | |
| 4883 | |
| 4884 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4885 | |
| 4886 for (i = 0; i < h; i++) { | |
| 4887 sptr = datas + i * wpls; | |
| 4888 dptr = datad + i * wpld; | |
| 4889 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4890 *dptr = ((*(sptr) >> 27) | (*(sptr - 1) << 5)) & | |
| 4891 ((*(sptr) >> 18) | (*(sptr - 1) << 14)) & | |
| 4892 ((*(sptr) >> 9) | (*(sptr - 1) << 23)) & | |
| 4893 (*sptr) & | |
| 4894 ((*(sptr) << 9) | (*(sptr + 1) >> 23)) & | |
| 4895 ((*(sptr) << 18) | (*(sptr + 1) >> 14)) & | |
| 4896 ((*(sptr) << 27) | (*(sptr + 1) >> 5)); | |
| 4897 } | |
| 4898 } | |
| 4899 } | |
| 4900 | |
| 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 { | |
| 4909 l_int32 i; | |
| 4910 l_int32 j, pwpls; | |
| 4911 l_uint32 *sptr, *dptr; | |
| 4912 l_int32 wpls9; | |
| 4913 l_int32 wpls18; | |
| 4914 l_int32 wpls27; | |
| 4915 | |
| 4916 wpls9 = 9 * wpls; | |
| 4917 wpls18 = 18 * wpls; | |
| 4918 wpls27 = 27 * wpls; | |
| 4919 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4920 | |
| 4921 for (i = 0; i < h; i++) { | |
| 4922 sptr = datas + i * wpls; | |
| 4923 dptr = datad + i * wpld; | |
| 4924 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4925 *dptr = (*(sptr + wpls27)) | | |
| 4926 (*(sptr + wpls18)) | | |
| 4927 (*(sptr + wpls9)) | | |
| 4928 (*sptr) | | |
| 4929 (*(sptr - wpls9)) | | |
| 4930 (*(sptr - wpls18)) | | |
| 4931 (*(sptr - wpls27)); | |
| 4932 } | |
| 4933 } | |
| 4934 } | |
| 4935 | |
| 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 { | |
| 4944 l_int32 i; | |
| 4945 l_int32 j, pwpls; | |
| 4946 l_uint32 *sptr, *dptr; | |
| 4947 l_int32 wpls9; | |
| 4948 l_int32 wpls18; | |
| 4949 l_int32 wpls27; | |
| 4950 | |
| 4951 wpls9 = 9 * wpls; | |
| 4952 wpls18 = 18 * wpls; | |
| 4953 wpls27 = 27 * wpls; | |
| 4954 pwpls = (l_uint32)(w + 31) / 32; /* proper wpl of src */ | |
| 4955 | |
| 4956 for (i = 0; i < h; i++) { | |
| 4957 sptr = datas + i * wpls; | |
| 4958 dptr = datad + i * wpld; | |
| 4959 for (j = 0; j < pwpls; j++, sptr++, dptr++) { | |
| 4960 *dptr = (*(sptr - wpls27)) & | |
| 4961 (*(sptr - wpls18)) & | |
| 4962 (*(sptr - wpls9)) & | |
| 4963 (*sptr) & | |
| 4964 (*(sptr + wpls9)) & | |
| 4965 (*(sptr + wpls18)) & | |
| 4966 (*(sptr + wpls27)); | |
| 4967 } | |
| 4968 } | |
| 4969 } | |
| 4970 |
