Changeset 42 in 3DVCSoftware for trunk/source/Lib/TLibDecoder


Ignore:
Timestamp:
26 Mar 2012, 18:05:40 (13 years ago)
Author:
tech
Message:

Nokia (Flexible Coding Order)
Ericsson ( High Level Syntax )
changes

Location:
trunk/source/Lib/TLibDecoder
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r5 r42  
    8282// ====================================================================================================================
    8383
     84#if BITSTREAM_EXTRACTION
     85Void  TDecCavlc::parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId )
     86{
     87  UInt  uiCode;
     88
     89  xReadCode ( 1, uiCode ); assert( 0 == uiCode); // forbidden_zero_bit
     90  xReadCode ( 1, uiCode );                       // nal_ref_flag
     91  xReadCode ( 6, uiCode );                       // nal_unit_type
     92  eNalUnitType = (NalUnitType) uiCode;
     93
     94  xReadCode(3, uiCode); // temporal_id
     95  TemporalId = uiCode;
     96  xReadCode(5, uiCode); // layer_id_plus1
     97  assert( 1 <= uiCode );
     98  uiLayerId = uiCode - 1;
     99}
     100#else
    84101Void  TDecCavlc::parseNalUnitHeader ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    85102{
     
    105122  }
    106123}
     124#endif
    107125
    108126/**
  • trunk/source/Lib/TLibDecoder/TDecCAVLC.h

    r5 r42  
    182182#endif
    183183 
     184#if BITSTREAM_EXTRACTION
     185  Void  parseNalUnitHeader  ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId );
     186#else
    184187  Void  parseNalUnitHeader  ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag );
     188#endif
     189
    185190 
    186191  Void  parseSPS            ( TComSPS* pcSPS );
  • trunk/source/Lib/TLibDecoder/TDecEntropy.h

    r5 r42  
    6767  virtual Void  setBitstream          ( TComBitstream* p )  = 0;
    6868
     69#if BITSTREAM_EXTRACTION
     70  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId )  = 0;
     71#else
    6972  virtual Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )  = 0;
     73#endif
    7074
    7175  virtual Void  parseSPS                  ( TComSPS* pcSPS )                                      = 0;
     
    147151  Void    resetEntropy                ( TComSlice* p)           { m_pcEntropyDecoderIf->resetEntropy(p);                    }
    148152
     153#if BITSTREAM_EXTRACTION
     154  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId )
     155                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader( eNalUnitType, TemporalId, uiLayerId ); }
     156#else
    149157  Void    decodeNalUnitHeader         ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag )
    150158                                                                { m_pcEntropyDecoderIf->parseNalUnitHeader(eNalUnitType, TemporalId, bOutputFlag ); }
    151 
     159#endif
    152160
    153161  Void    decodeSPS                   ( TComSPS* pcSPS     )    { m_pcEntropyDecoderIf->parseSPS(pcSPS);                    }
  • trunk/source/Lib/TLibDecoder/TDecSbac.h

    r5 r42  
    7575  Void  setMaxAlfCtrlDepth        ( UInt uiMaxAlfCtrlDepth ) { m_uiMaxAlfCtrlDepth = uiMaxAlfCtrlDepth; }
    7676 
     77#if BITSTREAM_EXTRACTION
     78  Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, UInt& uiLayerId ) {}
     79#else
    7780  Void  parseNalUnitHeader    ( NalUnitType& eNalUnitType, UInt& TemporalId, Bool& bOutputFlag ) {}
     81#endif
    7882 
    7983  Void  parseSPS                  ( TComSPS* pcSPS         ) {}
  • trunk/source/Lib/TLibDecoder/TDecTop.cpp

    r21 r42  
    513513
    514514#if DCM_SKIP_DECODING_FRAMES
     515#if FLEX_CODING_ORDER
     516Bool TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame,  Int& iPOCLastDisplay, Bool& bNewPictureType)
     517#else
    515518Bool TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame,  Int& iPOCLastDisplay)
     519
     520#endif
    516521#else
    517522Void TDecTop::decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS )
     
    530535  NalUnitType eNalUnitType;
    531536  UInt        TemporalId;
     537
     538#if BITSTREAM_EXTRACTION
     539  UInt        uiLayerId;
     540
     541  m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, uiLayerId);
     542#else
    532543  Bool        OutputFlag;
    533544
    534545  m_cEntropyDecoder.decodeNalUnitHeader(eNalUnitType, TemporalId, OutputFlag);
     546#endif
     547
    535548  reNalUnitType = eNalUnitType;
    536549
     
    541554      TComSPS cTempSPS;
    542555      m_cEntropyDecoder.decodeSPS( &cTempSPS );
     556#if FLEX_CODING_ORDER
     557      m_cNewSPS = cTempSPS;
     558#endif
    543559
    544560      if( (m_iViewIdx == cTempSPS.getViewId()) && ( m_bIsDepth == cTempSPS.isDepth() ) )
     
    615631      {
    616632        m_uiPrevPOC = m_apcSlicePilot->getPOC();
     633#if FLEX_CODING_ORDER
     634        bNewPictureType = m_cNewSPS.isDepth();
     635#endif
    617636        return true;
    618637      }
     
    697716        std::vector<TComPic*> apcSpatRefPics = getDecTop()->getSpatialRefPics( pcPic->getViewIdx(), pcSlice->getPOC(), m_cSPS.isDepth() );
    698717        TComPic * const pcTexturePic = m_cSPS.isDepth() ? getDecTop()->getPicFromView( pcPic->getViewIdx(), pcSlice->getPOC(), false ) : NULL;
     718
     719#if FLEX_CODING_ORDER
     720        if (pcTexturePic != NULL)
     721        {
     722          assert( ! m_cSPS.isDepth() || pcTexturePic != NULL );
     723          pcSlice->setTexturePic( pcTexturePic );
     724        }
     725#else
    699726        assert( ! m_cSPS.isDepth() || pcTexturePic != NULL );
    700727        pcSlice->setTexturePic( pcTexturePic );
    701728        pcSlice->setViewIdx( pcPic->getViewIdx() );
     729#endif
    702730#if SONY_COLPIC_AVAILABILITY
    703731        pcSlice->setViewOrderIdx( pcPic->getViewOrderIdx() );
  • trunk/source/Lib/TLibDecoder/TDecTop.h

    r21 r42  
    111111  TComList<TComPic*>      m_cListPic;         //  Dynamic buffer
    112112  TComSPS                 m_cSPS;
     113#if FLEX_CODING_ORDER
     114  TComSPS                 m_cNewSPS;
     115#endif
    113116  TComPPS                 m_cPPS;
    114117  TComSlice*              m_apcSlicePilot;
     
    167170  Void  init( TAppDecTop* pcTAppDecTop, Bool bFirstInstance = true );
    168171#if DCM_SKIP_DECODING_FRAMES
     172#if FLEX_CODING_ORDER
     173  Bool  decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay, Bool& bNewPictureType);
     174#else
    169175  Bool  decode (Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS, Int& iSkipFrame, Int& iPOCLastDisplay);
     176
     177#endif
    170178#else
    171179  Void  decode ( Bool bEos, TComBitstream* pcBitstream, UInt& ruiPOC, TComList<TComPic*>*& rpcListPic, NalUnitType& reNalUnitType, TComSPS& cComSPS );
Note: See TracChangeset for help on using the changeset viewer.