src/main/java/org/jcodec/codecs/h264/decode/BlockInterpolator.java
public void getBlockLuma(Picture pic, Picture out, int off, int x, int y, int w, int h) {
        int xInd = x & 0x3;
        int yInd = y & 0x3;

        int xFp = x >> 2;
        int yFp = y >> 2;
        if (xFp < 2 || yFp < 2 || xFp > pic.getWidth() - w - 5 || yFp > pic.getHeight() - h - 5) {
            unsafe[(yInd << 2) + xInd].getLuma(pic.getData()[0], pic.getWidth(), pic.getHeight(), out.getPlaneData(0),
                    off, out.getPlaneWidth(0), xFp, yFp, w, h);
        } else {
            safe[(yInd << 2) + xInd].getLuma(pic.getData()[0], pic.getWidth(), pic.getHeight(), out.getPlaneData(0),
                    off, out.getPlaneWidth(0), xFp, yFp, w, h);
        }
    }
public void getBlockLuma(Picture pic, Picture out, int off, int x, int y, int w, int h) {
        int xInd = x & 0x3;
        int yInd = y & 0x3;

        int xFp = x >> 2;
        int yFp = y >> 2;
        if (xFp < 2 || yFp < 2 || xFp > pic.getWidth() - w - 5 || yFp > pic.getHeight() - h - 5) {
            unsafe[(yInd << 2) + xInd].getLuma(pic.getData()[0], pic.getWidth(), pic.getHeight(), out.getPlaneData(0),
                    off, out.getPlaneWidth(0), xFp, yFp, w, h);
        } else {
            safe[(yInd << 2) + xInd].getLuma(pic.getData()[0], pic.getWidth(), pic.getHeight(), out.getPlaneData(0),
                    off, out.getPlaneWidth(0), xFp, yFp, w, h);
        }
    }
public void getBlockLuma ( Picture pic , Picture out , int off , int x , int y , int w , int h ) { int xInd = x & 0x3 ; int yInd = y & 0x3 ; int xFp = x >> 2 ; int yFp = y >> 2 ; if ( xFp < 2 || yFp < 2 || xFp > pic . getWidth ( ) - w - 5 || yFp > pic . getHeight ( ) - h - 5 ) { unsafe [ ( yInd << 2 ) + xInd ] . getLuma ( pic . getData ( ) [ 0 ] , pic . getWidth ( ) , pic . getHeight ( ) , out . getPlaneData ( 0 ) , off , out . getPlaneWidth ( 0 ) , xFp , yFp , w , h ) ; } else { safe [ ( yInd << 2 ) + xInd ] . getLuma ( pic . getData ( ) [ 0 ] , pic . getWidth ( ) , pic . getHeight ( ) , out . getPlaneData ( 0 ) , off , out . getPlaneWidth ( 0 ) , xFp , yFp , w , h ) ; } }
Get block of ( possibly interpolated ) luma pixels
Get block of ( possibly interpolated ) luma pixels