src/main/java/org/jcodec/codecs/h264/decode/BlockInterpolator.java
void getLuma22Unsafe(byte[] pic, int picW, int imgH, byte[] blk, int blkOff, int blkStride, int x, int y,
            int blkW, int blkH) {
        getLuma20UnsafeNoRound(pic, picW, imgH, tmp1, 0, blkW, x, y - 2, blkW, blkH + 7);
        getLuma02NoRoundInt(tmp1, blkW, tmp2, blkOff, blkStride, 0, 2, blkW, blkH);

        for (int j = 0; j < blkH; j++) {
            for (int i = 0; i < blkW; i++) {
                blk[blkOff + i] = (byte) clip((tmp2[blkOff + i] + 512) >> 10, -128, 127);
            }
            blkOff += blkStride;
        }
    }
void getLuma22Unsafe(byte[] pic, int picW, int imgH, byte[] blk, int blkOff, int blkStride, int x, int y,
            int blkW, int blkH) {
        getLuma20UnsafeNoRound(pic, picW, imgH, tmp1, 0, blkW, x, y - 2, blkW, blkH + 7);
        getLuma02NoRoundInt(tmp1, blkW, tmp2, blkOff, blkStride, 0, 2, blkW, blkH);

        for (int j = 0; j < blkH; j++) {
            for (int i = 0; i < blkW; i++) {
                blk[blkOff + i] = (byte) clip((tmp2[blkOff + i] + 512) >> 10, -128, 127);
            }
            blkOff += blkStride;
        }
    }
void getLuma22Unsafe ( byte [ ] pic , int picW , int imgH , byte [ ] blk , int blkOff , int blkStride , int x , int y , int blkW , int blkH ) { getLuma20UnsafeNoRound ( pic , picW , imgH , tmp1 , 0 , blkW , x , y - 2 , blkW , blkH + 7 ) ; getLuma02NoRoundInt ( tmp1 , blkW , tmp2 , blkOff , blkStride , 0 , 2 , blkW , blkH ) ; for ( int j = 0 ; j < blkH ; j ++ ) { for ( int i = 0 ; i < blkW ; i ++ ) { blk [ blkOff + i ] = ( byte ) clip ( ( tmp2 [ blkOff + i ] + 512 ) >> 10 , - 128 , 127 ) ; } blkOff += blkStride ; } }
Hpel (2, 2) unsafe
Hpel ( 2 2 ) unsafe