org.jcodec.codecs.common.biari
Class MDecoder

java.lang.Object
  extended by org.jcodec.codecs.common.biari.MDecoder

public class MDecoder
extends Object

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License H264 CABAC M-Coder ( decoder module )

Author:
Jay Codec

Constructor Summary
MDecoder(ByteBuffer in, int[][] cm)
           
 
Method Summary
 int decodeBin(int m)
          Decodes one bin from arithmetice code word
 int decodeBinBypass()
          Special decoding process for symbols with uniform distribution
 int decodeFinalBin()
          Special decoding process for 'end of slice' flag.
protected  void initCodeRegister()
          Initializes code register.
protected  void readOneByte()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MDecoder

public MDecoder(ByteBuffer in,
                int[][] cm)
Method Detail

initCodeRegister

protected void initCodeRegister()
Initializes code register. Loads 9 bits from the stream into working area of code register ( bits 8 - 16) leaving 7 bits in the pending area of code register (bits 0 - 7)

Throws:
IOException

readOneByte

protected void readOneByte()

decodeBin

public int decodeBin(int m)
Decodes one bin from arithmetice code word

Parameters:
cm -
Returns:
Throws:
IOException

decodeFinalBin

public int decodeFinalBin()
Special decoding process for 'end of slice' flag. Uses probability state 63.

Parameters:
cm -
Returns:
Throws:
IOException

decodeBinBypass

public int decodeBinBypass()
Special decoding process for symbols with uniform distribution

Returns:
Throws:
IOException


Copyright © 2013. All Rights Reserved.