Ignore:
Timestamp:
28 Jun 2013, 03:51:50 (12 years ago)
Author:
zhang
Message:

Merge Dev2.a to Dev2 and simulation results updated

Location:
branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder
Files:
8 edited

Legend:

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

    r486 r504  
    957957      for( Int layer = 0; layer <= pcVPS->getMaxLayers() - 1; layer++ )
    958958      {
     959#if H_3D_ARP
     960        pcVPS->setUseAdvRP  ( layer, 0 );
     961        pcVPS->setARPStepNum( layer, 1 );
     962#endif 
    959963        if (layer != 0)
    960964        {
     
    963967#if H_3D_IV_MERGE
    964968            READ_FLAG( uiCode, "iv_mv_pred_flag[i]");          pcVPS->setIvMvPredFlag         ( layer, uiCode == 1 ? true : false );
     969#endif
     970#if H_3D_ARP
     971            READ_FLAG( uiCode, "advanced_residual_pred_flag"  );  pcVPS->setUseAdvRP  ( layer, uiCode ); pcVPS->setARPStepNum( layer, uiCode ? H_3D_ARP_WFNR : 1 );
     972
    965973#endif
    966974#if H_3D_NBDV_REF
     
    14341442      rpcSlice->initWpScaling();
    14351443    }
     1444#if H_3D_IC
     1445    else if( rpcSlice->getViewIndex() && ( rpcSlice->getSliceType() == P_SLICE || rpcSlice->getSliceType() == B_SLICE ) )
     1446    {
     1447      UInt uiCodeTmp = 0;
     1448
     1449      READ_FLAG ( uiCodeTmp, "slice_ic_enable_flag" );
     1450      rpcSlice->setApplyIC( uiCodeTmp );
     1451
     1452      if ( uiCodeTmp )
     1453      {
     1454        READ_FLAG ( uiCodeTmp, "ic_skip_mergeidx0" );
     1455        rpcSlice->setIcSkipParseFlag( uiCodeTmp );
     1456      }
     1457    }
     1458#endif
    14361459    if (!rpcSlice->isIntra())
    14371460    {
     
    18881911}
    18891912
     1913#if H_3D_ARP
     1914Void TDecCavlc::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1915{
     1916  assert(0);
     1917}
     1918#endif
     1919
     1920#if H_3D_IC
     1921Void TDecCavlc::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1922{
     1923  assert(0);
     1924}
     1925#endif
     1926
    18901927// ====================================================================================================================
    18911928// Protected member functions
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCAVLC.h

    r446 r504  
    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
     104#if H_3D_IC
     105  Void  parseICFlag         ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     106#endif
    101107  Void parseSplitFlag       ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    102108  Void parsePartSize        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecCu.cpp

    r486 r504  
    281281  if(!pcCU->getSlice()->isIntra())
    282282  {
    283     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.
     283#if H_3D_ARP && H_3D_IV_MERGE
     284    if( pcCU->getSlice()->getVPS()->getUseAdvRP( pcCU->getSlice()->getLayerId() ) || pcCU->getSlice()->getVPS()->getIvMvPredFlag( pcCU->getSlice()->getLayerId() ))
     285#else
     286#if H_3D_ARP
     287    if( pcCU->getSlice()->getVPS()->getUseAdvRP(pcCU->getSlice()->getLayerId()) )
     288#else
     289#if H_3D_IV_MERGE
     290    if( pcCU->getSlice()->getVPS()->getIvMvPredFlag(pcCU->getSlice()->getLayerId()) )
     291#else
     292    if (0)
     293#endif
     294#endif
     295#endif
    284296    {
    285297      m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0, true );
     
    349361      }
    350362    }
     363#if H_3D_IC
     364    m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     365#endif
     366#if H_3D_ARP
     367    m_pcEntropyDecoder->decodeARPW( pcCU , uiAbsPartIdx , uiDepth );
     368#endif
    351369    xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, ruiIsLast );
    352370    return;
     
    372390  // prediction mode ( Intra : direction mode, Inter : Mv, reference idx )
    373391  m_pcEntropyDecoder->decodePredInfo( pcCU, uiAbsPartIdx, uiDepth, m_ppcCU[uiDepth]);
    374  
     392#if H_3D_IC
     393  m_pcEntropyDecoder->decodeICFlag( pcCU, uiAbsPartIdx, uiDepth );
     394#endif
     395#if H_3D_ARP
     396  m_pcEntropyDecoder->decodeARPW    ( pcCU , uiAbsPartIdx , uiDepth ); 
     397#endif 
    375398  // Coefficient decoding
    376399  Bool bCodeDQP = getdQPFlag();
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.cpp

    r476 r504  
    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
     108#if H_3D_IC
     109Void TDecEntropy::decodeICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     110{
     111  pcCU->setICFlagSubParts( false , uiAbsPartIdx, 0, uiDepth );
     112
     113  if ( pcCU->isIntra( uiAbsPartIdx ) || ( pcCU->getSlice()->getViewIndex() == 0 ) )
     114  {
     115    return;
     116  }
     117
     118  if( !pcCU->getSlice()->getApplyIC() )
     119    return;
     120
     121  if( pcCU->isICFlagRequired( uiAbsPartIdx ) )
     122    m_pcEntropyDecoderIf->parseICFlag( pcCU, uiAbsPartIdx, uiDepth );
     123}
     124#endif
     125
    89126Void TDecEntropy::decodeSplitFlag   ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
    90127{
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecEntropy.h

    r446 r504  
    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
     90#if H_3D_IC
     91  virtual Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     92#endif
    8793  virtual Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
    8894  virtual Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth ) = 0;
     
    154160  Void decodePartSize          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    155161 
     162#if H_3D_ARP
     163  Void decodeARPW              ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     164#endif
     165#if H_3D_IC
     166  Void decodeICFlag            ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     167#endif
     168
    156169  Void decodeIPCMInfo          ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    157170
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.cpp

    r324 r504  
    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_cCUPUARPWSCModel          ( 1,             1,               NUM_ARPW_CTX                  , m_contextModels + m_numContextModels, m_numContextModels)
     58#endif
     59#if H_3D_IC
     60, m_cCUICFlagSCModel          ( 1,             1,               NUM_IC_FLAG_CTX               , m_contextModels + m_numContextModels, m_numContextModels)
     61#endif
    5662, m_cCUPartSizeSCModel        ( 1,             1,               NUM_PART_SIZE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
    5763, m_cCUPredModeSCModel        ( 1,             1,               NUM_PRED_MODE_CTX             , m_contextModels + m_numContextModels, m_numContextModels)
     
    113119  m_cCUMergeFlagExtSCModel.initBuffer    ( sliceType, qp, (UChar*)INIT_MERGE_FLAG_EXT );
    114120  m_cCUMergeIdxExtSCModel.initBuffer     ( sliceType, qp, (UChar*)INIT_MERGE_IDX_EXT );
     121#if H_3D_ARP
     122  m_cCUPUARPWSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_ARPW );
     123#endif
     124#if H_3D_IC
     125  m_cCUICFlagSCModel.initBuffer          ( sliceType, qp, (UChar*)INIT_IC_FLAG );
     126#endif
    115127  m_cCUPartSizeSCModel.initBuffer        ( sliceType, qp, (UChar*)INIT_PART_SIZE );
    116128  m_cCUAMPSCModel.initBuffer             ( sliceType, qp, (UChar*)INIT_CU_AMP_POS );
     
    158170  m_cCUMergeFlagExtSCModel.initBuffer    ( eSliceType, iQp, (UChar*)INIT_MERGE_FLAG_EXT );
    159171  m_cCUMergeIdxExtSCModel.initBuffer     ( eSliceType, iQp, (UChar*)INIT_MERGE_IDX_EXT );
     172#if H_3D_ARP
     173  m_cCUPUARPWSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_ARPW );
     174#endif
     175#if H_3D_IC
     176  m_cCUICFlagSCModel.initBuffer          ( eSliceType, iQp, (UChar*)INIT_IC_FLAG );
     177#endif
    160178  m_cCUPartSizeSCModel.initBuffer        ( eSliceType, iQp, (UChar*)INIT_PART_SIZE );
    161179  m_cCUAMPSCModel.initBuffer             ( eSliceType, iQp, (UChar*)INIT_CU_AMP_POS );
     
    15511569  xCopyContextsFrom(pScr);
    15521570}
     1571
     1572#if H_3D_ARP
     1573Void TDecSbac::parseARPW( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1574{
     1575  UInt uiMaxW = pcCU->getSlice()->getARPStepNum() - 1;
     1576  UInt uiW = 0;
     1577  UInt uiOffset = pcCU->getCTXARPWFlag(uiAbsPartIdx);
     1578  UInt uiCode = 0;
     1579
     1580  assert ( uiMaxW > 0 );
     1581
     1582  m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 0 + uiOffset ) );
     1583
     1584  uiW = uiCode;
     1585  if( 1 == uiW )   
     1586  {
     1587    m_pcTDecBinIf->decodeBin( uiCode , m_cCUPUARPWSCModel.get( 0, 0, 3 ) );
     1588    uiW += ( 1 == uiCode ? 1 : 0 );
     1589  }
     1590  pcCU->setARPWSubParts( ( UChar )( uiW ) , uiAbsPartIdx, uiDepth ); 
     1591}
     1592#endif
     1593
     1594#if H_3D_IC
     1595/** parse illumination compensation flag
     1596 * \param pcCU
     1597 * \param uiAbsPartIdx
     1598 * \param uiDepth
     1599 * \returns Void
     1600 */
     1601Void TDecSbac::parseICFlag( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth )
     1602{
     1603  UInt uiSymbol = 0;
     1604  UInt uiCtxIC = pcCU->getCtxICFlag( uiAbsPartIdx );
     1605  m_pcTDecBinIf->decodeBin( uiSymbol, m_cCUICFlagSCModel.get( 0, 0, uiCtxIC ) );
     1606  DTRACE_CABAC_VL( g_nSymbolCounter++ );
     1607  DTRACE_CABAC_T( "\tICFlag" );
     1608  DTRACE_CABAC_T( "\tuiCtxIC: ");
     1609  DTRACE_CABAC_V( uiCtxIC );
     1610  DTRACE_CABAC_T( "\tuiSymbol: ");
     1611  DTRACE_CABAC_V( uiSymbol );
     1612  DTRACE_CABAC_T( "\n");
     1613 
     1614  pcCU->setICFlagSubParts( uiSymbol ? true : false , uiAbsPartIdx, 0, uiDepth );
     1615}
     1616#endif
     1617
    15531618//! \}
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecSbac.h

    r446 r504  
    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
     113#if H_3D_IC
     114  Void parseICFlag        ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     115#endif
    110116  Void parsePartSize      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
    111117  Void parsePredMode      ( TComDataCU* pcCU, UInt uiAbsPartIdx, UInt uiDepth );
     
    145151  ContextModel3DBuffer m_cCUMergeFlagExtSCModel;
    146152  ContextModel3DBuffer m_cCUMergeIdxExtSCModel;
     153#if H_3D_ARP
     154  ContextModel3DBuffer m_cCUPUARPWSCModel;
     155#endif
     156#if H_3D_IC
     157  ContextModel3DBuffer m_cCUICFlagSCModel;
     158#endif
    147159  ContextModel3DBuffer m_cCUPartSizeSCModel;
    148160  ContextModel3DBuffer m_cCUPredModeSCModel;
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibDecoder/TDecTop.cpp

    r499 r504  
    886886#if H_MV   
    887887    pcSlice->setRefPicList( m_cListPic, m_refPicSetInterLayer, true );   
     888#if H_3D_ARP
     889    pcSlice->setARPStepNum();
     890    if( pcSlice->getARPStepNum() > 1 )
     891    {
     892      for(Int iLayerId = 0; iLayerId < nalu.m_layerId; iLayerId ++ )
     893      {
     894        Int  iViewIdx =   pcSlice->getVPS()->getViewIndex(iLayerId);
     895        Bool bIsDepth = ( pcSlice->getVPS()->getDepthId  ( iLayerId ) == 1 );
     896        if( iViewIdx<getViewIndex() && !bIsDepth )
     897        {
     898          pcSlice->setBaseViewRefPicList( m_ivPicLists->getPicList( iLayerId ), iViewIdx );
     899        }
     900      }
     901    }
     902#endif
    888903#else
    889904#if FIX1071
Note: See TracChangeset for help on using the changeset viewer.