private void shortLoop(Raster source,
                           Raster dest,
                           Rectangle destRect,
                           int incr1, int incr2, int s_x, int s_y) {
        MultiPixelPackedSampleModel sourceSM = 
            (MultiPixelPackedSampleModel)source.getSampleModel();
        DataBufferUShort sourceDB =
            (DataBufferUShort)source.getDataBuffer();
        int sourceTransX = source.getSampleModelTranslateX();
        int sourceTransY = source.getSampleModelTranslateY();
        int sourceDataBitOffset = sourceSM.getDataBitOffset();
        int sourceScanlineStride = sourceSM.getScanlineStride();

        MultiPixelPackedSampleModel destSM = 
            (MultiPixelPackedSampleModel)dest.getSampleModel();
        DataBufferUShort destDB =
            (DataBufferUShort)dest.getDataBuffer();
        int destMinX = dest.getMinX();
        int destMinY = dest.getMinY();
        int destTransX = dest.getSampleModelTranslateX();
        int destTransY = dest.getSampleModelTranslateY();
        int destDataBitOffset = destSM.getDataBitOffset();
        int destScanlineStride = destSM.getScanlineStride();

        short[] sourceData = sourceDB.getData();
        int sourceDBOffset = sourceDB.getOffset();

        short[] destData = destDB.getData();
        int destDBOffset = destDB.getOffset();

        int dx = destRect.x;
        int dy = destRect.y;
        int dwidth = destRect.width;
        int dheight = destRect.height;

        int sourceOffset = 
            16*(s_y - sourceTransY)*sourceScanlineStride +
            16*sourceDBOffset +
            (s_x - sourceTransX) +
            sourceDataBitOffset;

        int destOffset = 
            16*(dy - destTransY)*destScanlineStride +
            16*destDBOffset +
            (dx - destTransX) +
            destDataBitOffset;

        for (int j = 0; j < dheight; j++) {
            int sOffset = sourceOffset;
            int dOffset = destOffset;
            int selement, val, dindex, delement;

            int i = 0;
            while ((i < dwidth) && ((dOffset & 15) != 0)) {
                selement = sourceData[sOffset >> 4];
                val = (selement >> (15 - (sOffset & 15))) & 0x1;

                dindex = dOffset >> 4;
                int dshift = 15 - (dOffset & 15);
                delement = destData[dindex];
                delement |= val << dshift;
                destData[dindex] = (short)delement;

                sOffset += incr1;
                ++dOffset;
                ++i;
            }
        
            dindex = dOffset >> 4;
            if ((incr1 & 15) == 0) {
                int shift = 15 - (sOffset & 5);
                int offset = sOffset >> 4;
                int incr = incr1 >> 4;

                while (i < dwidth - 15) {
                    delement = 0;
                    for (int b = 15; b >= 0; b--) {
                        selement = sourceData[offset];
                        val = (selement >> shift) & 0x1;
                        delement |= val << b;
                        offset += incr;
                    }
                    
                    destData[dindex] = (short)delement;

                    sOffset += 16*incr1;
                    dOffset += 16;
                    i += 16;
                    ++dindex;
                }
            } else {
                while (i < dwidth - 15) {
                    delement = 0;
                    for (int b = 15; b >= 0; b--) {
                        selement = sourceData[sOffset >> 4];
                        val = (selement >> (15 - (sOffset & 15))) & 0x1;
                        delement |= val << b;
                        sOffset += incr1;
                    }
                    
                    destData[dindex] = (short)delement;

                    dOffset += 15;
                    i += 16;
                    ++dindex;
                }
            }

            while (i < dwidth) {
                selement = sourceData[sOffset >> 4];
                val = (selement >> (15 - (sOffset & 15))) & 0x1;

                dindex = dOffset >> 4;
                int dshift = 15 - (dOffset & 15);
                delement = destData[dindex];
                delement |= val << dshift;
                destData[dindex] = (short)delement;

                sOffset += incr1;
                ++dOffset;
                ++i;
            }

            sourceOffset += incr2;
            destOffset += 16*destScanlineStride;
        }
    }