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

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • 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 );
Note: See TracChangeset for help on using the changeset viewer.