Ignore:
Timestamp:
4 Sep 2015, 21:28:58 (9 years ago)
Author:
tech
Message:

Clean-ups. HLS.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp

    r1313 r1317  
    29342934}
    29352935
    2936 #if NH_3D_FIX_PRUNING
     2936#if NH_3D
    29372937Bool TComDataCU::hasEqualMotion( Int dirA, const TComMvField* mvFieldA, Int dirB, const TComMvField* mvFieldB )
    29382938{
     
    30463046      if( !iLoop && ivCandDir[0] > 0)
    30473047      {
    3048 #if NH_3D_FIX_PRUNING
    30493048        if( hasEqualMotion(tmpDir, tmpMV, m_mergCands[MRG_IVMC].m_uDir, m_mergCands[MRG_IVMC].m_cMvField ))
    3050 #else
    3051         if(tmpDir == m_mergCands[MRG_IVMC].m_uDir && m_mergCands[MRG_IVMC].m_cMvField[0]==tmpMV[0] && m_mergCands[MRG_IVMC].m_cMvField[1]==tmpMV[1])
    3052 #endif
    30533049        {
    30543050            bRemove                         = true;
     
    31013097  }
    31023098
     3099
     3100#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
     3101  if ( g_traceMergeCandListConst )
     3102  {
     3103    for (Int i = 0; i<MRG_IVSHIFT+1; i++)
     3104    {
     3105      m_mergCands[i].print( i );
     3106    }
     3107  }
     3108#endif
     3109
     3110
    31033111  Int iCount = 0;
    31043112  TComMv cZeroMv;
     
    31563164    pcMvFieldNeighbours[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID);
    31573165  }
     3166
    31583167  // copy extMergeCandList to output
    31593168  for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ )
     
    31613170    puhInterDirNeighbours[ui] = uhInterDirNeighboursExt[ui];
    31623171    pcMvFieldNeighbours[ui<<1].setMvField(extMergeCandList[ui<<1].getMv(), extMergeCandList[ui<<1].getRefIdx());
     3172
    31633173    if ( getSlice()->isInterB() )
     3174    {
    31643175      pcMvFieldNeighbours[(ui<<1)+1].setMvField(extMergeCandList[(ui<<1)+1].getMv(), extMergeCandList[(ui<<1)+1].getRefIdx());
    3165   }
     3176    }
     3177  }
     3178
     3179#if ENC_DEC_TRACE && H_MV_ENC_DEC_TRAC
     3180  if ( g_traceMergeCandListConst )
     3181  {
     3182    std::cout << std::setfill(' ')                          << std::setw( 15 )
     3183      <<  "Num"                                             << std::setw( 15 )
     3184      <<  "Dir "                                            << std::setw( 15 )
     3185      <<  "L0 RefIdx"                                       << std::setw( 15 )
     3186      <<  "L0 Hor"                                          << std::setw( 15 )
     3187      <<  "L0 Ver"                                          << std::setw( 15 )
     3188      <<  "L1 RefIdx"                                       << std::setw( 15 )
     3189      <<  "L1 Hor"                                          << std::setw( 15 )
     3190      <<  "L1 Ver"                                          << std::setw( 15 )
     3191      << std::endl;
     3192
     3193    // copy extMergeCandList to output
     3194    for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ )
     3195    {
     3196      UChar curDir        = puhInterDirNeighbours[ui];
     3197      TComMvField& curf   = pcMvFieldNeighbours[ui<<1];
     3198      TComMvField& curf2  = pcMvFieldNeighbours[(ui<<1)+1];
     3199
     3200      std::cout << std::setfill(' ')                         << std::setw( 15 )
     3201        << ui                                                << std::setw( 15 )       
     3202        << (UInt) curDir                                     << std::setw( 15 )   
     3203        << ((curDir & 1) ? curf.getRefIdx()       : MIN_INT) << std::setw( 15 )
     3204        << ((curDir & 1) ? curf.getMv().getHor()  : MIN_INT) << std::setw( 15 )
     3205        << ((curDir & 1) ? curf.getMv().getVer()  : MIN_INT) << std::setw( 15 );
     3206
     3207      if ( getSlice()->isInterB() )
     3208      {     
     3209        std::cout << ((curDir & 2) ? curf2.getRefIdx() : MIN_INT) << std::setw( 15 )
     3210          << ((curDir & 1) ? curf2.getMv().getHor()    : MIN_INT) << std::setw( 15 )
     3211          << ((curDir & 1) ? curf2.getMv().getVer()    : MIN_INT) << std::setw( 15 );
     3212      }
     3213      std::cout << std::endl;
     3214    }
     3215  }
     3216#endif
    31663217  numValidMergeCand = iCount;
    31673218  assert(iCount == getSlice()->getMaxNumMergeCand());
     
    35033554          continue;
    35043555        }
    3505 #if NH_3D_FIX_PRUNING
    35063556        if (hasEqualMotion( tmpDir, tmpMV, m_mergCands[MRG_A1+iCnloop].m_uDir, m_mergCands[MRG_A1+iCnloop].m_cMvField ) )
    3507 #else
    3508         if (tmpDir == m_mergCands[MRG_A1+iCnloop].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+iCnloop].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+iCnloop].m_cMvField[1])
    3509 #endif
    35103557        {
    35113558          m_mergCands[MRG_A1+iCnloop].m_bAvailable = false;
     
    35813628          continue;
    35823629        }
    3583 #if NH_3D_FIX_PRUNING
    35843630        if (hasEqualMotion(ivCandDir[0], tmpMV, m_mergCands[MRG_A1+i].m_uDir,  m_mergCands[MRG_A1+i].m_cMvField) )
    3585 #else
    3586         if (ivCandDir[0] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])
    3587 #endif
    35883631        {
    35893632          m_mergCands[MRG_A1+i].m_bAvailable = false;
     
    35943637    else
    35953638    {
    3596 #if NH_3D_FIX_PRUNING
    35973639      if( hasEqualMotion( ivCandDir[0], tmpMV, m_mergCands[MRG_T].m_uDir, m_mergCands[MRG_T].m_cMvField ) )
    3598 #else
    3599       if (m_mergCands[MRG_T].m_bAvailable && ivCandDir[0] == m_mergCands[MRG_T].m_uDir && tmpMV[0]==m_mergCands[MRG_T].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_T].m_cMvField[1])
    3600 #endif
    36013640      {
    36023641        bRemoveSpa                      = true;
     
    36473686      !bARPFlag &&
    36483687#endif
    3649 #if H_3D || NH_3D_FIX_VSP
     3688#if NH_3D
    36503689      (nPSW + nPSH > 12) &&
    36513690#endif
     
    36943733        continue;
    36953734      }
    3696 #if NH_3D_FIX_PRUNING
    36973735      if ( hasEqualMotion(ivCandDir[1], tmpMV, m_mergCands[MRG_A1+i].m_uDir, m_mergCands[MRG_A1+i].m_cMvField) )
    3698 #else
    3699       if (ivCandDir[1] == m_mergCands[MRG_A1+i].m_uDir && tmpMV[0]==m_mergCands[MRG_A1+i].m_cMvField[0] && tmpMV[1]==m_mergCands[MRG_A1+i].m_cMvField[1])
    3700 #endif
    37013736      {
    37023737        bRemoveSpa                      = true;
     
    48524887  }
    48534888}
     4889#if NH_3D
     4890Void TComDataCU::printMV( )
     4891
     4892
     4893  for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)
     4894  {
     4895    std::cout << "L" << i;
     4896    m_acCUMvField[i].print(m_pePredMode);
     4897  }
     4898
     4899}
     4900#endif
    48544901
    48554902UInt TComDataCU::getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const
     
    52845331#if NH_3D_NBDV_REF
    52855332          TComPic* picDepth = NULL;
    5286           assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC());         
     5333          assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC());           
    52875334#if H_3D_FCO_VSP_DONBDV_E0163
    52885335          picDepth  = getSlice()->getIvPic(true, getSlice()->getViewIndex() );
     
    56275674    if(!m_pcSlice->getIsDepth())
    56285675    {
    5629 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP
     5676#if NH_3D_DBBP
    56305677      if (!getDBBPFlag(0))
    56315678#else
     
    58035850      iCurrPosY  += ( iHeight >> 1 );
    58045851    }
    5805 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP
     5852#if NH_3D_DBBP
    58065853    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    58075854#else
     
    58785925    }
    58795926#if NH_3D_SPIVMP
    5880 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP
     5927#if NH_3D_DBBP
    58815928    for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++)
    58825929#else
Note: See TracChangeset for help on using the changeset viewer.