Ignore:
Timestamp:
2 Jul 2013, 21:49:16 (13 years ago)
Author:
mitsubishi-htm
Message:

-VSP compensation part migration, not fully tested, intermediate version

Location:
branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncCu.cpp

    r504 r510  
    13541354  rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to LCU level
    13551355  rpcTempCU->setCUTransquantBypassSubParts( m_pcEncCfg->getCUTransquantBypassFlagValue(), 0, uhDepth );
     1356
     1357#if H_3D_VSP
     1358  Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     1359  memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     1360  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, vspFlag, numValidMergeCand );
     1361#else
    13561362  rpcTempCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
     1363#endif
    13571364
    13581365#if H_3D_IV_MERGE
     
    14191426          rpcTempCU->setMergeFlagSubParts( true, 0, 0, uhDepth ); // interprets depth relative to LCU level
    14201427          rpcTempCU->setMergeIndexSubParts( uiMergeCand, 0, 0, uhDepth ); // interprets depth relative to LCU level
     1428#if H_3D_VSP
     1429          rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth );
     1430#endif
    14211431          rpcTempCU->setInterDirSubParts( uhInterDirNeighbours[uiMergeCand], 0, 0, uhDepth ); // interprets depth relative to LCU level
    14221432          rpcTempCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], SIZE_2Nx2N, 0, 0 ); // interprets depth relative to rpcTempCU level
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncGOP.cpp

    r504 r510  
    821821    }
    822822
     823    // A bug fix provided by Gerhard to deal with IBP configuration. NEED futher study
     824#if H_MV
     825    if( pcSlice->getIdrPicFlag() )
     826    {
     827      pcSlice->setEnableTMVPFlag(0);
     828    }
     829#endif
     830
    823831#if H_3D_VSO
    824832  // Should be moved to TEncTop !!!
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSearch.cpp

    r504 r510  
    31713171 * \returns Void
    31723172 */
    3173 Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours, Int& numValidMergeCand )
     3173Void TEncSearch::xMergeEstimation( TComDataCU* pcCU, TComYuv* pcYuvOrg, Int iPUIdx, UInt& uiInterDir, TComMvField* pacMvField, UInt& uiMergeIndex, UInt& ruiCost, TComMvField* cMvFieldNeighbours, UChar* uhInterDirNeighbours
     3174#if H_3D_VSP
     3175                                 , Int* vspFlag
     3176#endif
     3177                                 , Int& numValidMergeCand
     3178                                 )
    31743179{
    31753180  UInt uiAbsPartIdx = 0;
     
    31853190    if ( iPUIdx == 0 )
    31863191    {
    3187       pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand );
     3192      pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours
     3193#if H_3D_VSP
     3194                                   , vspFlag
     3195#endif
     3196                                   , numValidMergeCand
     3197                                   );
    31883198    }
    31893199    pcCU->setPartSizeSubParts( partSize, 0, uiDepth );
     
    31913201  else
    31923202  {
    3193     pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     3203    pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours
     3204#if H_3D_VSP
     3205                                 , vspFlag
     3206#endif
     3207                                 , numValidMergeCand
     3208                                 );
    31943209  }
    31953210  xRestrictBipredMergeCand( pcCU, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand );
     
    32063221      pcCU->getCUMvField(REF_PIC_LIST_0)->setAllMvField( cMvFieldNeighbours[0 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
    32073222      pcCU->getCUMvField(REF_PIC_LIST_1)->setAllMvField( cMvFieldNeighbours[1 + 2*uiMergeCand], ePartSize, uiAbsPartIdx, 0, iPUIdx );
     3223
     3224#if H_3D_VSP
     3225      pcCU->setVSPFlagSubParts( vspFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx ) );
     3226#endif
    32083227
    32093228      xGetInterPredictionError( pcCU, pcYuvOrg, iPUIdx, uiCostCand, m_pcEncCfg->getUseHADME() );
     
    33623381   
    33633382    pcCU->getPartIndexAndSize( iPartIdx, uiPartAddr, iRoiWidth, iRoiHeight );
     3383
     3384#if H_3D_VSP
     3385    pcCU->setVSPFlagSubParts( 0, uiPartAddr, iPartIdx, pcCU->getDepth(uiPartAddr) );
     3386#endif
    33643387   
    33653388#if AMP_MRG
     
    39653988      // find Merge result
    39663989      UInt uiMRGCost = MAX_UINT;
    3967       xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand);
     3990#if H_3D_VSP
     3991      Int vspFlag[MRG_MAX_NUM_CANDS_MEM];
     3992      memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM);
     3993#endif
     3994
     3995      xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours
     3996#if H_3D_VSP
     3997                      , vspFlag
     3998#endif
     3999                      , numValidMergeCand
     4000                      );
    39684001      if ( uiMRGCost < uiMECost )
    39694002      {
     
    39714004        pcCU->setMergeFlagSubParts ( true,          uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    39724005        pcCU->setMergeIndexSubParts( uiMRGIndex,    uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4006#if H_3D_VSP
     4007        pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4008#endif
    39734009        pcCU->setInterDirSubParts  ( uiMRGInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    39744010        {
     
    39904026        pcCU->setMergeFlagSubParts( false,        uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
    39914027        pcCU->setInterDirSubParts ( uiMEInterDir, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4028#if H_3D_VSP
     4029        pcCU->setVSPFlagSubParts ( 0,             uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) );
     4030#endif
    39924031        {
    39934032          pcCU->getCUMvField( REF_PIC_LIST_0 )->setAllMvField( cMEMvField[0], ePartSize, uiPartAddr, 0, iPartIdx );
  • branches/HTM-DEV-0.3-dev2/source/Lib/TLibEncoder/TEncSearch.h

    r446 r510  
    380380                                    UInt&           ruiCost
    381381                                  , TComMvField* cMvFieldNeighbours, 
    382                                     UChar* uhInterDirNeighbours,
    383                                     Int& numValidMergeCand
     382                                    UChar* uhInterDirNeighbours
     383#if H_3D_VSP
     384                                  , Int* vspFlag
     385#endif
     386                                  , Int& numValidMergeCand
    384387                                   );
    385388
Note: See TracChangeset for help on using the changeset viewer.