private int readIntraP(MDecoder decoder, int ctxOff) { if (decoder.decodeBin(ctxOff) == 0) { return(0); } else { return(decoder.decodeFinalBin() == 1 ? 25 : 1 + readMBType16x16P(decoder, ctxOff)); } }
public int readMBTypeI(MDecoder decoder, MBType left, MBType top, bool leftAvailable, bool topAvailable) { int ctx = 3; ctx += !leftAvailable || left == MBType.I_NxN ? 0 : 1; ctx += !topAvailable || top == MBType.I_NxN ? 0 : 1; if (decoder.decodeBin(ctx) == 0) { return(0); } else { return(decoder.decodeFinalBin() == 1 ? 25 : 1 + readMBType16x16(decoder)); } }