void getLuma12Unsafe(byte[] pic, int picW, int imgH, byte[] blk, int blkOff, int blkStride, int x, int y,
            int blkW, int blkH) {
        int tmpW = blkW + 7;

        getLuma02UnsafeNoRound(pic, picW, imgH, tmp1, 0, tmpW, x - 2, y, tmpW, blkH);
        getLuma20NoRoundInt(tmp1, tmpW, tmp2, blkOff, blkStride, 2, 0, blkW, blkH);

        int off = 2;
        for (int j = 0; j < blkH; j++) {
            for (int i = 0; i < blkW; i++) {
                int rounded = clip((tmp2[blkOff + i] + 512) >> 10, -128, 127);
                int rounded2 = clip((tmp1[off + i] + 16) >> 5, -128, 127);
                blk[blkOff + i] = (byte) ((rounded + rounded2 + 1) >> 1);
            }
            blkOff += blkStride;
            off += tmpW;
        }
    }
void getLuma12Unsafe ( byte [ ] pic , int picW , int imgH , byte [ ] blk , int blkOff , int blkStride , int x , int y , int blkW , int blkH ) { int tmpW = blkW + 7 ; getLuma02UnsafeNoRound ( pic , picW , imgH , tmp1 , 0 , tmpW , x - 2 , y , tmpW , blkH ) ; getLuma20NoRoundInt ( tmp1 , tmpW , tmp2 , blkOff , blkStride , 2 , 0 , blkW , blkH ) ; int off = 2 ; for ( int j = 0 ; j < blkH ; j ++ ) { for ( int i = 0 ; i < blkW ; i ++ ) { int rounded = clip ( ( tmp2 [ blkOff + i ] + 512 ) > > 10 , - 128 , 127 ) ; int rounded2 = clip ( ( tmp1 [ off + i ] + 16 ) > > 5 , - 128 , 127 ) ; blk [ blkOff + i ] = ( byte ) ( ( rounded + rounded2 + 1 ) > > 1 ) ; } blkOff += blkStride ; off += tmpW ; } }
Qpel (1, 2) unsafe