private void shortLoop(RasterAccessor src, RasterAccessor dst) {
 
        int dwidth    = dst.getWidth();
        int dheight   = dst.getHeight();
        int dnumBands = dst.getNumBands();
 
        int dstBandOffsets[]  = dst.getBandOffsets();
        int dstPixelStride    = dst.getPixelStride();
        int dstScanlineStride = dst.getScanlineStride();
 
        int srcBandOffsets[]  = src.getBandOffsets();
        int srcPixelStride    = src.getPixelStride();
        int srcScanlineStride = src.getScanlineStride();
 
        short dstDataArrays[][] = dst.getShortDataArrays();
        short srcDataArrays[][] = src.getShortDataArrays();
 
        for (int k = 0; k < dnumBands; k++)  {
            short dstData[] = dstDataArrays[k];
            short srcData[] = srcDataArrays[k];
            int srcScanlineOffset = srcBandOffsets[k];
            int dstScanlineOffset = dstBandOffsets[k];
            for (int j = 0; j < dheight; j++)  {
                int srcPixelOffset = srcScanlineOffset;
                int dstPixelOffset = dstScanlineOffset;
 
                for (int i = 0; i < dwidth; i++)  {
                    int kernelVerticalOffset = 0;
                    int imageVerticalOffset = srcPixelOffset;
		    float f = Float.POSITIVE_INFINITY;
		      for (int u = 0; u < kh; u++)  {
                        int imageOffset = imageVerticalOffset;
                        for (int v = 0; v < kw; v++)  {
			    float tmpIK = srcData[imageOffset] -
			      kdata[kernelVerticalOffset + v];
			    if(tmpIK < f){
			      f = tmpIK;
			    }
			    imageOffset += srcPixelStride;
                        }
                        kernelVerticalOffset += kw;
                        imageVerticalOffset += srcScanlineStride;
		      }
		      if (Float.isInfinite(f)){
			 f = 0.0F;
		      }
                    int val  = (int)f;
                    if (val < Short.MIN_VALUE)  {
                        val = Short.MIN_VALUE;
                    } else if (val > Short.MAX_VALUE)  {
                        val = Short.MAX_VALUE;
                    }
                    dstData[dstPixelOffset] = (short)val;
                    srcPixelOffset += srcPixelStride;
                    dstPixelOffset += dstPixelStride;
                }
                srcScanlineOffset += srcScanlineStride;
                dstScanlineOffset += dstScanlineStride;
            }
        }
    }