Changeset 608 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecSbac.h


Ignore:
Timestamp:
1 Sep 2013, 22:47:26 (11 years ago)
Author:
tech
Message:

Merged DEV-2.0-dev0@604.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r443 r608  
    44 * granted under this license. 
    55 *
    6  * Copyright (c) 2010-2012, ITU/ISO/IEC
     6 * Copyright (c) 2010-2013, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    5858// ====================================================================================================================
    5959
    60 class SEImessages;
    61 
    6260/// SBAC decoder class
    6361class TDecSbac : public TDecEntropyIf
     
    7472  Void xCopyFrom           ( TDecSbac* pSrc );
    7573  Void xCopyContextsFrom       ( TDecSbac* pSrc );
    76   Void decodeFlush();
    77 
    78 #if CABAC_INIT_FLAG
     74
    7975  Void  resetEntropy (TComSlice* pSlice );
     76  Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
     77  Void  parseVPS                  ( TComVPS* /*pcVPS*/ ) {}
     78#if H_3D
     79  Void  parseSPS                  ( TComSPS* /*pcSPS*/ , Int /*viewIndex*/, Bool /*depthFlag*/ ) {}
    8080#else
    81   Void  resetEntropywithQPandInitIDC ( Int  iQp, Int iID);
    82   Void  resetEntropy                 ( Int  iQp, Int iID      ) { resetEntropywithQPandInitIDC(iQp, iID);                                      }
    83   Void  resetEntropy                 ( TComSlice* pcSlice     ) { resetEntropywithQPandInitIDC(pcSlice->getSliceQp(), pcSlice->getCABACinitIDC());}
    84 #endif
    85   Void  setBitstream              ( TComInputBitstream* p  ) { m_pcBitstream = p; m_pcTDecBinIf->init( p ); }
    86  
    87 #if VIDYO_VPS_INTEGRATION|QC_MVHEVC_B0046
    88   Void  parseVPS                  ( TComVPS* pcVPS )  {}
    89 #endif
    90 #if HHI_MPI || H3D_QTL
    91   Void  parseSPS                  ( TComSPS* pcSPS, Bool bIsDepth ) {}
    92 #else
    93   Void  parseSPS                  ( TComSPS* pcSPS         ) {}
    94 #endif
    95   Void  parsePPS                  ( TComPPS* pcPPS, ParameterSetManagerDecoder *parameterSet         ) {}
    96   Void  parseAPS                  ( TComAPS* pAPS          ) {}
    97   void parseSEI(SEImessages&) {}
    98 
    99 #if MTK_DEPTH_MERGE_TEXTURE_CANDIDATE_C0137
    100   Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet, bool isDepth) {}
    101 #else
    102   Void  parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, AlfCUCtrlInfo &alfCUCtrl, AlfParamSet& alfParamSet) {}
    103 #endif
    104 
     81  Void  parseSPS                  ( TComSPS* /*pcSPS*/ ) {}
     82#endif
     83  Void  parsePPS                  ( TComPPS* /*pcPPS*/ ) {}
     84
     85  Void  parseSliceHeader          ( TComSlice*& /*rpcSlice*/, ParameterSetManagerDecoder* /*parameterSetManager*/) {}
    10586  Void  parseTerminatingBit       ( UInt& ruiBit );
    106 #if H3D_IVMP
    107   Void  parseMVPIdx               ( Int& riMVPIdx, Int iNumAMVPCands );
    108 #else
    10987  Void  parseMVPIdx               ( Int& riMVPIdx          );
    110 #endif
    111  
    112 #if LGE_SAO_MIGRATION_D0091
    11388  Void  parseSaoMaxUvlc           ( UInt& val, UInt maxSymbol );
    114   Void  parseSaoMerge             ( UInt&  ruiVal   );
     89  Void  parseSaoMerge         ( UInt&  ruiVal   );
    11590  Void  parseSaoTypeIdx           ( UInt&  ruiVal  );
    11691  Void  parseSaoUflc              ( UInt uiLength, UInt& ruiVal     );
    11792  Void  parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Int allowMergeLeft, Int allowMergeUp);
    11893  Void  parseSaoOffset            (SaoLcuParam* psSaoLcuParam, UInt compIdx);
    119 #else
    120   Void  parseSaoUvlc              ( UInt& ruiVal           );
    121   Void  parseSaoSvlc              ( Int&  riVal            );
    122   Void  parseSaoMergeLeft         ( UInt&  ruiVal, UInt uiCompIdx   );
    123   Void  parseSaoMergeUp           ( UInt&  ruiVal  );
    124   Void  parseSaoTypeIdx           ( UInt&  ruiVal  );
    125   Void  parseSaoUflc              ( UInt& ruiVal           );
    126   Void  parseSaoOneLcuInterleaving(Int rx, Int ry, SAOParam* pSaoParam, TComDataCU* pcCU, Int iCUAddrInSlice, Int iCUAddrUpInSlice, Bool bLFCrossSliceBoundaryFlag);
    127   Void  parseSaoOffset            (SaoLcuParam* psSaoLcuParam);
    128 #endif
    129  
    130 #if RWTH_SDC_DLT_B0036
    131 #if !PKU_QC_DEPTH_INTRA_UNI_D0195
    132   Void parseSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    133   Void parseSDCPredMode    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    134 #endif
    135   Void parseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
    136 #endif
    13794private:
    13895  Void  xReadUnarySymbol    ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset );
    13996  Void  xReadUnaryMaxSymbol ( UInt& ruiSymbol, ContextModel* pcSCModel, Int iOffset, UInt uiMaxSymbol );
    14097  Void  xReadEpExGolomb     ( UInt& ruiSymbol, UInt uiCount );
    141   Void  xReadGoRiceExGolomb ( UInt &ruiSymbol, UInt &ruiGoRiceParam );
    142 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    143   Void  xReadExGolombLevel  ( UInt& ruiSymbol, ContextModel& rcSCModel  );
    144 #endif
    145 #if HHI_DMM_WEDGE_INTRA
    146   Void xParseWedgeFullInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    147   Void xParseWedgeFullDeltaInfo     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    148 
    149   Void xParseWedgePredDirInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    150   Void xParseWedgePredDirDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    151 #endif
    152 #if HHI_DMM_PRED_TEX
    153 #if LGE_DMM3_SIMP_C0044
    154   Void xParseWedgePredTexInfo       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155 #endif
    156   Void xParseWedgePredTexDeltaInfo  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    157   Void xParseContourPredTexDeltaInfo( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    158 #endif
    159  
    160 #if LGE_EDGE_INTRA_A0070
    161   Void xParseEdgeIntraInfo ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    162 #endif
    163  
     98  Void  xReadCoefRemainExGolomb ( UInt &rSymbol, UInt &rParam );
     99#if H_3D_DIM
     100  Void  xReadExGolombLevel   ( UInt& ruiSymbol, ContextModel& rcSCModel  );
     101  Void  xParseDimDeltaDC     ( Pel& rValDeltaDC, UInt dimType );
     102#if H_3D_DIM_DMM
     103  Void  xParseDmm1WedgeIdx   ( UInt& ruiTabIdx, Int iNumBit );
     104#if !SEC_DMM2_E0146
     105  Void  xParseDmm2Offset     ( Int& riOffset );
     106#endif
     107  Void  xParseDmm3WedgeIdx   ( UInt& ruiIntraIdx, Int iNumBit );
     108#endif
     109#if H_3D_DIM_RBC
     110  Void  xParseRbcEdge        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     111#endif
     112#if H_3D_DIM_SDC
     113  Void  xParseSDCResidualData     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     114#endif
     115#endif
     116#if LGE_INTER_SDC_E0156
     117  Void  parseInterSDCFlag    ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     118  Void  parseInterSDCResidualData ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPart );
     119#endif
    164120private:
    165121  TComInputBitstream* m_pcBitstream;
    166122  TDecBinIf*        m_pcTDecBinIf;
    167  
    168   Int           m_iSliceGranularity; //!< slice granularity
    169 
     123 
    170124public:
    171   Void parseAlfCtrlFlag   ( UInt &ruiAlfCtrlFlag );
    172 
    173   /// set slice granularity
    174   Void setSliceGranularity(Int iSliceGranularity)  {m_iSliceGranularity = iSliceGranularity;}
    175 
    176   /// get slice granularity
    177   Int  getSliceGranularity()                       {return m_iSliceGranularity;             }
    178 
     125 
    179126  Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    180 #if LGE_ILLUCOMP_B0045
    181   Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    182 #endif
     127  Void parseCUTransquantBypassFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    183128  Void parseSplitFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    184129  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    185   Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex, UInt uiAbsPartIdx, UInt uiDepth );
    186 #if H3D_IVRP
    187   Void parseResPredFlag   ( TComDataCU* pcCU, Bool& rbResPredFlag, UInt uiAbsPartIdx, UInt uiDepth );
    188 #endif
    189 #if QC_ARP_D0177
     130  Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex );
     131#if H_3D_ARP
    190132  Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     133#endif
     134#if H_3D_IC
     135  Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    191136#endif
    192137  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    193138  Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    194 #if PKU_QC_DEPTH_INTRA_UNI_D0195
    195   Void parseDepthIntraMode  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    196   Void parseDepthModelingTable( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    197 #endif
     139 
    198140  Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    199141 
    200142  Void parseIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    201143 
    202   Void parseInterDir      ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx, UInt uiDepth );
    203   Void parseRefFrmIdx     ( TComDataCU* pcCU, Int& riRefFrmIdx, UInt uiAbsPartIdx, UInt uiDepth, RefPicList eRefList );
     144#if H_3D_DIM
     145  Void parseIntraDepth     ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
     146  Void parseIntraDepthMode ( TComDataCU* pcCU, UInt absPartIdx, UInt depth );
     147#endif
     148
     149  Void parseInterDir      ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx );
     150  Void parseRefFrmIdx     ( TComDataCU* pcCU, Int& riRefFrmIdx, RefPicList eRefList );
    204151  Void parseMvd           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList );
    205152 
    206153  Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize );
    207154  Void parseQtCbf         ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth );
    208   Void parseQtRootCbf     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt& uiQtRootCbf );
     155  Void parseQtRootCbf     ( UInt uiAbsPartIdx, UInt& uiQtRootCbf );
    209156 
    210157  Void parseDeltaQP       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    214161  Void parseLastSignificantXY( UInt& uiPosLastX, UInt& uiPosLastY, Int width, Int height, TextType eTType, UInt uiScanIdx );
    215162  Void parseCoeffNxN      ( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType );
    216  
    217   Void readTileMarker   ( UInt& uiTileIdx, UInt uiBitsUsed );
     163  Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType);
     164
    218165  Void updateContextTables( SliceType eSliceType, Int iQp );
    219166
    220   Void  parseScalingList ( TComScalingList* scalingList ) {}
     167  Void  parseScalingList ( TComScalingList* /*scalingList*/ ) {}
    221168
    222169private:
     
    228175  ContextModel3DBuffer m_cCUSplitFlagSCModel;
    229176  ContextModel3DBuffer m_cCUSkipFlagSCModel;
    230 #if LGE_ILLUCOMP_B0045
    231   ContextModel3DBuffer m_cCUICFlagSCModel;
    232 #endif
    233177  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    234178  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
    235 #if H3D_IVRP
    236   ContextModel3DBuffer m_cResPredFlagSCModel;
    237 #endif
    238 #if QC_ARP_D0177
    239   ContextModel3DBuffer m_cCUPUARPW;
     179#if H_3D_ARP
     180  ContextModel3DBuffer m_cCUPUARPWSCModel;
     181#endif
     182#if H_3D_IC
     183  ContextModel3DBuffer m_cCUICFlagSCModel;
    240184#endif
    241185  ContextModel3DBuffer m_cCUPartSizeSCModel;
    242186  ContextModel3DBuffer m_cCUPredModeSCModel;
    243   ContextModel3DBuffer m_cCUAlfCtrlFlagSCModel;
    244187  ContextModel3DBuffer m_cCUIntraPredSCModel;
    245188  ContextModel3DBuffer m_cCUChromaPredSCModel;
     
    261204  ContextModel3DBuffer m_cMVPIdxSCModel;
    262205 
    263   ContextModel3DBuffer m_cALFFlagSCModel;
    264   ContextModel3DBuffer m_cALFUvlcSCModel;
    265   ContextModel3DBuffer m_cALFSvlcSCModel;
    266206  ContextModel3DBuffer m_cCUAMPSCModel;
    267 #if LGE_SAO_MIGRATION_D0091
    268207  ContextModel3DBuffer m_cSaoMergeSCModel;
    269208  ContextModel3DBuffer m_cSaoTypeIdxSCModel;
    270 #else
    271   ContextModel3DBuffer m_cSaoFlagSCModel;
    272   ContextModel3DBuffer m_cSaoUvlcSCModel;
    273   ContextModel3DBuffer m_cSaoSvlcSCModel;
    274   ContextModel3DBuffer m_cSaoMergeLeftSCModel;
    275   ContextModel3DBuffer m_cSaoMergeUpSCModel;
    276   ContextModel3DBuffer m_cSaoTypeIdxSCModel;
    277 #endif
    278 
    279 #if HHI_DMM_WEDGE_INTRA || HHI_DMM_PRED_TEX
    280 #if !PKU_QC_DEPTH_INTRA_UNI_D0195
    281   ContextModel3DBuffer m_cDmmFlagSCModel;
    282   ContextModel3DBuffer m_cDmmModeSCModel;
    283 #endif
    284   ContextModel3DBuffer m_cDmmDataSCModel;
    285 #endif
    286 #if LGE_EDGE_INTRA_A0070
    287   ContextModel3DBuffer m_cEdgeIntraSCModel;
    288 #if LGE_EDGE_INTRA_DELTA_DC
    289   ContextModel3DBuffer m_cEdgeIntraDeltaDCSCModel;
    290 #endif
    291 #endif
    292  
    293 #if RWTH_SDC_DLT_B0036
    294 #if !PKU_QC_DEPTH_INTRA_UNI_D0195
    295   ContextModel3DBuffer m_cSDCFlagSCModel;
    296 #else
    297   ContextModel3DBuffer m_cDepthModeModel;
    298   ContextModel3DBuffer m_cDmmDeltaFlagModel;
    299 #endif
    300  
     209  ContextModel3DBuffer m_cTransformSkipSCModel;
     210  ContextModel3DBuffer m_CUTransquantBypassFlagSCModel;
     211
     212#if H_3D_DIM
     213  ContextModel3DBuffer m_cDepthIntraModeSCModel;
     214  ContextModel3DBuffer m_cDdcFlagSCModel;
     215  ContextModel3DBuffer m_cDdcDataSCModel;
     216#if H_3D_DIM_DMM
     217  ContextModel3DBuffer m_cDmm1DataSCModel;
     218#if !SEC_DMM2_E0146
     219  ContextModel3DBuffer m_cDmm2DataSCModel;
     220#endif
     221  ContextModel3DBuffer m_cDmm3DataSCModel;
     222#endif
     223#if H_3D_DIM_RBC
     224  ContextModel3DBuffer m_cRbcDataSCModel;
     225#endif
     226#if H_3D_DIM_SDC 
    301227  ContextModel3DBuffer m_cSDCResidualFlagSCModel;
    302 #if !RWTH_SDC_CTX_SIMPL_D0032
    303   ContextModel3DBuffer m_cSDCResidualSignFlagSCModel;
    304 #endif
    305228  ContextModel3DBuffer m_cSDCResidualSCModel;
    306  
    307   ContextModel3DBuffer m_cSDCPredModeSCModel;
     229#endif
     230#endif
     231#if LGE_INTER_SDC_E0156
     232  ContextModel3DBuffer m_cInterSDCFlagSCModel;
     233  ContextModel3DBuffer m_cInterSDCResidualSCModel;
     234  ContextModel3DBuffer m_cInterSDCResidualSignFlagSCModel;
    308235#endif
    309236};
Note: See TracChangeset for help on using the changeset viewer.