Changeset 1313 in 3DVCSoftware for trunk/source/Lib/TLibDecoder/TDecEntropy.h


Ignore:
Timestamp:
13 Aug 2015, 17:38:13 (9 years ago)
Author:
tech
Message:

Merged 14.1-update-dev1@1312.

File:
1 edited

Legend:

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

    r1196 r1313  
    22 * License, included below. This software may be subject to other third party
    33 * and contributor rights, including patent rights, and no such rights are
    4  * granted under this license. 
    5  *
    6 * Copyright (c) 2010-2015, ITU/ISO/IEC
     4 * granted under this license.
     5 *
     6 * Copyright (c) 2010-2015, ITU/ISO/IEC
    77 * All rights reserved.
    88 *
     
    3838#ifndef __TDECENTROPY__
    3939#define __TDECENTROPY__
    40 
    41 #include "../TLibCommon/CommonDef.h"
    42 #include "../TLibCommon/TComBitStream.h"
    43 #include "../TLibCommon/TComSlice.h"
    44 #include "../TLibCommon/TComPic.h"
    45 #include "../TLibCommon/TComPrediction.h"
    46 #include "../TLibCommon/TComSampleAdaptiveOffset.h"
    47 
     40#include "TLibCommon/CommonDef.h"
     41#include "TLibCommon/TComBitStream.h"
     42#include "TLibCommon/TComSlice.h"
     43#include "TLibCommon/TComPic.h"
     44#include "TLibCommon/TComSampleAdaptiveOffset.h"
     45#include "TLibCommon/TComRectangle.h"
    4846class TDecSbac;
    4947class TDecCavlc;
    5048class ParameterSetManagerDecoder;
     49class TComPrediction;
    5150
    5251//! \ingroup TLibDecoder
     
    6564  virtual Void  setBitstream          ( TComInputBitstream* p )  = 0;
    6665
    67   virtual Void  parseVPS                  ( TComVPS* pcVPS )                       = 0;
    68   virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
    69 #if H_3D
    70   virtual Void  parsePPS                  ( TComPPS* pcPPS, TComVPS* pcVPS )                      = 0;
    71 #else
    72   virtual Void  parsePPS                  ( TComPPS* pcPPS )                                      = 0;
    73 #endif
    74 
    75 #if H_MV
    76   virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx )       = 0;
    77 #else
    78   virtual Void parseSliceHeader          ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)       = 0;
    79 #endif
    80 
    81   virtual Void  parseTerminatingBit       ( UInt& ruilsLast )                                     = 0;
    82  
     66  virtual Void  parseVPS                  ( TComVPS* pcVPS )     = 0;
     67  virtual Void  parseSPS                  ( TComSPS* pcSPS )     = 0;
     68  virtual Void  parsePPS                  ( TComPPS* pcPPS )     = 0;
     69  virtual Void parseSliceHeader          ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)       = 0;
     70
     71  virtual Void parseTerminatingBit       ( UInt& ruilsLast )                                     = 0;
     72  virtual Void parseRemainingBytes( Bool noTrailingBytesExpected ) = 0;
     73
    8374  virtual Void parseMVPIdx        ( Int& riMVPIdx ) = 0;
    84  
     75
    8576public:
    8677  virtual Void parseSkipFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    87 #if H_3D
     78#if NH_3D_DIS
    8879  virtual Void parseDIS           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    8980#endif
     
    9283  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
    9384  virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0;
    94 #if H_3D_ARP
     85#if NH_3D_ARP
    9586  virtual Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9687#endif
    97 #if H_3D_IC
     88#if NH_3D_IC
    9889  virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    9990#endif
    100 #if H_3D_INTER_SDC
    101   virtual Void parseDeltaDC       ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
     91#if NH_3D_DMM || NH_3D_SDC_INTRA || NH_3D_SDC_INTER
     92  virtual Void  parseDeltaDC      ( TComDataCU* pcCU, UInt absPartIdx, UInt depth ) = 0;
     93#endif
     94#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
    10295  virtual Void parseSDCFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    10396#endif
    104 #if H_3D_DBBP
     97#if NH_3D_DBBP
    10598  virtual Void parseDBBPFlag      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    10699#endif
    107100  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    108101  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    109  
     102
    110103  virtual Void parseIntraDirLumaAng( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    111  
    112104  virtual Void parseIntraDirChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    113  
     105
    114106  virtual Void parseInterDir      ( TComDataCU* pcCU, UInt& ruiInterDir, UInt uiAbsPartIdx ) = 0;
    115107  virtual Void parseRefFrmIdx     ( TComDataCU* pcCU, Int& riRefFrmIdx, RefPicList eRefList ) = 0;
    116108  virtual Void parseMvd           ( TComDataCU* pcCU, UInt uiAbsPartAddr, UInt uiPartIdx, UInt uiDepth, RefPicList eRefList ) = 0;
    117  
     109
     110  virtual Void parseCrossComponentPrediction ( class TComTU &rTu, ComponentID compID ) = 0;
     111
    118112  virtual Void parseTransformSubdivFlag( UInt& ruiSubdivFlag, UInt uiLog2TransformBlockSize ) = 0;
    119   virtual Void parseQtCbf         ( TComDataCU* pcCU, UInt uiAbsPartIdx, TextType eType, UInt uiTrDepth, UInt uiDepth ) = 0;
     113  virtual Void parseQtCbf         ( TComTU &rTu, const ComponentID compID, const Bool lowestLevel ) = 0;
    120114  virtual Void parseQtRootCbf     ( UInt uiAbsPartIdx, UInt& uiQtRootCbf ) = 0;
    121  
     115
    122116  virtual Void parseDeltaQP       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    123  
     117  virtual Void parseChromaQpAdjustment( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     118
    124119  virtual Void parseIPCMInfo     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth) = 0;
    125120
    126   virtual Void parseCoeffNxN( TComDataCU* pcCU, TCoeff* pcCoef, UInt uiAbsPartIdx, UInt uiWidth, UInt uiHeight, UInt uiDepth, TextType eTType ) = 0;
    127   virtual Void parseTransformSkipFlags ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt width, UInt height, UInt uiDepth, TextType eTType) = 0;
    128   virtual Void updateContextTables( SliceType eSliceType, Int iQp ) = 0;
    129  
     121  virtual Void parseCoeffNxN( class TComTU &rTu, ComponentID compID  ) = 0;
     122
     123  virtual Void parseTransformSkipFlags ( class TComTU &rTu, ComponentID component ) = 0;
     124
     125  virtual Void parseExplicitRdpcmMode ( TComTU &rTu, ComponentID compID ) = 0;
     126
    130127  virtual ~TDecEntropyIf() {}
    131128};
     
    137134  TDecEntropyIf*  m_pcEntropyDecoderIf;
    138135  TComPrediction* m_pcPrediction;
    139   UInt    m_uiBakAbsPartIdx;
    140   UInt    m_uiBakChromaOffset;
    141   UInt    m_bakAbsPartIdxCU;
    142  
     136  //UInt    m_uiBakAbsPartIdx;
     137  //UInt    m_uiBakChromaOffset;
     138  //UInt    m_bakAbsPartIdxCU;
     139
    143140public:
    144141  Void init (TComPrediction* p) {m_pcPrediction = p;}
     
    148145  Void decodeMvdPU        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    149146  Void decodeMVPIdxPU     ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx, RefPicList eRefList );
    150 #if H_3D
    151   Void decodeMvsAMVP       ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx,
     147#if NH_3D
     148  Void decodeMvsAMVP      ( TComDataCU* pcSubCU, UInt uiPartAddr, UInt uiDepth, UInt uiPartIdx,
    152149RefPicList eRefList );
    153150#endif
     
    155152  Void    setBitstream                ( TComInputBitstream* p ) { m_pcEntropyDecoderIf->setBitstream(p);                    }
    156153  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
     154
    157155  Void    decodeVPS                   ( TComVPS* pcVPS ) { m_pcEntropyDecoderIf->parseVPS(pcVPS); }
    158   Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
    159 #if H_3D
    160   Void    decodePPS                   ( TComPPS* pcPPS, TComVPS* pcVPS )    { m_pcEntropyDecoderIf->parsePPS(pcPPS, pcVPS);                    }
    161 #else
    162   Void    decodePPS                   ( TComPPS* pcPPS )    { m_pcEntropyDecoderIf->parsePPS(pcPPS);                    }
    163 #endif
    164 #if H_MV
    165   Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager, Int targetOlsIdx)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager, targetOlsIdx );         }
    166 #else
    167   Void    decodeSliceHeader           ( TComSlice*& rpcSlice, ParameterSetManagerDecoder *parameterSetManager)  { m_pcEntropyDecoderIf->parseSliceHeader(rpcSlice, parameterSetManager);         }
    168 #endif
     156  Void    decodeSPS                   ( TComSPS* pcSPS ) { m_pcEntropyDecoderIf->parseSPS(pcSPS); }
     157  Void    decodePPS                   ( TComPPS* pcPPS ) { m_pcEntropyDecoderIf->parsePPS(pcPPS); }
     158  Void    decodeSliceHeader           ( TComSlice* pcSlice, ParameterSetManager *parameterSetManager, const Int prevTid0POC)  { m_pcEntropyDecoderIf->parseSliceHeader(pcSlice, parameterSetManager, prevTid0POC);         }
    169159  Void    decodeTerminatingBit        ( UInt& ruiIsLast )       { m_pcEntropyDecoderIf->parseTerminatingBit(ruiIsLast);     }
    170  
     160  Void    decodeRemainingBytes( Bool noTrailingBytesExpected ) { m_pcEntropyDecoderIf->parseRemainingBytes(noTrailingBytesExpected); }
     161
    171162  TDecEntropyIf* getEntropyDecoder() { return m_pcEntropyDecoderIf; }
    172  
     163
    173164public:
    174165  Void decodeSplitFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    175166  Void decodeSkipFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    176 #if H_3D
     167#if NH_3D_DIS
    177168  Void decodeDIS               ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) ;
    178169#endif
     
    182173  Void decodePredMode          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    183174  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    184  
    185 #if H_3D_ARP
     175
     176#if NH_3D_ARP
    186177  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    187178#endif
    188 #if H_3D_IC
     179#if NH_3D_IC
    189180  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    190181#endif
    191 #if H_3D_INTER_SDC
     182
     183#if NH_3D_SDC_INTRA || NH_3D_SDC_INTER
    192184  Void decodeSDCFlag           ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    193185#endif
    194 #if H_3D_DBBP
     186#if NH_3D_DBBP
    195187  Void decodeDBBPFlag          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    196188#endif
     
    198190
    199191  Void decodePredInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, TComDataCU* pcSubCU );
    200  
     192
    201193  Void decodeIntraDirModeLuma  ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    202194  Void decodeIntraDirModeChroma( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    203  
     195
    204196  Void decodeQP                ( TComDataCU* pcCU, UInt uiAbsPartIdx );
    205  
    206   Void updateContextTables    ( SliceType eSliceType, Int iQp ) { m_pcEntropyDecoderIf->updateContextTables( eSliceType, iQp ); }
    207  
    208  
     197  Void decodeChromaQpAdjustment( TComDataCU* pcCU, UInt uiAbsPartIdx );
     198
    209199private:
    210   Void xDecodeTransform        ( TComDataCU* pcCU, UInt offsetLuma, UInt offsetChroma, UInt uiAbsPartIdx, UInt uiDepth, UInt width, UInt height, UInt uiTrIdx, Bool& bCodeDQP, Int getQuadtreeTULog2MinSizeInCU );
    211 
    212 public:
    213   Void decodeCoeff             ( TComDataCU* pcCU                 , UInt uiAbsPartIdx, UInt uiDepth, UInt uiWidth, UInt uiHeight, Bool& bCodeDQP );
    214  
     200
     201  Void xDecodeTransform        ( Bool& bCodeDQP, Bool& isChromaQpAdjCoded, TComTU &rTu, const Int quadtreeTULog2MinSizeInCU );
     202
     203public:
     204
     205  Void decodeCoeff             ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, Bool& bCodeDQP, Bool& isChromaQpAdjCoded );
     206
    215207};// END CLASS DEFINITION TDecEntropy
    216208
Note: See TracChangeset for help on using the changeset viewer.