org.jcodec.codecs.h264.decode
Class SliceDecoder

java.lang.Object
  extended by org.jcodec.codecs.h264.decode.SliceDecoder

public class SliceDecoder
extends Object

This class is part of JCodec ( www.jcodec.org ) This software is distributed under FreeBSD License A decoder for an individual slice

Author:
Jay Codec

Constructor Summary
SliceDecoder(SeqParameterSet activeSps, PictureParameterSet activePps, int[][] nCoeff, int[][][][] mvs, MBType[] mbTypes, int[][] mbQps, SliceHeader[] shs, boolean[] tr8x8Used, Frame[][][] refsUsed, Frame result, Frame[] sRefs, IntObjectMap<Frame> lRefs)
           
 
Method Summary
 int calcMVPrediction16x8Bottom(int[] a, int[] b, int[] c, int[] d, boolean aAvb, boolean bAvb, boolean cAvb, boolean dAvb, int refIdx, int comp)
           
 int calcMVPrediction16x8Top(int[] a, int[] b, int[] c, int[] d, boolean aAvb, boolean bAvb, boolean cAvb, boolean dAvb, int refIdx, int comp)
           
 int calcMVPrediction8x16Left(int[] a, int[] b, int[] c, int[] d, boolean aAvb, boolean bAvb, boolean cAvb, boolean dAvb, int refIdx, int comp)
           
 int calcMVPrediction8x16Right(int[] a, int[] b, int[] c, int[] d, boolean aAvb, boolean bAvb, boolean cAvb, boolean dAvb, int refIdx, int comp)
           
 int calcMVPredictionMedian(int[] a, int[] b, int[] c, int[] d, boolean aAvb, boolean bAvb, boolean cAvb, boolean dAvb, int ref, int comp)
           
 void decode(ByteBuffer segment, NALUnit nalUnit)
           
 MBType decode(SliceType sliceType, int mbAddr, BitReader reader, boolean field, MBType prevMbType, Picture mb, Frame[][] references)
           
 void decodeChroma(BitReader reader, int pattern, int chromaMode, int mbX, int mbY, boolean leftAvailable, boolean topAvailable, Picture mb, int qp, MBType curMbType)
           
 void decodeChromaInter(BitReader reader, int pattern, Frame[][] refs, int[][][] x, H264Const.PartPred[] predType, boolean leftAvailable, boolean topAvailable, int mbX, int mbY, int mbAddr, int qp, Picture mb, Picture mb1)
           
 void decodeChromaSkip(Frame[][] reference, int[][][] vectors, H264Const.PartPred[] pp, int mbX, int mbY, Picture mb)
           
 void decodeMBInter8x8(BitReader reader, int mb_type, Frame[][] references, Picture mb, SliceType sliceType, int mbIdx, boolean mb_field_decoding_flag, MBType prevMbType, boolean ref0)
           
 void decodeMBlockIntra16x16(BitReader reader, int mbType, int mbIndex, MBType prevMbType, Picture mb)
           
 void decodeMBlockIntraNxN(BitReader reader, int mbIndex, MBType prevMbType, Picture mb)
           
 void decodeMBlockIPCM(BitReader reader, int mbIndex, Picture mb)
           
 void decodeSkip(Frame[][] refs, int mbIdx, Picture mb, SliceType sliceType)
           
 void predictBDirect(Frame[][] refs, int mbX, int mbY, boolean lAvb, boolean tAvb, boolean tlAvb, boolean trAvb, int[][][] x, H264Const.PartPred[] pp, Picture mb, int[] blocks)
           
 void predictChromaInter(Frame[][] refs, int[][][] vectors, int x, int y, int comp, Picture mb, H264Const.PartPred[] predType)
           
 void predictPSkip(Frame[][] refs, int mbX, int mbY, boolean lAvb, boolean tAvb, boolean tlAvb, boolean trAvb, int[][][] x, Picture mb)
           
 void put(Picture tgt, Picture decoded, int mbX, int mbY)
           
protected  int readCodedBlockPatternInter(BitReader reader, boolean leftAvailable, boolean topAvailable, int leftCBP, int topCBP, MBType leftMB, MBType topMB)
           
protected  int readCodedBlockPatternIntra(BitReader reader, boolean leftAvailable, boolean topAvailable, int leftCBP, int topCBP, MBType leftMB, MBType topMB)
           
 void setDebug(boolean debug)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SliceDecoder

public SliceDecoder(SeqParameterSet activeSps,
                    PictureParameterSet activePps,
                    int[][] nCoeff,
                    int[][][][] mvs,
                    MBType[] mbTypes,
                    int[][] mbQps,
                    SliceHeader[] shs,
                    boolean[] tr8x8Used,
                    Frame[][][] refsUsed,
                    Frame result,
                    Frame[] sRefs,
                    IntObjectMap<Frame> lRefs)
Method Detail

decode

public void decode(ByteBuffer segment,
                   NALUnit nalUnit)

decode

public MBType decode(SliceType sliceType,
                     int mbAddr,
                     BitReader reader,
                     boolean field,
                     MBType prevMbType,
                     Picture mb,
                     Frame[][] references)

put

public void put(Picture tgt,
                Picture decoded,
                int mbX,
                int mbY)

decodeMBlockIntra16x16

public void decodeMBlockIntra16x16(BitReader reader,
                                   int mbType,
                                   int mbIndex,
                                   MBType prevMbType,
                                   Picture mb)

decodeChroma

public void decodeChroma(BitReader reader,
                         int pattern,
                         int chromaMode,
                         int mbX,
                         int mbY,
                         boolean leftAvailable,
                         boolean topAvailable,
                         Picture mb,
                         int qp,
                         MBType curMbType)

decodeMBlockIntraNxN

public void decodeMBlockIntraNxN(BitReader reader,
                                 int mbIndex,
                                 MBType prevMbType,
                                 Picture mb)

readCodedBlockPatternIntra

protected int readCodedBlockPatternIntra(BitReader reader,
                                         boolean leftAvailable,
                                         boolean topAvailable,
                                         int leftCBP,
                                         int topCBP,
                                         MBType leftMB,
                                         MBType topMB)

readCodedBlockPatternInter

protected int readCodedBlockPatternInter(BitReader reader,
                                         boolean leftAvailable,
                                         boolean topAvailable,
                                         int leftCBP,
                                         int topCBP,
                                         MBType leftMB,
                                         MBType topMB)

calcMVPredictionMedian

public int calcMVPredictionMedian(int[] a,
                                  int[] b,
                                  int[] c,
                                  int[] d,
                                  boolean aAvb,
                                  boolean bAvb,
                                  boolean cAvb,
                                  boolean dAvb,
                                  int ref,
                                  int comp)

calcMVPrediction16x8Top

public int calcMVPrediction16x8Top(int[] a,
                                   int[] b,
                                   int[] c,
                                   int[] d,
                                   boolean aAvb,
                                   boolean bAvb,
                                   boolean cAvb,
                                   boolean dAvb,
                                   int refIdx,
                                   int comp)

calcMVPrediction16x8Bottom

public int calcMVPrediction16x8Bottom(int[] a,
                                      int[] b,
                                      int[] c,
                                      int[] d,
                                      boolean aAvb,
                                      boolean bAvb,
                                      boolean cAvb,
                                      boolean dAvb,
                                      int refIdx,
                                      int comp)

calcMVPrediction8x16Left

public int calcMVPrediction8x16Left(int[] a,
                                    int[] b,
                                    int[] c,
                                    int[] d,
                                    boolean aAvb,
                                    boolean bAvb,
                                    boolean cAvb,
                                    boolean dAvb,
                                    int refIdx,
                                    int comp)

calcMVPrediction8x16Right

public int calcMVPrediction8x16Right(int[] a,
                                     int[] b,
                                     int[] c,
                                     int[] d,
                                     boolean aAvb,
                                     boolean bAvb,
                                     boolean cAvb,
                                     boolean dAvb,
                                     int refIdx,
                                     int comp)

decodeMBInter8x8

public void decodeMBInter8x8(BitReader reader,
                             int mb_type,
                             Frame[][] references,
                             Picture mb,
                             SliceType sliceType,
                             int mbIdx,
                             boolean mb_field_decoding_flag,
                             MBType prevMbType,
                             boolean ref0)

decodeChromaInter

public void decodeChromaInter(BitReader reader,
                              int pattern,
                              Frame[][] refs,
                              int[][][] x,
                              H264Const.PartPred[] predType,
                              boolean leftAvailable,
                              boolean topAvailable,
                              int mbX,
                              int mbY,
                              int mbAddr,
                              int qp,
                              Picture mb,
                              Picture mb1)

predictChromaInter

public void predictChromaInter(Frame[][] refs,
                               int[][][] vectors,
                               int x,
                               int y,
                               int comp,
                               Picture mb,
                               H264Const.PartPred[] predType)

decodeMBlockIPCM

public void decodeMBlockIPCM(BitReader reader,
                             int mbIndex,
                             Picture mb)

decodeSkip

public void decodeSkip(Frame[][] refs,
                       int mbIdx,
                       Picture mb,
                       SliceType sliceType)

predictBDirect

public void predictBDirect(Frame[][] refs,
                           int mbX,
                           int mbY,
                           boolean lAvb,
                           boolean tAvb,
                           boolean tlAvb,
                           boolean trAvb,
                           int[][][] x,
                           H264Const.PartPred[] pp,
                           Picture mb,
                           int[] blocks)

predictPSkip

public void predictPSkip(Frame[][] refs,
                         int mbX,
                         int mbY,
                         boolean lAvb,
                         boolean tAvb,
                         boolean tlAvb,
                         boolean trAvb,
                         int[][][] x,
                         Picture mb)

decodeChromaSkip

public void decodeChromaSkip(Frame[][] reference,
                             int[][][] vectors,
                             H264Const.PartPred[] pp,
                             int mbX,
                             int mbY,
                             Picture mb)

setDebug

public void setDebug(boolean debug)


Copyright © 2013. All Rights Reserved.