Ignore:
Timestamp:
11 Jun 2013, 20:35:00 (12 years ago)
Author:
zhang
Message:

Implementation of ARP from QC

Location:
branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder
Files:
9 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.cpp

    r446 r464  
    950950    }
    951951   
     952#if H_3D_ARP
     953    for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
     954    {
     955      if( ( layer!=0 ) && ( pcVPS->getDepthId(layer)!=1 ) )
     956      {
     957        READ_FLAG( uiCode, "advanced_residual_pred_flag"  );
     958        pcVPS->setUseAdvRP  ( layer, uiCode );
     959        pcVPS->setARPStepNum( layer, uiCode ? H_3D_ARP_WFNR : 1 );
     960      }
     961      else
     962      {
     963        pcVPS->setUseAdvRP  ( layer, 0 );
     964        pcVPS->setARPStepNum( layer, 1 );
     965      }
     966    }
     967#endif
     968
    952969    READ_FLAG( uiCode,  "vps_extension2_flag" );
    953970    if (uiCode)
     
    18601877}
    18611878
     1879#if H_3D_ARP
     1880Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1881{
     1882  assert(0);
     1883}
     1884#endif
     1885
    18621886// ====================================================================================================================
    18631887// Protected member functions
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCAVLC.h

    r446 r464  
    9999  Void parseMergeFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    100100  Void parseMergeIndex      ( TComDataCU* pcCU, UInt& ruiMergeIndex );
     101#if H_3D_ARP
     102  Void parseARPW            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     103#endif
    101104  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    102105  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecCu.cpp

    r455 r464  
    281281  if(!pcCU->getSlice()->isIntra())
    282282  {
     283#if H_3D_ARP
     284    if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) )
     285#else
    283286    if(pcCU->getSlice()->getViewIndex() && !pcCU->getSlice()->getIsDepth()) //Notes from QC: this condition shall be changed once the configuration is completed, e.g. in pcSlice->getSPS()->getMultiviewMvPredMode() || ARP in prev. HTM. Remove this comment once it is done.
     287#endif
    284288    {
    285289      m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
     
    343347      }
    344348    }
     349#if H_3D_ARP
     350    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
     351#endif
    345352    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    346353    return;
     
    366373  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    367374  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    368  
     375#if H_3D_ARP
     376  m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth ); 
     377#endif 
    369378  // Coefficient decoding
    370379  Bool bCodeDQP = getdQPFlag();
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.cpp

    r324 r464  
    8787}
    8888
     89#if H_3D_ARP
     90Void TDecEntropy::decodeARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     91{
     92  if( !pcCU->getSlice()->getARPStepNum() || pcCU->isIntra( uiAbsPartIdx ) )
     93  {
     94    return;
     95  }
     96
     97  if( pcCU->getPartitionSize(uiAbsPartIdx) != SIZE_2Nx2N )
     98  {
     99    pcCU->setARPWSubParts( 0 , uiAbsPartIdx, uiDepth );
     100  }
     101  else
     102  {
     103    m_pcEntropyDecoderIf->parseARPW( pcCU , uiAbsPartIdx , uiDepth );
     104  }
     105}
     106#endif
     107
    89108Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    90109{
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecEntropy.h

    r446 r464  
    8585  virtual Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx ) = 0;
    8686  virtual Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex ) = 0;
     87#if H_3D_ARP
     88  virtual Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     89#endif
    8790  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    8891  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    154157  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155158 
     159#if H_3D_ARP
     160  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     161#endif
     162
    156163  Void decodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    157164
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.cpp

    r324 r464  
    5454, m_cCUMergeFlagExtSCModel    ( 1,             1,               NUM_MERGE_FLAG_EXT_CTX        , m_contextModels + m_numContextModels, m_numContextModels)
    5555, m_cCUMergeIdxExtSCModel     ( 1,             1,               NUM_MERGE_IDX_EXT_CTX         , m_contextModels + m_numContextModels, m_numContextModels)
     56#if H_3D_ARP
     57, m_cCUPUARPW                 ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
     58#endif
    5659, m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5760, m_cCUPredModeSCModel        ( 1,             1,               NUM_PRED_MODE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    113116  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    114117  m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
     118#if H_3D_ARP
     119  m_cCUPUARPW.initBuffer                 ( sliceType, qp, (UChar*)INIT_ARPW );
     120#endif
    115121  m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
    116122  m_cCUAMPSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );
     
    158164  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
    159165  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
     166#if H_3D_ARP
     167  m_cCUPUARPW.initBuffer                 ( eSliceType, iQp, (UChar*)INIT_ARPW );
     168#endif
    160169  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    161170  m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
     
    15511560  xCopyContextsFrom(pScr);
    15521561}
     1562
     1563#if H_3D_ARP
     1564Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1565{
     1566  UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;
     1567  UInt uiW = 0;
     1568  UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
     1569  UInt uiCode = 0;
     1570
     1571  assert ( uiMaxW > 0 );
     1572
     1573  m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 0 + uiOffset ) );
     1574
     1575  uiW = uiCode;
     1576  if( 1 == uiW )   
     1577  {
     1578    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPW.get( 0, 0, 3 ) );
     1579    uiW += ( 1 == uiCode ? 1 : 0 );
     1580  }
     1581  pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth ); 
     1582}
     1583#endif
    15531584//! \}
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecSbac.h

    r446 r464  
    108108  Void parseMergeFlag     ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth, UInt uiPUIdx );
    109109  Void parseMergeIndex    ( TComDataCU* pcCU, UInt& ruiMergeIndex );
     110#if H_3D_ARP
     111  Void parseARPW          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     112#endif
    110113  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    111114  Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    145148  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    146149  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     150#if H_3D_ARP
     151  ContextModel3DBuffer m_cCUPUARPW;
     152#endif
    147153  ContextModel3DBuffer m_cCUPartSizeSCModel;
    148154  ContextModel3DBuffer m_cCUPredModeSCModel;
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.cpp

    r446 r464  
    3737
    3838#include "NALread.h"
     39#if H_3D_ARP
     40#include "../../App/TAppDecoder/TAppDecTop.h"
     41#endif
    3942#include "TDecTop.h"
    4043
     
    886889#if H_MV   
    887890    pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );   
     891#if H_3D_ARP
     892    pcSlice->setARPStepNum();
     893    if( pcSlice->getARPStepNum() > 1 )
     894    {
     895      for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ )
     896      {
     897        Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
     898        Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
     899        if( iViewIdx<getViewIndex() && !bIsDepth )
     900        {
     901          pcSlice->setBaseViewRefPicList( m_tAppDecTop->getTDecTop(iLayerId)->getListPic(), iViewIdx );
     902        }
     903      }
     904    }
     905#endif
    888906#else
    889907#if FIX1071
  • branches/HTM-DEV-0.3-dev2a/source/Lib/TLibDecoder/TDecTop.h

    r446 r464  
    225225#endif
    226226
     227#if H_3D_ARP
     228  TAppDecTop*             m_tAppDecTop;
     229#endif
     230
    227231public:
    228232  TDecTop();
     
    265269  Bool                    getIsDepth            ()               { return m_isDepth;    }
    266270  Void                    setCamParsCollector( CamParsCollector* pcCamParsCollector ) { m_pcCamParsCollector = pcCamParsCollector; }
     271
     272#if H_3D_ARP
     273  Void                    setTAppDecTop( TAppDecTop* pcTAppDecTop ) { m_tAppDecTop = pcTAppDecTop; }
     274  TAppDecTop*             getTAppDecTop()                           { return  m_tAppDecTop; }
     275#endif
    267276#endif
    268277#endif
Note: See TracChangeset for help on using the changeset viewer.