src/main/java/org/jcodec/codecs/h264/decode/BlockInterpolator.java
private static void getChroma0X(byte[] pels, int picW, int picH, byte[] blk, int blkOff, int blkStride, int fullX,
            int fullY, int fracY, int blkW, int blkH) {
        int w00 = fullY * picW + fullX;
        int w01 = w00 + (fullY < picH - 1 ? picW : 0);
        int eMy = 8 - fracY;

        for (int j = 0; j < blkH; j++) {
            for (int i = 0; i < blkW; i++) {

                blk[blkOff + i] = (byte) ((eMy * pels[w00 + i] + fracY * pels[w01 + i] + 4) >> 3);
            }
            w00 += picW;
            w01 += picW;
            blkOff += blkStride;
        }
    }
private static void getChroma0X(byte[] pels, int picW, int picH, byte[] blk, int blkOff, int blkStride, int fullX,
            int fullY, int fracY, int blkW, int blkH) {
        int w00 = fullY * picW + fullX;
        int w01 = w00 + (fullY < picH - 1 ? picW : 0);
        int eMy = 8 - fracY;

        for (int j = 0; j < blkH; j++) {
            for (int i = 0; i < blkW; i++) {

                blk[blkOff + i] = (byte) ((eMy * pels[w00 + i] + fracY * pels[w01 + i] + 4) >> 3);
            }
            w00 += picW;
            w01 += picW;
            blkOff += blkStride;
        }
    }
private static void getChroma0X ( byte [ ] pels , int picW , int picH , byte [ ] blk , int blkOff , int blkStride , int fullX , int fullY , int fracY , int blkW , int blkH ) { int w00 = fullY * picW + fullX ; int w01 = w00 + ( fullY < picH - 1 ? picW : 0 ) ; int eMy = 8 - fracY ; for ( int j = 0 ; j < blkH ; j ++ ) { for ( int i = 0 ; i < blkW ; i ++ ) { blk [ blkOff + i ] = ( byte ) ( ( eMy * pels [ w00 + i ] + fracY * pels [ w01 + i ] + 4 ) >> 3 ) ; } w00 += picW ; w01 += picW ; blkOff += blkStride ; } }
Chroma (X,0)
Chroma ( X 0 )