Ignore:
Timestamp:
1 Nov 2012, 19:22:41 (12 years ago)
Author:
mitsubishi-htm
Message:

Initial integration of VSP into HTM 4.0.1. The version used for JCT3V-B0102 at Shanghai meeting.

  • VC9 project/solution files updated. Other Visual C++ project/solution files are not updated.
  • Linux make file updated.

TODO

  • A second release is expected to include some bug fix and improvements on the interface, e.g. to move switches from macro definition to the configuration file.
  • A third release is expected after being integrated within HTM 5.x, which is to be used for CE1.h anchor.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibEncoder/TEncCu.cpp

    r100 r166  
    453453  // get Original YUV data from picture
    454454  m_ppcOrigYuv[uiDepth]->copyFromPicYuv( pcPic->getPicYuvOrg(), rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU() );
     455#if FORCE_REF_VSP
     456  //Bool bWholeCUCanBeSynthesized = false;
     457  //Bool bOneSubCUCanNotBeSynthesied = false;
     458  Bool bSubCUCanBeSynthesized[4];
     459  if( rpcBestCU->getSlice()->getViewId() )
     460  {
     461    Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized;
     462    pcPic->checkSynthesisAvailability(/*rpcBestCU, */rpcBestCU->getAddr(), rpcBestCU->getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized); //KUBA SYNTH
     463    //Int  iSubCUCanNotBeSynthesized = 0;  // Dong: Compiling error, set but not used. DONG_CHECK
     464    Int  iSubCUCanBeSynthesizedCnt = 0;
     465    for(Int i = 0; i < 4; i++)
     466    {
     467      if (!bSubCUCanBeSynthesized[i])
     468      {
     469        //iSubCUCanNotBeSynthesized = i;
     470      }
     471      else
     472      {
     473        iSubCUCanBeSynthesizedCnt ++;
     474      }
     475    }
     476    if(iSubCUCanBeSynthesizedCnt == 4)
     477    {
     478      //bWholeCUCanBeSynthesized = true;
     479    }
     480    //else if(iSubCUCanBeSynthesizedCnt == 3)
     481    //{
     482    //  bOneSubCUCanNotBeSynthesied = true;
     483    //}
     484    //bWholeCUCanBeSynthesized = true;
     485  }
     486#endif
    455487
    456488  // variables for fast encoder decision
     
    654686            doNotBlockPu = rpcBestCU->getQtRootCbf( 0 ) != 0;
    655687          }
     688
     689#if FORCE_REF_VSP==1
     690#if VSP_TEXT_ONLY
     691          if( !rpcBestCU->getSlice()->getSPS()->isDepth() )
     692#endif
     693#if HHI_INTER_VIEW_RESIDUAL_PRED
     694            rpcTempCU->setResPredIndicator( bResPredAvailable, bResPredFlag );
     695#endif
     696#if HHI_INTERVIEW_SKIP
     697            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N, bFullyRenderedSec, false, true ); // VSP
     698#else
     699            xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
     700#endif
     701            rpcTempCU->initEstData( uiDepth, iQP );
     702#endif
    656703        }
    657704#if HHI_INTER_VIEW_RESIDUAL_PRED
     
    15811628    {
    15821629      m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx );
     1630
     1631#if FORCE_REF_VSP==1
     1632      if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 )
     1633#if VSP_TEXT_ONLY
     1634      if( !pcCU->getSlice()->getSPS()->isDepth() )
     1635#endif
     1636      {
     1637        m_pcEntropyCoder->encodeVspFlag( pcCU, uiAbsPartIdx );
     1638      }
     1639#endif
    15831640    }
    15841641
    15851642    if( pcCU->isSkipped( uiAbsPartIdx ) )
     1643#if FORCE_REF_VSP==1
     1644    if( !pcCU->isVspMode( uiAbsPartIdx ) )
     1645#endif
    15861646    {
    15871647      m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
    15881648      finishCU(pcCU,uiAbsPartIdx,uiDepth);
     1649#if DEBUGLOGOUT
     1650      m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
     1651#endif
    15891652      xRestoreDepthWidthHeight( pcCU );
    15901653      return;
     
    16351698  {
    16361699    m_pcEntropyCoder->encodeSkipFlag( pcCU, uiAbsPartIdx );
     1700
     1701#if FORCE_REF_VSP==1
     1702    if( (pcCU->isSkipped( uiAbsPartIdx ) || pcCU->isVspMode( uiAbsPartIdx )) && pcCU->getSlice()->getViewId() != 0 )
     1703#if VSP_TEXT_ONLY
     1704    if( !pcCU->getSlice()->getSPS()->isDepth() )
     1705#endif
     1706    {
     1707      m_pcEntropyCoder->encodeVspFlag( pcCU, uiAbsPartIdx );
     1708    }
     1709#endif
    16371710  }
    16381711 
    16391712  if( pcCU->isSkipped( uiAbsPartIdx ) )
     1713#if FORCE_REF_VSP==1
     1714  if( !pcCU->isVspMode( uiAbsPartIdx ) )
     1715#endif
    16401716  {
    16411717    m_pcEntropyCoder->encodeMergeIndex( pcCU, uiAbsPartIdx, 0 );
     
    16441720#endif
    16451721    finishCU(pcCU,uiAbsPartIdx,uiDepth);
     1722#if DEBUGLOGOUT
     1723    m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
     1724#endif
    16461725    return;
    16471726  }
     1727
     1728#if FORCE_REF_VSP==1
     1729  if( pcCU->isVspMode( uiAbsPartIdx ) )
     1730  {
     1731    finishCU(pcCU,uiAbsPartIdx,uiDepth);
     1732#if DEBUGLOGOUT
     1733    m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
     1734#endif
     1735    return;
     1736  }
     1737#endif
     1738
    16481739#if HHI_MPI
    16491740  if( pcCU->getTextureModeDepth( uiAbsPartIdx ) == -1 )
     
    16621753      // Encode slice finish
    16631754      finishCU(pcCU,uiAbsPartIdx,uiDepth);
     1755#if DEBUGLOGOUT
     1756      m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
     1757#endif
    16641758      return;
    16651759    }
     
    16851779  // --- write terminating bit ---
    16861780  finishCU(pcCU,uiAbsPartIdx,uiDepth);
     1781#if DEBUGLOGOUT
     1782  m_cDebug.DebugLogOut( pcCU, uiAbsPartIdx, uiDepth );
     1783#endif
    16871784}
    16881785
     
    18731970#if AMP_MRG
    18741971#if HHI_INTERVIEW_SKIP
    1875 Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bSkipRes, Bool bUseMRG)
     1972Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bSkipRes, Bool bUseMRG
     1973#if FORCE_REF_VSP==1
     1974                               , Bool bForceRefVsp
     1975#endif
     1976                               )
    18761977#else
    18771978Void TEncCu::xCheckRDCostInter( TComDataCU*& rpcBestCU, TComDataCU*& rpcTempCU, PartSize ePartSize, Bool bUseMRG)
     
    19102011  rpcTempCU->setResPredFlagSubParts ( bResPrdFlag,  0, 0, uhDepth );
    19112012#endif
     2013#if FORCE_REF_VSP==1
     2014  if( bForceRefVsp )
     2015    rpcTempCU->setPredModeSubParts  ( MODE_SYNTH, 0, uhDepth );
     2016  else
     2017#endif
    19122018  rpcTempCU->setPredModeSubParts  ( MODE_INTER, 0, uhDepth );
    19132019 
     
    19252031  #if HHI_INTERVIEW_SKIP
    19262032#if LG_RESTRICTEDRESPRED_M24766
    1927   m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
     2033  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcResPredTmp[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG
     2034#if FORCE_REF_VSP==1
     2035    , bForceRefVsp
     2036#endif
     2037    );
    19282038#else
    19292039  m_pcPredSearch->predInterSearch ( rpcTempCU, m_ppcOrigYuv[uhDepth], m_ppcPredYuvTemp[uhDepth], m_ppcResiYuvTemp[uhDepth], m_ppcRecoYuvTemp[uhDepth], bSkipRes, bUseMRG  );
     
    24942604    for( UInt ui = 0; ui < rpcTempCU->getTotalNumPart(); ui++ )
    24952605    {
    2496       if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui ) )
     2606      if( pcTextureCU->isIntra( rpcTempCU->getZorderIdxInCU() + ui )
     2607#if FORCE_REF_VSP==1
     2608       || pcTextureCU->isVspMode( rpcTempCU->getZorderIdxInCU() + ui )
     2609#endif
     2610      )
    24972611      {
    24982612        return;
    24992613      }
     2614#if VSP_N
     2615#if !(!VSP_TEXT_ONLY && FORCE_REF_VSP==2)
     2616      else // inter
     2617      {
     2618        Int aiRefIdx[2] = {NOT_VALID, NOT_VALID};
     2619        for( Int iList = 0; iList < 2; iList++ )
     2620        {
     2621          aiRefIdx[iList] = pcTextureCU->getCUMvField( RefPicList(iList) )->getRefIdx( rpcTempCU->getZorderIdxInCU() + ui );
     2622          if( aiRefIdx[iList] >= 0 && pcTextureCU->getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP )
     2623          {
     2624            return;
     2625          }
     2626        }
     2627        //if( aiRefIdx[0] == NOT_VALID && aiRefIdx[1] == NOT_VALID )
     2628        //{
     2629        //  return;
     2630        //}
     2631      }
     2632#endif
     2633#endif
    25002634    }
    25012635  }
     
    26942828  m_pcEntropyCoder->encodeSplitFlag( pcCU, 0, uhDepth, true );
    26952829  m_pcEntropyCoder->encodeSkipFlag( pcCU, 0, true );
     2830#if FORCE_REF_VSP==1
     2831  if( (pcCU->isSkipped( 0 ) || pcCU->isVspMode( 0 )) && pcCU->getSlice()->getViewId() != 0 )
     2832#if VSP_TEXT_ONLY
     2833  if( !pcCU->getSlice()->getSPS()->isDepth() )
     2834#endif
     2835    m_pcEntropyCoder->encodeVspFlag ( pcCU, 0, true );
     2836#endif
    26962837
    26972838  if( pcCU->isSkipped( 0 ) )
     2839#if FORCE_REF_VSP==1
     2840  if( !pcCU->isVspMode( 0 ) )
     2841#endif
    26982842  {
    26992843    m_pcEntropyCoder->encodeMergeIndex( pcCU, 0, 0, true );
Note: See TracChangeset for help on using the changeset viewer.