Logo Search packages:      
Sourcecode: leptonlib version File versions  Download package

fmorphgenlow.1.c

/*====================================================================*
 -  Copyright (C) 2001 Leptonica.  All rights reserved.
 -  This software is distributed in the hope that it will be
 -  useful, but with NO WARRANTY OF ANY KIND.
 -  No author or distributor accepts responsibility to anyone for the
 -  consequences of using this software, or for whether it serves any
 -  particular purpose or works at all, unless he or she says so in
 -  writing.  Everyone is granted permission to copy, modify and
 -  redistribute this source code, for commercial or non-commercial
 -  purposes, with the following restrictions: (1) the origin of this
 -  source code must not be misrepresented; (2) modified versions must
 -  be plainly marked as such; and (3) this notice may not be removed
 -  or altered from any source or modified source distribution.
 *====================================================================*/

/*
 *     Low-level fast binary morphology with auto-generated sels
 *
 *      Dispatcher:
 *            l_int32   fmorphopgen_low_*()
 *
 *      Static Low-level:
 *            void      fdilate_*_*()
 *            void      ferode_*_*()
 */

#include <stdio.h>
#include "allheaders.h"

static void  fdilate_1_0(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_0(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_1(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_1(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_2(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_2(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_3(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_3(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_4(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_4(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_5(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_5(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_6(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_6(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_7(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_7(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_8(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_8(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_9(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_9(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_10(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_10(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_11(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_11(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_12(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_12(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_13(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_13(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_14(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_14(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_15(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_15(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_16(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_16(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_17(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_17(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_18(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_18(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_19(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_19(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_20(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_20(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_21(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_21(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_22(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_22(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_23(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_23(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_24(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_24(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_25(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_25(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_26(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_26(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_27(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_27(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_28(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_28(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_29(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_29(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_30(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_30(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_31(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_31(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_32(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_32(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_33(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_33(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_34(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_34(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_35(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_35(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_36(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_36(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_37(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_37(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_38(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_38(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_39(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_39(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_40(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_40(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  fdilate_1_41(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);
static void  ferode_1_41(l_uint32 *, l_int32, l_int32, l_int32, l_uint32 *, l_int32);


/*---------------------------------------------------------------------*
 *                          Fast morph dispatcher                      *
 *---------------------------------------------------------------------*/
/*
 *  fmorphopgen_low_*()
 *
 *       a dispatcher to appropriate low-level code
 */
l_int32
fmorphopgen_low_1(l_uint32  *datad,
                l_int32    w,
                l_int32    h,
                l_int32    wpld,
                l_uint32  *datas,
                l_int32    wpls,
                l_int32    index)
{

    switch (index)
    {
    case 0:
        fdilate_1_0(datad, w, h, wpld, datas, wpls);
        break;
    case 1:
        ferode_1_0(datad, w, h, wpld, datas, wpls);
        break;
    case 2:
        fdilate_1_1(datad, w, h, wpld, datas, wpls);
        break;
    case 3:
        ferode_1_1(datad, w, h, wpld, datas, wpls);
        break;
    case 4:
        fdilate_1_2(datad, w, h, wpld, datas, wpls);
        break;
    case 5:
        ferode_1_2(datad, w, h, wpld, datas, wpls);
        break;
    case 6:
        fdilate_1_3(datad, w, h, wpld, datas, wpls);
        break;
    case 7:
        ferode_1_3(datad, w, h, wpld, datas, wpls);
        break;
    case 8:
        fdilate_1_4(datad, w, h, wpld, datas, wpls);
        break;
    case 9:
        ferode_1_4(datad, w, h, wpld, datas, wpls);
        break;
    case 10:
        fdilate_1_5(datad, w, h, wpld, datas, wpls);
        break;
    case 11:
        ferode_1_5(datad, w, h, wpld, datas, wpls);
        break;
    case 12:
        fdilate_1_6(datad, w, h, wpld, datas, wpls);
        break;
    case 13:
        ferode_1_6(datad, w, h, wpld, datas, wpls);
        break;
    case 14:
        fdilate_1_7(datad, w, h, wpld, datas, wpls);
        break;
    case 15:
        ferode_1_7(datad, w, h, wpld, datas, wpls);
        break;
    case 16:
        fdilate_1_8(datad, w, h, wpld, datas, wpls);
        break;
    case 17:
        ferode_1_8(datad, w, h, wpld, datas, wpls);
        break;
    case 18:
        fdilate_1_9(datad, w, h, wpld, datas, wpls);
        break;
    case 19:
        ferode_1_9(datad, w, h, wpld, datas, wpls);
        break;
    case 20:
        fdilate_1_10(datad, w, h, wpld, datas, wpls);
        break;
    case 21:
        ferode_1_10(datad, w, h, wpld, datas, wpls);
        break;
    case 22:
        fdilate_1_11(datad, w, h, wpld, datas, wpls);
        break;
    case 23:
        ferode_1_11(datad, w, h, wpld, datas, wpls);
        break;
    case 24:
        fdilate_1_12(datad, w, h, wpld, datas, wpls);
        break;
    case 25:
        ferode_1_12(datad, w, h, wpld, datas, wpls);
        break;
    case 26:
        fdilate_1_13(datad, w, h, wpld, datas, wpls);
        break;
    case 27:
        ferode_1_13(datad, w, h, wpld, datas, wpls);
        break;
    case 28:
        fdilate_1_14(datad, w, h, wpld, datas, wpls);
        break;
    case 29:
        ferode_1_14(datad, w, h, wpld, datas, wpls);
        break;
    case 30:
        fdilate_1_15(datad, w, h, wpld, datas, wpls);
        break;
    case 31:
        ferode_1_15(datad, w, h, wpld, datas, wpls);
        break;
    case 32:
        fdilate_1_16(datad, w, h, wpld, datas, wpls);
        break;
    case 33:
        ferode_1_16(datad, w, h, wpld, datas, wpls);
        break;
    case 34:
        fdilate_1_17(datad, w, h, wpld, datas, wpls);
        break;
    case 35:
        ferode_1_17(datad, w, h, wpld, datas, wpls);
        break;
    case 36:
        fdilate_1_18(datad, w, h, wpld, datas, wpls);
        break;
    case 37:
        ferode_1_18(datad, w, h, wpld, datas, wpls);
        break;
    case 38:
        fdilate_1_19(datad, w, h, wpld, datas, wpls);
        break;
    case 39:
        ferode_1_19(datad, w, h, wpld, datas, wpls);
        break;
    case 40:
        fdilate_1_20(datad, w, h, wpld, datas, wpls);
        break;
    case 41:
        ferode_1_20(datad, w, h, wpld, datas, wpls);
        break;
    case 42:
        fdilate_1_21(datad, w, h, wpld, datas, wpls);
        break;
    case 43:
        ferode_1_21(datad, w, h, wpld, datas, wpls);
        break;
    case 44:
        fdilate_1_22(datad, w, h, wpld, datas, wpls);
        break;
    case 45:
        ferode_1_22(datad, w, h, wpld, datas, wpls);
        break;
    case 46:
        fdilate_1_23(datad, w, h, wpld, datas, wpls);
        break;
    case 47:
        ferode_1_23(datad, w, h, wpld, datas, wpls);
        break;
    case 48:
        fdilate_1_24(datad, w, h, wpld, datas, wpls);
        break;
    case 49:
        ferode_1_24(datad, w, h, wpld, datas, wpls);
        break;
    case 50:
        fdilate_1_25(datad, w, h, wpld, datas, wpls);
        break;
    case 51:
        ferode_1_25(datad, w, h, wpld, datas, wpls);
        break;
    case 52:
        fdilate_1_26(datad, w, h, wpld, datas, wpls);
        break;
    case 53:
        ferode_1_26(datad, w, h, wpld, datas, wpls);
        break;
    case 54:
        fdilate_1_27(datad, w, h, wpld, datas, wpls);
        break;
    case 55:
        ferode_1_27(datad, w, h, wpld, datas, wpls);
        break;
    case 56:
        fdilate_1_28(datad, w, h, wpld, datas, wpls);
        break;
    case 57:
        ferode_1_28(datad, w, h, wpld, datas, wpls);
        break;
    case 58:
        fdilate_1_29(datad, w, h, wpld, datas, wpls);
        break;
    case 59:
        ferode_1_29(datad, w, h, wpld, datas, wpls);
        break;
    case 60:
        fdilate_1_30(datad, w, h, wpld, datas, wpls);
        break;
    case 61:
        ferode_1_30(datad, w, h, wpld, datas, wpls);
        break;
    case 62:
        fdilate_1_31(datad, w, h, wpld, datas, wpls);
        break;
    case 63:
        ferode_1_31(datad, w, h, wpld, datas, wpls);
        break;
    case 64:
        fdilate_1_32(datad, w, h, wpld, datas, wpls);
        break;
    case 65:
        ferode_1_32(datad, w, h, wpld, datas, wpls);
        break;
    case 66:
        fdilate_1_33(datad, w, h, wpld, datas, wpls);
        break;
    case 67:
        ferode_1_33(datad, w, h, wpld, datas, wpls);
        break;
    case 68:
        fdilate_1_34(datad, w, h, wpld, datas, wpls);
        break;
    case 69:
        ferode_1_34(datad, w, h, wpld, datas, wpls);
        break;
    case 70:
        fdilate_1_35(datad, w, h, wpld, datas, wpls);
        break;
    case 71:
        ferode_1_35(datad, w, h, wpld, datas, wpls);
        break;
    case 72:
        fdilate_1_36(datad, w, h, wpld, datas, wpls);
        break;
    case 73:
        ferode_1_36(datad, w, h, wpld, datas, wpls);
        break;
    case 74:
        fdilate_1_37(datad, w, h, wpld, datas, wpls);
        break;
    case 75:
        ferode_1_37(datad, w, h, wpld, datas, wpls);
        break;
    case 76:
        fdilate_1_38(datad, w, h, wpld, datas, wpls);
        break;
    case 77:
        ferode_1_38(datad, w, h, wpld, datas, wpls);
        break;
    case 78:
        fdilate_1_39(datad, w, h, wpld, datas, wpls);
        break;
    case 79:
        ferode_1_39(datad, w, h, wpld, datas, wpls);
        break;
    case 80:
        fdilate_1_40(datad, w, h, wpld, datas, wpls);
        break;
    case 81:
        ferode_1_40(datad, w, h, wpld, datas, wpls);
        break;
    case 82:
        fdilate_1_41(datad, w, h, wpld, datas, wpls);
        break;
    case 83:
        ferode_1_41(datad, w, h, wpld, datas, wpls);
        break;
    }

    return 0;
}


/*--------------------------------------------------------------------------*
 *                 Low-level auto-generated static routines                 *
 *--------------------------------------------------------------------------*/
/*
 *  N.B.  in all the low-level routines, the part of the image
 *        that is accessed has been clipped by ADDED_BORDER pixels
 *        on all four sides.  This is done in the higher level
 *        code by redefining w and h smaller and by moving the
 *        start-of-image pointers up to the beginning of this
 *        interior rectangle.
 */

static void
fdilate_1_0(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31));
      }
    }
}


static void
ferode_1_0(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31));
      }
    }
}


static void
fdilate_1_1(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31));
      }
    }
}


static void
ferode_1_1(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31));
      }
    }
}


static void
fdilate_1_2(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30));
      }
    }
}


static void
ferode_1_2(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30));
      }
    }
}


static void
fdilate_1_3(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30));
      }
    }
}


static void
ferode_1_3(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30));
      }
    }
}


static void
fdilate_1_4(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29));
      }
    }
}


static void
ferode_1_4(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29));
      }
    }
}


static void
fdilate_1_5(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29));
      }
    }
}


static void
ferode_1_5(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29));
      }
    }
}


static void
fdilate_1_6(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28));
      }
    }
}


static void
ferode_1_6(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28));
      }
    }
}


static void
fdilate_1_7(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28));
      }
    }
}


static void
ferode_1_7(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28));
      }
    }
}


static void
fdilate_1_8(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27));
      }
    }
}


static void
ferode_1_8(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27));
      }
    }
}


static void
fdilate_1_9(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25));
      }
    }
}


static void
ferode_1_9(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25));
      }
    }
}


static void
fdilate_1_10(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22));
      }
    }
}


static void
ferode_1_10(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22));
      }
    }
}


static void
fdilate_1_11(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) |
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) |
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) |
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) |
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) |
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) |
                    ((*(sptr) >> 14) | (*(sptr - 1) << 18)) |
                    ((*(sptr) >> 15) | (*(sptr - 1) << 17));
      }
    }
}


static void
ferode_1_11(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) &
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) &
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) &
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) &
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) &
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) &
                    ((*(sptr) << 14) | (*(sptr + 1) >> 18)) &
                    ((*(sptr) << 15) | (*(sptr + 1) >> 17));
      }
    }
}


static void
fdilate_1_12(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 19) | (*(sptr + 1) >> 13)) |
                    ((*(sptr) << 18) | (*(sptr + 1) >> 14)) |
                    ((*(sptr) << 17) | (*(sptr + 1) >> 15)) |
                    ((*(sptr) << 16) | (*(sptr + 1) >> 16)) |
                    ((*(sptr) << 15) | (*(sptr + 1) >> 17)) |
                    ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) |
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) |
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) |
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) |
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) |
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) |
                    ((*(sptr) >> 14) | (*(sptr - 1) << 18)) |
                    ((*(sptr) >> 15) | (*(sptr - 1) << 17)) |
                    ((*(sptr) >> 16) | (*(sptr - 1) << 16)) |
                    ((*(sptr) >> 17) | (*(sptr - 1) << 15)) |
                    ((*(sptr) >> 18) | (*(sptr - 1) << 14)) |
                    ((*(sptr) >> 19) | (*(sptr - 1) << 13)) |
                    ((*(sptr) >> 20) | (*(sptr - 1) << 12));
      }
    }
}


static void
ferode_1_12(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 19) | (*(sptr - 1) << 13)) &
                    ((*(sptr) >> 18) | (*(sptr - 1) << 14)) &
                    ((*(sptr) >> 17) | (*(sptr - 1) << 15)) &
                    ((*(sptr) >> 16) | (*(sptr - 1) << 16)) &
                    ((*(sptr) >> 15) | (*(sptr - 1) << 17)) &
                    ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) &
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) &
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) &
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) &
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) &
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) &
                    ((*(sptr) << 14) | (*(sptr + 1) >> 18)) &
                    ((*(sptr) << 15) | (*(sptr + 1) >> 17)) &
                    ((*(sptr) << 16) | (*(sptr + 1) >> 16)) &
                    ((*(sptr) << 17) | (*(sptr + 1) >> 15)) &
                    ((*(sptr) << 18) | (*(sptr + 1) >> 14)) &
                    ((*(sptr) << 19) | (*(sptr + 1) >> 13)) &
                    ((*(sptr) << 20) | (*(sptr + 1) >> 12));
      }
    }
}


static void
fdilate_1_13(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 24) | (*(sptr + 1) >> 8)) |
                    ((*(sptr) << 23) | (*(sptr + 1) >> 9)) |
                    ((*(sptr) << 22) | (*(sptr + 1) >> 10)) |
                    ((*(sptr) << 21) | (*(sptr + 1) >> 11)) |
                    ((*(sptr) << 20) | (*(sptr + 1) >> 12)) |
                    ((*(sptr) << 19) | (*(sptr + 1) >> 13)) |
                    ((*(sptr) << 18) | (*(sptr + 1) >> 14)) |
                    ((*(sptr) << 17) | (*(sptr + 1) >> 15)) |
                    ((*(sptr) << 16) | (*(sptr + 1) >> 16)) |
                    ((*(sptr) << 15) | (*(sptr + 1) >> 17)) |
                    ((*(sptr) << 14) | (*(sptr + 1) >> 18)) |
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) |
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) |
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) |
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) |
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) |
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) |
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) |
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) |
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) |
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) |
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) |
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) |
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) |
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) |
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) |
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) |
                    ((*(sptr) >> 14) | (*(sptr - 1) << 18)) |
                    ((*(sptr) >> 15) | (*(sptr - 1) << 17)) |
                    ((*(sptr) >> 16) | (*(sptr - 1) << 16)) |
                    ((*(sptr) >> 17) | (*(sptr - 1) << 15)) |
                    ((*(sptr) >> 18) | (*(sptr - 1) << 14)) |
                    ((*(sptr) >> 19) | (*(sptr - 1) << 13)) |
                    ((*(sptr) >> 20) | (*(sptr - 1) << 12)) |
                    ((*(sptr) >> 21) | (*(sptr - 1) << 11)) |
                    ((*(sptr) >> 22) | (*(sptr - 1) << 10)) |
                    ((*(sptr) >> 23) | (*(sptr - 1) << 9)) |
                    ((*(sptr) >> 24) | (*(sptr - 1) << 8)) |
                    ((*(sptr) >> 25) | (*(sptr - 1) << 7));
      }
    }
}


static void
ferode_1_13(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 24) | (*(sptr - 1) << 8)) &
                    ((*(sptr) >> 23) | (*(sptr - 1) << 9)) &
                    ((*(sptr) >> 22) | (*(sptr - 1) << 10)) &
                    ((*(sptr) >> 21) | (*(sptr - 1) << 11)) &
                    ((*(sptr) >> 20) | (*(sptr - 1) << 12)) &
                    ((*(sptr) >> 19) | (*(sptr - 1) << 13)) &
                    ((*(sptr) >> 18) | (*(sptr - 1) << 14)) &
                    ((*(sptr) >> 17) | (*(sptr - 1) << 15)) &
                    ((*(sptr) >> 16) | (*(sptr - 1) << 16)) &
                    ((*(sptr) >> 15) | (*(sptr - 1) << 17)) &
                    ((*(sptr) >> 14) | (*(sptr - 1) << 18)) &
                    ((*(sptr) >> 13) | (*(sptr - 1) << 19)) &
                    ((*(sptr) >> 12) | (*(sptr - 1) << 20)) &
                    ((*(sptr) >> 11) | (*(sptr - 1) << 21)) &
                    ((*(sptr) >> 10) | (*(sptr - 1) << 22)) &
                    ((*(sptr) >> 9) | (*(sptr - 1) << 23)) &
                    ((*(sptr) >> 8) | (*(sptr - 1) << 24)) &
                    ((*(sptr) >> 7) | (*(sptr - 1) << 25)) &
                    ((*(sptr) >> 6) | (*(sptr - 1) << 26)) &
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr) << 6) | (*(sptr + 1) >> 26)) &
                    ((*(sptr) << 7) | (*(sptr + 1) >> 25)) &
                    ((*(sptr) << 8) | (*(sptr + 1) >> 24)) &
                    ((*(sptr) << 9) | (*(sptr + 1) >> 23)) &
                    ((*(sptr) << 10) | (*(sptr + 1) >> 22)) &
                    ((*(sptr) << 11) | (*(sptr + 1) >> 21)) &
                    ((*(sptr) << 12) | (*(sptr + 1) >> 20)) &
                    ((*(sptr) << 13) | (*(sptr + 1) >> 19)) &
                    ((*(sptr) << 14) | (*(sptr + 1) >> 18)) &
                    ((*(sptr) << 15) | (*(sptr + 1) >> 17)) &
                    ((*(sptr) << 16) | (*(sptr + 1) >> 16)) &
                    ((*(sptr) << 17) | (*(sptr + 1) >> 15)) &
                    ((*(sptr) << 18) | (*(sptr + 1) >> 14)) &
                    ((*(sptr) << 19) | (*(sptr + 1) >> 13)) &
                    ((*(sptr) << 20) | (*(sptr + 1) >> 12)) &
                    ((*(sptr) << 21) | (*(sptr + 1) >> 11)) &
                    ((*(sptr) << 22) | (*(sptr + 1) >> 10)) &
                    ((*(sptr) << 23) | (*(sptr + 1) >> 9)) &
                    ((*(sptr) << 24) | (*(sptr + 1) >> 8)) &
                    ((*(sptr) << 25) | (*(sptr + 1) >> 7));
      }
    }
}


static void
fdilate_1_14(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) |
                    (*(sptr - wpls));
      }
    }
}


static void
ferode_1_14(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) &
                    (*(sptr + wpls));
      }
    }
}


static void
fdilate_1_15(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls));
      }
    }
}


static void
ferode_1_15(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls));
      }
    }
}


static void
fdilate_1_16(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2));
      }
    }
}


static void
ferode_1_16(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2));
      }
    }
}


static void
fdilate_1_17(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2));
      }
    }
}


static void
ferode_1_17(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2));
      }
    }
}


static void
fdilate_1_18(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3));
      }
    }
}


static void
ferode_1_18(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3));
      }
    }
}


static void
fdilate_1_19(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3));
      }
    }
}


static void
ferode_1_19(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3));
      }
    }
}


static void
fdilate_1_20(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4));
      }
    }
}


static void
ferode_1_20(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4));
      }
    }
}


static void
fdilate_1_21(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4));
      }
    }
}


static void
ferode_1_21(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4));
      }
    }
}


static void
fdilate_1_22(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5));
      }
    }
}


static void
ferode_1_22(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5));
      }
    }
}


static void
fdilate_1_23(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls7)) |
                    (*(sptr + wpls6)) |
                    (*(sptr + wpls5)) |
                    (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5)) |
                    (*(sptr - wpls6)) |
                    (*(sptr - wpls7));
      }
    }
}


static void
ferode_1_23(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls7)) &
                    (*(sptr - wpls6)) &
                    (*(sptr - wpls5)) &
                    (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5)) &
                    (*(sptr + wpls6)) &
                    (*(sptr + wpls7));
      }
    }
}


static void
fdilate_1_24(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls9)) |
                    (*(sptr + wpls8)) |
                    (*(sptr + wpls7)) |
                    (*(sptr + wpls6)) |
                    (*(sptr + wpls5)) |
                    (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5)) |
                    (*(sptr - wpls6)) |
                    (*(sptr - wpls7)) |
                    (*(sptr - wpls8)) |
                    (*(sptr - wpls9)) |
                    (*(sptr - wpls10));
      }
    }
}


static void
ferode_1_24(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls9)) &
                    (*(sptr - wpls8)) &
                    (*(sptr - wpls7)) &
                    (*(sptr - wpls6)) &
                    (*(sptr - wpls5)) &
                    (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5)) &
                    (*(sptr + wpls6)) &
                    (*(sptr + wpls7)) &
                    (*(sptr + wpls8)) &
                    (*(sptr + wpls9)) &
                    (*(sptr + wpls10));
      }
    }
}


static void
fdilate_1_25(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls14)) |
                    (*(sptr + wpls13)) |
                    (*(sptr + wpls12)) |
                    (*(sptr + wpls11)) |
                    (*(sptr + wpls10)) |
                    (*(sptr + wpls9)) |
                    (*(sptr + wpls8)) |
                    (*(sptr + wpls7)) |
                    (*(sptr + wpls6)) |
                    (*(sptr + wpls5)) |
                    (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5)) |
                    (*(sptr - wpls6)) |
                    (*(sptr - wpls7)) |
                    (*(sptr - wpls8)) |
                    (*(sptr - wpls9)) |
                    (*(sptr - wpls10)) |
                    (*(sptr - wpls11)) |
                    (*(sptr - wpls12)) |
                    (*(sptr - wpls13)) |
                    (*(sptr - wpls14)) |
                    (*(sptr - wpls15));
      }
    }
}


static void
ferode_1_25(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls14)) &
                    (*(sptr - wpls13)) &
                    (*(sptr - wpls12)) &
                    (*(sptr - wpls11)) &
                    (*(sptr - wpls10)) &
                    (*(sptr - wpls9)) &
                    (*(sptr - wpls8)) &
                    (*(sptr - wpls7)) &
                    (*(sptr - wpls6)) &
                    (*(sptr - wpls5)) &
                    (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5)) &
                    (*(sptr + wpls6)) &
                    (*(sptr + wpls7)) &
                    (*(sptr + wpls8)) &
                    (*(sptr + wpls9)) &
                    (*(sptr + wpls10)) &
                    (*(sptr + wpls11)) &
                    (*(sptr + wpls12)) &
                    (*(sptr + wpls13)) &
                    (*(sptr + wpls14)) &
                    (*(sptr + wpls15));
      }
    }
}


static void
fdilate_1_26(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15, wpls16;
l_int32              wpls17, wpls18, wpls19, wpls20;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;
    wpls16 = 16 * wpls;
    wpls17 = 17 * wpls;
    wpls18 = 18 * wpls;
    wpls19 = 19 * wpls;
    wpls20 = 20 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls19)) |
                    (*(sptr + wpls18)) |
                    (*(sptr + wpls17)) |
                    (*(sptr + wpls16)) |
                    (*(sptr + wpls15)) |
                    (*(sptr + wpls14)) |
                    (*(sptr + wpls13)) |
                    (*(sptr + wpls12)) |
                    (*(sptr + wpls11)) |
                    (*(sptr + wpls10)) |
                    (*(sptr + wpls9)) |
                    (*(sptr + wpls8)) |
                    (*(sptr + wpls7)) |
                    (*(sptr + wpls6)) |
                    (*(sptr + wpls5)) |
                    (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5)) |
                    (*(sptr - wpls6)) |
                    (*(sptr - wpls7)) |
                    (*(sptr - wpls8)) |
                    (*(sptr - wpls9)) |
                    (*(sptr - wpls10)) |
                    (*(sptr - wpls11)) |
                    (*(sptr - wpls12)) |
                    (*(sptr - wpls13)) |
                    (*(sptr - wpls14)) |
                    (*(sptr - wpls15)) |
                    (*(sptr - wpls16)) |
                    (*(sptr - wpls17)) |
                    (*(sptr - wpls18)) |
                    (*(sptr - wpls19)) |
                    (*(sptr - wpls20));
      }
    }
}


static void
ferode_1_26(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15, wpls16;
l_int32              wpls17, wpls18, wpls19, wpls20;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;
    wpls16 = 16 * wpls;
    wpls17 = 17 * wpls;
    wpls18 = 18 * wpls;
    wpls19 = 19 * wpls;
    wpls20 = 20 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls19)) &
                    (*(sptr - wpls18)) &
                    (*(sptr - wpls17)) &
                    (*(sptr - wpls16)) &
                    (*(sptr - wpls15)) &
                    (*(sptr - wpls14)) &
                    (*(sptr - wpls13)) &
                    (*(sptr - wpls12)) &
                    (*(sptr - wpls11)) &
                    (*(sptr - wpls10)) &
                    (*(sptr - wpls9)) &
                    (*(sptr - wpls8)) &
                    (*(sptr - wpls7)) &
                    (*(sptr - wpls6)) &
                    (*(sptr - wpls5)) &
                    (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5)) &
                    (*(sptr + wpls6)) &
                    (*(sptr + wpls7)) &
                    (*(sptr + wpls8)) &
                    (*(sptr + wpls9)) &
                    (*(sptr + wpls10)) &
                    (*(sptr + wpls11)) &
                    (*(sptr + wpls12)) &
                    (*(sptr + wpls13)) &
                    (*(sptr + wpls14)) &
                    (*(sptr + wpls15)) &
                    (*(sptr + wpls16)) &
                    (*(sptr + wpls17)) &
                    (*(sptr + wpls18)) &
                    (*(sptr + wpls19)) &
                    (*(sptr + wpls20));
      }
    }
}


static void
fdilate_1_27(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15, wpls16;
l_int32              wpls17, wpls18, wpls19, wpls20;
l_int32              wpls21, wpls22, wpls23, wpls24;
l_int32              wpls25;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;
    wpls16 = 16 * wpls;
    wpls17 = 17 * wpls;
    wpls18 = 18 * wpls;
    wpls19 = 19 * wpls;
    wpls20 = 20 * wpls;
    wpls21 = 21 * wpls;
    wpls22 = 22 * wpls;
    wpls23 = 23 * wpls;
    wpls24 = 24 * wpls;
    wpls25 = 25 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr + wpls24)) |
                    (*(sptr + wpls23)) |
                    (*(sptr + wpls22)) |
                    (*(sptr + wpls21)) |
                    (*(sptr + wpls20)) |
                    (*(sptr + wpls19)) |
                    (*(sptr + wpls18)) |
                    (*(sptr + wpls17)) |
                    (*(sptr + wpls16)) |
                    (*(sptr + wpls15)) |
                    (*(sptr + wpls14)) |
                    (*(sptr + wpls13)) |
                    (*(sptr + wpls12)) |
                    (*(sptr + wpls11)) |
                    (*(sptr + wpls10)) |
                    (*(sptr + wpls9)) |
                    (*(sptr + wpls8)) |
                    (*(sptr + wpls7)) |
                    (*(sptr + wpls6)) |
                    (*(sptr + wpls5)) |
                    (*(sptr + wpls4)) |
                    (*(sptr + wpls3)) |
                    (*(sptr + wpls2)) |
                    (*(sptr + wpls)) |
                    (*sptr) |
                    (*(sptr - wpls)) |
                    (*(sptr - wpls2)) |
                    (*(sptr - wpls3)) |
                    (*(sptr - wpls4)) |
                    (*(sptr - wpls5)) |
                    (*(sptr - wpls6)) |
                    (*(sptr - wpls7)) |
                    (*(sptr - wpls8)) |
                    (*(sptr - wpls9)) |
                    (*(sptr - wpls10)) |
                    (*(sptr - wpls11)) |
                    (*(sptr - wpls12)) |
                    (*(sptr - wpls13)) |
                    (*(sptr - wpls14)) |
                    (*(sptr - wpls15)) |
                    (*(sptr - wpls16)) |
                    (*(sptr - wpls17)) |
                    (*(sptr - wpls18)) |
                    (*(sptr - wpls19)) |
                    (*(sptr - wpls20)) |
                    (*(sptr - wpls21)) |
                    (*(sptr - wpls22)) |
                    (*(sptr - wpls23)) |
                    (*(sptr - wpls24)) |
                    (*(sptr - wpls25));
      }
    }
}


static void
ferode_1_27(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5, wpls6, wpls7, wpls8;
l_int32              wpls9, wpls10, wpls11, wpls12;
l_int32              wpls13, wpls14, wpls15, wpls16;
l_int32              wpls17, wpls18, wpls19, wpls20;
l_int32              wpls21, wpls22, wpls23, wpls24;
l_int32              wpls25;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;
    wpls6 = 6 * wpls;
    wpls7 = 7 * wpls;
    wpls8 = 8 * wpls;
    wpls9 = 9 * wpls;
    wpls10 = 10 * wpls;
    wpls11 = 11 * wpls;
    wpls12 = 12 * wpls;
    wpls13 = 13 * wpls;
    wpls14 = 14 * wpls;
    wpls15 = 15 * wpls;
    wpls16 = 16 * wpls;
    wpls17 = 17 * wpls;
    wpls18 = 18 * wpls;
    wpls19 = 19 * wpls;
    wpls20 = 20 * wpls;
    wpls21 = 21 * wpls;
    wpls22 = 22 * wpls;
    wpls23 = 23 * wpls;
    wpls24 = 24 * wpls;
    wpls25 = 25 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*(sptr - wpls24)) &
                    (*(sptr - wpls23)) &
                    (*(sptr - wpls22)) &
                    (*(sptr - wpls21)) &
                    (*(sptr - wpls20)) &
                    (*(sptr - wpls19)) &
                    (*(sptr - wpls18)) &
                    (*(sptr - wpls17)) &
                    (*(sptr - wpls16)) &
                    (*(sptr - wpls15)) &
                    (*(sptr - wpls14)) &
                    (*(sptr - wpls13)) &
                    (*(sptr - wpls12)) &
                    (*(sptr - wpls11)) &
                    (*(sptr - wpls10)) &
                    (*(sptr - wpls9)) &
                    (*(sptr - wpls8)) &
                    (*(sptr - wpls7)) &
                    (*(sptr - wpls6)) &
                    (*(sptr - wpls5)) &
                    (*(sptr - wpls4)) &
                    (*(sptr - wpls3)) &
                    (*(sptr - wpls2)) &
                    (*(sptr - wpls)) &
                    (*sptr) &
                    (*(sptr + wpls)) &
                    (*(sptr + wpls2)) &
                    (*(sptr + wpls3)) &
                    (*(sptr + wpls4)) &
                    (*(sptr + wpls5)) &
                    (*(sptr + wpls6)) &
                    (*(sptr + wpls7)) &
                    (*(sptr + wpls8)) &
                    (*(sptr + wpls9)) &
                    (*(sptr + wpls10)) &
                    (*(sptr + wpls11)) &
                    (*(sptr + wpls12)) &
                    (*(sptr + wpls13)) &
                    (*(sptr + wpls14)) &
                    (*(sptr + wpls15)) &
                    (*(sptr + wpls16)) &
                    (*(sptr + wpls17)) &
                    (*(sptr + wpls18)) &
                    (*(sptr + wpls19)) &
                    (*(sptr + wpls20)) &
                    (*(sptr + wpls21)) &
                    (*(sptr + wpls22)) &
                    (*(sptr + wpls23)) &
                    (*(sptr + wpls24)) &
                    (*(sptr + wpls25));
      }
    }
}


static void
fdilate_1_28(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr);
      }
    }
}


static void
ferode_1_28(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr);
      }
    }
}


static void
fdilate_1_29(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31));
      }
    }
}


static void
ferode_1_29(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31));
      }
    }
}


static void
fdilate_1_30(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31));
      }
    }
}


static void
ferode_1_30(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31));
      }
    }
}


static void
fdilate_1_31(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30));
      }
    }
}


static void
ferode_1_31(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30));
      }
    }
}


static void
fdilate_1_32(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30));
      }
    }
}


static void
ferode_1_32(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30));
      }
    }
}


static void
fdilate_1_33(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) |
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) |
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) |
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) |
                    (*(sptr - wpls3)) |
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) |
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) |
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29));
      }
    }
}


static void
ferode_1_33(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) &
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) &
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) &
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) &
                    (*(sptr + wpls3)) &
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) &
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) &
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29));
      }
    }
}


static void
fdilate_1_34(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) |
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) |
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) |
                    (*(sptr + wpls3)) |
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) |
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) |
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) |
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) |
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) |
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) |
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) |
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) |
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) |
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) |
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) |
                    (*(sptr - wpls3)) |
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) |
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) |
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29));
      }
    }
}


static void
ferode_1_34(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) &
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) &
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) &
                    (*(sptr - wpls3)) &
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) &
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) &
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) &
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) &
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) &
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) &
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) &
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) &
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) &
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) &
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) &
                    (*(sptr + wpls3)) &
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) &
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) &
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29));
      }
    }
}


static void
fdilate_1_35(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) |
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) |
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) |
                    (*(sptr + wpls3)) |
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) |
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) |
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) |
                    ((*(sptr + wpls3) >> 4) | (*(sptr + wpls3 - 1) << 28)) |
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) |
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) |
                    ((*(sptr + wpls2) >> 4) | (*(sptr + wpls2 - 1) << 28)) |
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) |
                    ((*(sptr + wpls) >> 4) | (*(sptr + wpls - 1) << 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) |
                    ((*(sptr - wpls) >> 4) | (*(sptr - wpls - 1) << 28)) |
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) |
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) |
                    ((*(sptr - wpls2) >> 4) | (*(sptr - wpls2 - 1) << 28)) |
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) |
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) |
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) |
                    (*(sptr - wpls3)) |
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) |
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) |
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) |
                    ((*(sptr - wpls3) >> 4) | (*(sptr - wpls3 - 1) << 28)) |
                    ((*(sptr - wpls4) << 3) | (*(sptr - wpls4 + 1) >> 29)) |
                    ((*(sptr - wpls4) << 2) | (*(sptr - wpls4 + 1) >> 30)) |
                    ((*(sptr - wpls4) << 1) | (*(sptr - wpls4 + 1) >> 31)) |
                    (*(sptr - wpls4)) |
                    ((*(sptr - wpls4) >> 1) | (*(sptr - wpls4 - 1) << 31)) |
                    ((*(sptr - wpls4) >> 2) | (*(sptr - wpls4 - 1) << 30)) |
                    ((*(sptr - wpls4) >> 3) | (*(sptr - wpls4 - 1) << 29)) |
                    ((*(sptr - wpls4) >> 4) | (*(sptr - wpls4 - 1) << 28));
      }
    }
}


static void
ferode_1_35(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) &
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) &
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) &
                    (*(sptr - wpls3)) &
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) &
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) &
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) &
                    ((*(sptr - wpls3) << 4) | (*(sptr - wpls3 + 1) >> 28)) &
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) &
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) &
                    ((*(sptr - wpls2) << 4) | (*(sptr - wpls2 + 1) >> 28)) &
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) &
                    ((*(sptr - wpls) << 4) | (*(sptr - wpls + 1) >> 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) &
                    ((*(sptr + wpls) << 4) | (*(sptr + wpls + 1) >> 28)) &
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) &
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) &
                    ((*(sptr + wpls2) << 4) | (*(sptr + wpls2 + 1) >> 28)) &
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) &
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) &
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) &
                    (*(sptr + wpls3)) &
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) &
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) &
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) &
                    ((*(sptr + wpls3) << 4) | (*(sptr + wpls3 + 1) >> 28)) &
                    ((*(sptr + wpls4) >> 3) | (*(sptr + wpls4 - 1) << 29)) &
                    ((*(sptr + wpls4) >> 2) | (*(sptr + wpls4 - 1) << 30)) &
                    ((*(sptr + wpls4) >> 1) | (*(sptr + wpls4 - 1) << 31)) &
                    (*(sptr + wpls4)) &
                    ((*(sptr + wpls4) << 1) | (*(sptr + wpls4 + 1) >> 31)) &
                    ((*(sptr + wpls4) << 2) | (*(sptr + wpls4 + 1) >> 30)) &
                    ((*(sptr + wpls4) << 3) | (*(sptr + wpls4 + 1) >> 29)) &
                    ((*(sptr + wpls4) << 4) | (*(sptr + wpls4 + 1) >> 28));
      }
    }
}


static void
fdilate_1_36(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls4) << 4) | (*(sptr + wpls4 + 1) >> 28)) |
                    ((*(sptr + wpls4) << 3) | (*(sptr + wpls4 + 1) >> 29)) |
                    ((*(sptr + wpls4) << 2) | (*(sptr + wpls4 + 1) >> 30)) |
                    ((*(sptr + wpls4) << 1) | (*(sptr + wpls4 + 1) >> 31)) |
                    (*(sptr + wpls4)) |
                    ((*(sptr + wpls4) >> 1) | (*(sptr + wpls4 - 1) << 31)) |
                    ((*(sptr + wpls4) >> 2) | (*(sptr + wpls4 - 1) << 30)) |
                    ((*(sptr + wpls4) >> 3) | (*(sptr + wpls4 - 1) << 29)) |
                    ((*(sptr + wpls4) >> 4) | (*(sptr + wpls4 - 1) << 28)) |
                    ((*(sptr + wpls3) << 4) | (*(sptr + wpls3 + 1) >> 28)) |
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) |
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) |
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) |
                    (*(sptr + wpls3)) |
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) |
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) |
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) |
                    ((*(sptr + wpls3) >> 4) | (*(sptr + wpls3 - 1) << 28)) |
                    ((*(sptr + wpls2) << 4) | (*(sptr + wpls2 + 1) >> 28)) |
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) |
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) |
                    ((*(sptr + wpls2) >> 4) | (*(sptr + wpls2 - 1) << 28)) |
                    ((*(sptr + wpls) << 4) | (*(sptr + wpls + 1) >> 28)) |
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) |
                    ((*(sptr + wpls) >> 4) | (*(sptr + wpls - 1) << 28)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr - wpls) << 4) | (*(sptr - wpls + 1) >> 28)) |
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) |
                    ((*(sptr - wpls) >> 4) | (*(sptr - wpls - 1) << 28)) |
                    ((*(sptr - wpls2) << 4) | (*(sptr - wpls2 + 1) >> 28)) |
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) |
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) |
                    ((*(sptr - wpls2) >> 4) | (*(sptr - wpls2 - 1) << 28)) |
                    ((*(sptr - wpls3) << 4) | (*(sptr - wpls3 + 1) >> 28)) |
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) |
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) |
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) |
                    (*(sptr - wpls3)) |
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) |
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) |
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) |
                    ((*(sptr - wpls3) >> 4) | (*(sptr - wpls3 - 1) << 28)) |
                    ((*(sptr - wpls4) << 4) | (*(sptr - wpls4 + 1) >> 28)) |
                    ((*(sptr - wpls4) << 3) | (*(sptr - wpls4 + 1) >> 29)) |
                    ((*(sptr - wpls4) << 2) | (*(sptr - wpls4 + 1) >> 30)) |
                    ((*(sptr - wpls4) << 1) | (*(sptr - wpls4 + 1) >> 31)) |
                    (*(sptr - wpls4)) |
                    ((*(sptr - wpls4) >> 1) | (*(sptr - wpls4 - 1) << 31)) |
                    ((*(sptr - wpls4) >> 2) | (*(sptr - wpls4 - 1) << 30)) |
                    ((*(sptr - wpls4) >> 3) | (*(sptr - wpls4 - 1) << 29)) |
                    ((*(sptr - wpls4) >> 4) | (*(sptr - wpls4 - 1) << 28));
      }
    }
}


static void
ferode_1_36(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls4) >> 4) | (*(sptr - wpls4 - 1) << 28)) &
                    ((*(sptr - wpls4) >> 3) | (*(sptr - wpls4 - 1) << 29)) &
                    ((*(sptr - wpls4) >> 2) | (*(sptr - wpls4 - 1) << 30)) &
                    ((*(sptr - wpls4) >> 1) | (*(sptr - wpls4 - 1) << 31)) &
                    (*(sptr - wpls4)) &
                    ((*(sptr - wpls4) << 1) | (*(sptr - wpls4 + 1) >> 31)) &
                    ((*(sptr - wpls4) << 2) | (*(sptr - wpls4 + 1) >> 30)) &
                    ((*(sptr - wpls4) << 3) | (*(sptr - wpls4 + 1) >> 29)) &
                    ((*(sptr - wpls4) << 4) | (*(sptr - wpls4 + 1) >> 28)) &
                    ((*(sptr - wpls3) >> 4) | (*(sptr - wpls3 - 1) << 28)) &
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) &
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) &
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) &
                    (*(sptr - wpls3)) &
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) &
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) &
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) &
                    ((*(sptr - wpls3) << 4) | (*(sptr - wpls3 + 1) >> 28)) &
                    ((*(sptr - wpls2) >> 4) | (*(sptr - wpls2 - 1) << 28)) &
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) &
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) &
                    ((*(sptr - wpls2) << 4) | (*(sptr - wpls2 + 1) >> 28)) &
                    ((*(sptr - wpls) >> 4) | (*(sptr - wpls - 1) << 28)) &
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) &
                    ((*(sptr - wpls) << 4) | (*(sptr - wpls + 1) >> 28)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr + wpls) >> 4) | (*(sptr + wpls - 1) << 28)) &
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) &
                    ((*(sptr + wpls) << 4) | (*(sptr + wpls + 1) >> 28)) &
                    ((*(sptr + wpls2) >> 4) | (*(sptr + wpls2 - 1) << 28)) &
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) &
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) &
                    ((*(sptr + wpls2) << 4) | (*(sptr + wpls2 + 1) >> 28)) &
                    ((*(sptr + wpls3) >> 4) | (*(sptr + wpls3 - 1) << 28)) &
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) &
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) &
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) &
                    (*(sptr + wpls3)) &
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) &
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) &
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) &
                    ((*(sptr + wpls3) << 4) | (*(sptr + wpls3 + 1) >> 28)) &
                    ((*(sptr + wpls4) >> 4) | (*(sptr + wpls4 - 1) << 28)) &
                    ((*(sptr + wpls4) >> 3) | (*(sptr + wpls4 - 1) << 29)) &
                    ((*(sptr + wpls4) >> 2) | (*(sptr + wpls4 - 1) << 30)) &
                    ((*(sptr + wpls4) >> 1) | (*(sptr + wpls4 - 1) << 31)) &
                    (*(sptr + wpls4)) &
                    ((*(sptr + wpls4) << 1) | (*(sptr + wpls4 + 1) >> 31)) &
                    ((*(sptr + wpls4) << 2) | (*(sptr + wpls4 + 1) >> 30)) &
                    ((*(sptr + wpls4) << 3) | (*(sptr + wpls4 + 1) >> 29)) &
                    ((*(sptr + wpls4) << 4) | (*(sptr + wpls4 + 1) >> 28));
      }
    }
}


static void
fdilate_1_37(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls4) << 4) | (*(sptr + wpls4 + 1) >> 28)) |
                    ((*(sptr + wpls4) << 3) | (*(sptr + wpls4 + 1) >> 29)) |
                    ((*(sptr + wpls4) << 2) | (*(sptr + wpls4 + 1) >> 30)) |
                    ((*(sptr + wpls4) << 1) | (*(sptr + wpls4 + 1) >> 31)) |
                    (*(sptr + wpls4)) |
                    ((*(sptr + wpls4) >> 1) | (*(sptr + wpls4 - 1) << 31)) |
                    ((*(sptr + wpls4) >> 2) | (*(sptr + wpls4 - 1) << 30)) |
                    ((*(sptr + wpls4) >> 3) | (*(sptr + wpls4 - 1) << 29)) |
                    ((*(sptr + wpls4) >> 4) | (*(sptr + wpls4 - 1) << 28)) |
                    ((*(sptr + wpls4) >> 5) | (*(sptr + wpls4 - 1) << 27)) |
                    ((*(sptr + wpls3) << 4) | (*(sptr + wpls3 + 1) >> 28)) |
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) |
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) |
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) |
                    (*(sptr + wpls3)) |
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) |
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) |
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) |
                    ((*(sptr + wpls3) >> 4) | (*(sptr + wpls3 - 1) << 28)) |
                    ((*(sptr + wpls3) >> 5) | (*(sptr + wpls3 - 1) << 27)) |
                    ((*(sptr + wpls2) << 4) | (*(sptr + wpls2 + 1) >> 28)) |
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) |
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) |
                    (*(sptr + wpls2)) |
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) |
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) |
                    ((*(sptr + wpls2) >> 4) | (*(sptr + wpls2 - 1) << 28)) |
                    ((*(sptr + wpls2) >> 5) | (*(sptr + wpls2 - 1) << 27)) |
                    ((*(sptr + wpls) << 4) | (*(sptr + wpls + 1) >> 28)) |
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) |
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*(sptr + wpls)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) |
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) |
                    ((*(sptr + wpls) >> 4) | (*(sptr + wpls - 1) << 28)) |
                    ((*(sptr + wpls) >> 5) | (*(sptr + wpls - 1) << 27)) |
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) |
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) |
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) |
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) |
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) |
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) |
                    ((*(sptr) >> 5) | (*(sptr - 1) << 27)) |
                    ((*(sptr - wpls) << 4) | (*(sptr - wpls + 1) >> 28)) |
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) |
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    (*(sptr - wpls)) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) |
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) |
                    ((*(sptr - wpls) >> 4) | (*(sptr - wpls - 1) << 28)) |
                    ((*(sptr - wpls) >> 5) | (*(sptr - wpls - 1) << 27)) |
                    ((*(sptr - wpls2) << 4) | (*(sptr - wpls2 + 1) >> 28)) |
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) |
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) |
                    (*(sptr - wpls2)) |
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) |
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) |
                    ((*(sptr - wpls2) >> 4) | (*(sptr - wpls2 - 1) << 28)) |
                    ((*(sptr - wpls2) >> 5) | (*(sptr - wpls2 - 1) << 27)) |
                    ((*(sptr - wpls3) << 4) | (*(sptr - wpls3 + 1) >> 28)) |
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) |
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) |
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) |
                    (*(sptr - wpls3)) |
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) |
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) |
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) |
                    ((*(sptr - wpls3) >> 4) | (*(sptr - wpls3 - 1) << 28)) |
                    ((*(sptr - wpls3) >> 5) | (*(sptr - wpls3 - 1) << 27)) |
                    ((*(sptr - wpls4) << 4) | (*(sptr - wpls4 + 1) >> 28)) |
                    ((*(sptr - wpls4) << 3) | (*(sptr - wpls4 + 1) >> 29)) |
                    ((*(sptr - wpls4) << 2) | (*(sptr - wpls4 + 1) >> 30)) |
                    ((*(sptr - wpls4) << 1) | (*(sptr - wpls4 + 1) >> 31)) |
                    (*(sptr - wpls4)) |
                    ((*(sptr - wpls4) >> 1) | (*(sptr - wpls4 - 1) << 31)) |
                    ((*(sptr - wpls4) >> 2) | (*(sptr - wpls4 - 1) << 30)) |
                    ((*(sptr - wpls4) >> 3) | (*(sptr - wpls4 - 1) << 29)) |
                    ((*(sptr - wpls4) >> 4) | (*(sptr - wpls4 - 1) << 28)) |
                    ((*(sptr - wpls4) >> 5) | (*(sptr - wpls4 - 1) << 27)) |
                    ((*(sptr - wpls5) << 4) | (*(sptr - wpls5 + 1) >> 28)) |
                    ((*(sptr - wpls5) << 3) | (*(sptr - wpls5 + 1) >> 29)) |
                    ((*(sptr - wpls5) << 2) | (*(sptr - wpls5 + 1) >> 30)) |
                    ((*(sptr - wpls5) << 1) | (*(sptr - wpls5 + 1) >> 31)) |
                    (*(sptr - wpls5)) |
                    ((*(sptr - wpls5) >> 1) | (*(sptr - wpls5 - 1) << 31)) |
                    ((*(sptr - wpls5) >> 2) | (*(sptr - wpls5 - 1) << 30)) |
                    ((*(sptr - wpls5) >> 3) | (*(sptr - wpls5 - 1) << 29)) |
                    ((*(sptr - wpls5) >> 4) | (*(sptr - wpls5 - 1) << 28)) |
                    ((*(sptr - wpls5) >> 5) | (*(sptr - wpls5 - 1) << 27));
      }
    }
}


static void
ferode_1_37(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2, wpls3, wpls4;
l_int32              wpls5;
    
    wpls2 = 2 * wpls;
    wpls3 = 3 * wpls;
    wpls4 = 4 * wpls;
    wpls5 = 5 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls4) >> 4) | (*(sptr - wpls4 - 1) << 28)) &
                    ((*(sptr - wpls4) >> 3) | (*(sptr - wpls4 - 1) << 29)) &
                    ((*(sptr - wpls4) >> 2) | (*(sptr - wpls4 - 1) << 30)) &
                    ((*(sptr - wpls4) >> 1) | (*(sptr - wpls4 - 1) << 31)) &
                    (*(sptr - wpls4)) &
                    ((*(sptr - wpls4) << 1) | (*(sptr - wpls4 + 1) >> 31)) &
                    ((*(sptr - wpls4) << 2) | (*(sptr - wpls4 + 1) >> 30)) &
                    ((*(sptr - wpls4) << 3) | (*(sptr - wpls4 + 1) >> 29)) &
                    ((*(sptr - wpls4) << 4) | (*(sptr - wpls4 + 1) >> 28)) &
                    ((*(sptr - wpls4) << 5) | (*(sptr - wpls4 + 1) >> 27)) &
                    ((*(sptr - wpls3) >> 4) | (*(sptr - wpls3 - 1) << 28)) &
                    ((*(sptr - wpls3) >> 3) | (*(sptr - wpls3 - 1) << 29)) &
                    ((*(sptr - wpls3) >> 2) | (*(sptr - wpls3 - 1) << 30)) &
                    ((*(sptr - wpls3) >> 1) | (*(sptr - wpls3 - 1) << 31)) &
                    (*(sptr - wpls3)) &
                    ((*(sptr - wpls3) << 1) | (*(sptr - wpls3 + 1) >> 31)) &
                    ((*(sptr - wpls3) << 2) | (*(sptr - wpls3 + 1) >> 30)) &
                    ((*(sptr - wpls3) << 3) | (*(sptr - wpls3 + 1) >> 29)) &
                    ((*(sptr - wpls3) << 4) | (*(sptr - wpls3 + 1) >> 28)) &
                    ((*(sptr - wpls3) << 5) | (*(sptr - wpls3 + 1) >> 27)) &
                    ((*(sptr - wpls2) >> 4) | (*(sptr - wpls2 - 1) << 28)) &
                    ((*(sptr - wpls2) >> 3) | (*(sptr - wpls2 - 1) << 29)) &
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls2) >> 1) | (*(sptr - wpls2 - 1) << 31)) &
                    (*(sptr - wpls2)) &
                    ((*(sptr - wpls2) << 1) | (*(sptr - wpls2 + 1) >> 31)) &
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls2) << 3) | (*(sptr - wpls2 + 1) >> 29)) &
                    ((*(sptr - wpls2) << 4) | (*(sptr - wpls2 + 1) >> 28)) &
                    ((*(sptr - wpls2) << 5) | (*(sptr - wpls2 + 1) >> 27)) &
                    ((*(sptr - wpls) >> 4) | (*(sptr - wpls - 1) << 28)) &
                    ((*(sptr - wpls) >> 3) | (*(sptr - wpls - 1) << 29)) &
                    ((*(sptr - wpls) >> 2) | (*(sptr - wpls - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*(sptr - wpls)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    ((*(sptr - wpls) << 2) | (*(sptr - wpls + 1) >> 30)) &
                    ((*(sptr - wpls) << 3) | (*(sptr - wpls + 1) >> 29)) &
                    ((*(sptr - wpls) << 4) | (*(sptr - wpls + 1) >> 28)) &
                    ((*(sptr - wpls) << 5) | (*(sptr - wpls + 1) >> 27)) &
                    ((*(sptr) >> 4) | (*(sptr - 1) << 28)) &
                    ((*(sptr) >> 3) | (*(sptr - 1) << 29)) &
                    ((*(sptr) >> 2) | (*(sptr - 1) << 30)) &
                    ((*(sptr) >> 1) | (*(sptr - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    ((*(sptr) << 2) | (*(sptr + 1) >> 30)) &
                    ((*(sptr) << 3) | (*(sptr + 1) >> 29)) &
                    ((*(sptr) << 4) | (*(sptr + 1) >> 28)) &
                    ((*(sptr) << 5) | (*(sptr + 1) >> 27)) &
                    ((*(sptr + wpls) >> 4) | (*(sptr + wpls - 1) << 28)) &
                    ((*(sptr + wpls) >> 3) | (*(sptr + wpls - 1) << 29)) &
                    ((*(sptr + wpls) >> 2) | (*(sptr + wpls - 1) << 30)) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    (*(sptr + wpls)) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls) << 2) | (*(sptr + wpls + 1) >> 30)) &
                    ((*(sptr + wpls) << 3) | (*(sptr + wpls + 1) >> 29)) &
                    ((*(sptr + wpls) << 4) | (*(sptr + wpls + 1) >> 28)) &
                    ((*(sptr + wpls) << 5) | (*(sptr + wpls + 1) >> 27)) &
                    ((*(sptr + wpls2) >> 4) | (*(sptr + wpls2 - 1) << 28)) &
                    ((*(sptr + wpls2) >> 3) | (*(sptr + wpls2 - 1) << 29)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) &
                    ((*(sptr + wpls2) >> 1) | (*(sptr + wpls2 - 1) << 31)) &
                    (*(sptr + wpls2)) &
                    ((*(sptr + wpls2) << 1) | (*(sptr + wpls2 + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) &
                    ((*(sptr + wpls2) << 3) | (*(sptr + wpls2 + 1) >> 29)) &
                    ((*(sptr + wpls2) << 4) | (*(sptr + wpls2 + 1) >> 28)) &
                    ((*(sptr + wpls2) << 5) | (*(sptr + wpls2 + 1) >> 27)) &
                    ((*(sptr + wpls3) >> 4) | (*(sptr + wpls3 - 1) << 28)) &
                    ((*(sptr + wpls3) >> 3) | (*(sptr + wpls3 - 1) << 29)) &
                    ((*(sptr + wpls3) >> 2) | (*(sptr + wpls3 - 1) << 30)) &
                    ((*(sptr + wpls3) >> 1) | (*(sptr + wpls3 - 1) << 31)) &
                    (*(sptr + wpls3)) &
                    ((*(sptr + wpls3) << 1) | (*(sptr + wpls3 + 1) >> 31)) &
                    ((*(sptr + wpls3) << 2) | (*(sptr + wpls3 + 1) >> 30)) &
                    ((*(sptr + wpls3) << 3) | (*(sptr + wpls3 + 1) >> 29)) &
                    ((*(sptr + wpls3) << 4) | (*(sptr + wpls3 + 1) >> 28)) &
                    ((*(sptr + wpls3) << 5) | (*(sptr + wpls3 + 1) >> 27)) &
                    ((*(sptr + wpls4) >> 4) | (*(sptr + wpls4 - 1) << 28)) &
                    ((*(sptr + wpls4) >> 3) | (*(sptr + wpls4 - 1) << 29)) &
                    ((*(sptr + wpls4) >> 2) | (*(sptr + wpls4 - 1) << 30)) &
                    ((*(sptr + wpls4) >> 1) | (*(sptr + wpls4 - 1) << 31)) &
                    (*(sptr + wpls4)) &
                    ((*(sptr + wpls4) << 1) | (*(sptr + wpls4 + 1) >> 31)) &
                    ((*(sptr + wpls4) << 2) | (*(sptr + wpls4 + 1) >> 30)) &
                    ((*(sptr + wpls4) << 3) | (*(sptr + wpls4 + 1) >> 29)) &
                    ((*(sptr + wpls4) << 4) | (*(sptr + wpls4 + 1) >> 28)) &
                    ((*(sptr + wpls4) << 5) | (*(sptr + wpls4 + 1) >> 27)) &
                    ((*(sptr + wpls5) >> 4) | (*(sptr + wpls5 - 1) << 28)) &
                    ((*(sptr + wpls5) >> 3) | (*(sptr + wpls5 - 1) << 29)) &
                    ((*(sptr + wpls5) >> 2) | (*(sptr + wpls5 - 1) << 30)) &
                    ((*(sptr + wpls5) >> 1) | (*(sptr + wpls5 - 1) << 31)) &
                    (*(sptr + wpls5)) &
                    ((*(sptr + wpls5) << 1) | (*(sptr + wpls5 + 1) >> 31)) &
                    ((*(sptr + wpls5) << 2) | (*(sptr + wpls5 + 1) >> 30)) &
                    ((*(sptr + wpls5) << 3) | (*(sptr + wpls5 + 1) >> 29)) &
                    ((*(sptr + wpls5) << 4) | (*(sptr + wpls5 + 1) >> 28)) &
                    ((*(sptr + wpls5) << 5) | (*(sptr + wpls5 + 1) >> 27));
      }
    }
}


static void
fdilate_1_38(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) >> 1) | (*(sptr - 1) << 31)) |
                    (*(sptr - wpls));
      }
    }
}


static void
ferode_1_38(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr) << 1) | (*(sptr + 1) >> 31)) &
                    (*(sptr + wpls));
      }
    }
}


static void
fdilate_1_39(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31));
      }
    }
}


static void
ferode_1_39(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
    

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = (*sptr) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31));
      }
    }
}


static void
fdilate_1_40(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30)) |
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) |
                    (*sptr) |
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) |
                    ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30));
      }
    }
}


static void
ferode_1_40(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls2) << 2) | (*(sptr - wpls2 + 1) >> 30)) &
                    ((*(sptr - wpls) << 1) | (*(sptr - wpls + 1) >> 31)) &
                    (*sptr) &
                    ((*(sptr + wpls) >> 1) | (*(sptr + wpls - 1) << 31)) &
                    ((*(sptr + wpls2) >> 2) | (*(sptr + wpls2 - 1) << 30));
      }
    }
}


static void
fdilate_1_41(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30)) |
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) |
                    (*sptr) |
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) |
                    ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30));
      }
    }
}


static void
ferode_1_41(l_uint32  *datad,
          l_int32    w,
          l_int32    h,
          l_int32    wpld,
          l_uint32  *datas,
          l_int32    wpls)
{
l_int32              i;
register l_int32     j, pwpls;
register l_uint32   *sptr, *dptr;
l_int32              wpls2;
    
    wpls2 = 2 * wpls;

    pwpls = (l_uint32)(w + 31) / 32;  /* proper wpl of src */

    for (i = 0; i < h; i++) {
      sptr = datas + i * wpls;
      dptr = datad + i * wpld;
      for (j = 0; j < pwpls; j++, sptr++, dptr++) {
            *dptr = ((*(sptr - wpls2) >> 2) | (*(sptr - wpls2 - 1) << 30)) &
                    ((*(sptr - wpls) >> 1) | (*(sptr - wpls - 1) << 31)) &
                    (*sptr) &
                    ((*(sptr + wpls) << 1) | (*(sptr + wpls + 1) >> 31)) &
                    ((*(sptr + wpls2) << 2) | (*(sptr + wpls2 + 1) >> 30));
      }
    }
}



Generated by  Doxygen 1.6.0   Back to index