Changeset 1317 in 3DVCSoftware for branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 4 Sep 2015, 21:28:58 (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-15.0-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r1313 r1317 2934 2934 } 2935 2935 2936 #if NH_3D _FIX_PRUNING2936 #if NH_3D 2937 2937 Bool TComDataCU::hasEqualMotion( Int dirA, const TComMvField* mvFieldA, Int dirB, const TComMvField* mvFieldB ) 2938 2938 { … … 3046 3046 if( !iLoop && ivCandDir[0] > 0) 3047 3047 { 3048 #if NH_3D_FIX_PRUNING3049 3048 if( hasEqualMotion(tmpDir, tmpMV, m_mergCands[MRG_IVMC].m_uDir, m_mergCands[MRG_IVMC].m_cMvField )) 3050 #else3051 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 #endif3053 3049 { 3054 3050 bRemove = true; … … 3101 3097 } 3102 3098 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 3103 3111 Int iCount = 0; 3104 3112 TComMv cZeroMv; … … 3156 3164 pcMvFieldNeighbours[(ui<<1)+1].setMvField(cZeroMv, NOT_VALID); 3157 3165 } 3166 3158 3167 // copy extMergeCandList to output 3159 3168 for( UInt ui = 0; ui < getSlice()->getMaxNumMergeCand(); ui++ ) … … 3161 3170 puhInterDirNeighbours[ui] = uhInterDirNeighboursExt[ui]; 3162 3171 pcMvFieldNeighbours[ui<<1].setMvField(extMergeCandList[ui<<1].getMv(), extMergeCandList[ui<<1].getRefIdx()); 3172 3163 3173 if ( getSlice()->isInterB() ) 3174 { 3164 3175 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 3166 3217 numValidMergeCand = iCount; 3167 3218 assert(iCount == getSlice()->getMaxNumMergeCand()); … … 3503 3554 continue; 3504 3555 } 3505 #if NH_3D_FIX_PRUNING3506 3556 if (hasEqualMotion( tmpDir, tmpMV, m_mergCands[MRG_A1+iCnloop].m_uDir, m_mergCands[MRG_A1+iCnloop].m_cMvField ) ) 3507 #else3508 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 #endif3510 3557 { 3511 3558 m_mergCands[MRG_A1+iCnloop].m_bAvailable = false; … … 3581 3628 continue; 3582 3629 } 3583 #if NH_3D_FIX_PRUNING3584 3630 if (hasEqualMotion(ivCandDir[0], tmpMV, m_mergCands[MRG_A1+i].m_uDir, m_mergCands[MRG_A1+i].m_cMvField) ) 3585 #else3586 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 #endif3588 3631 { 3589 3632 m_mergCands[MRG_A1+i].m_bAvailable = false; … … 3594 3637 else 3595 3638 { 3596 #if NH_3D_FIX_PRUNING3597 3639 if( hasEqualMotion( ivCandDir[0], tmpMV, m_mergCands[MRG_T].m_uDir, m_mergCands[MRG_T].m_cMvField ) ) 3598 #else3599 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 #endif3601 3640 { 3602 3641 bRemoveSpa = true; … … 3647 3686 !bARPFlag && 3648 3687 #endif 3649 #if H_3D || NH_3D_FIX_VSP3688 #if NH_3D 3650 3689 (nPSW + nPSH > 12) && 3651 3690 #endif … … 3694 3733 continue; 3695 3734 } 3696 #if NH_3D_FIX_PRUNING3697 3735 if ( hasEqualMotion(ivCandDir[1], tmpMV, m_mergCands[MRG_A1+i].m_uDir, m_mergCands[MRG_A1+i].m_cMvField) ) 3698 #else3699 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 #endif3701 3736 { 3702 3737 bRemoveSpa = true; … … 4852 4887 } 4853 4888 } 4889 #if NH_3D 4890 Void 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 4854 4901 4855 4902 UInt TComDataCU::getCoefScanIdx(const UInt uiAbsPartIdx, const UInt uiWidth, const UInt uiHeight, const ComponentID compID) const … … 5284 5331 #if NH_3D_NBDV_REF 5285 5332 TComPic* picDepth = NULL; 5286 assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC()); 5333 assert(getSlice()->getRefPic(eRefPicList, refId)->getPOC() == getSlice()->getPOC()); 5287 5334 #if H_3D_FCO_VSP_DONBDV_E0163 5288 5335 picDepth = getSlice()->getIvPic(true, getSlice()->getViewIndex() ); … … 5627 5674 if(!m_pcSlice->getIsDepth()) 5628 5675 { 5629 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5676 #if NH_3D_DBBP 5630 5677 if (!getDBBPFlag(0)) 5631 5678 #else … … 5803 5850 iCurrPosY += ( iHeight >> 1 ); 5804 5851 } 5805 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5852 #if NH_3D_DBBP 5806 5853 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5807 5854 #else … … 5878 5925 } 5879 5926 #if NH_3D_SPIVMP 5880 #if H_3D_DBBP || NH_3D_ALIGN_SPIVMP_DBBP5927 #if NH_3D_DBBP 5881 5928 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5882 5929 #else
Note: See TracChangeset for help on using the changeset viewer.