diff -ur D:/work/JCT-3V/HTM\HTM9.0r1/source/Lib/TLibCommon/TComDataCU.cpp D:/work/AT/JCT3V-G/pre/HTM9.0r1-BugFixClip/source/Lib/TLibCommon/TComDataCU.cpp
old
|
new
|
|
3426 | 3426 | |
3427 | 3427 | cMv = cMv; |
3428 | 3428 | } |
| 3429 | #if !(NTT_BUG_FIX_CLIP) |
3429 | 3430 | clipMv( cMv ); |
| 3431 | #endif |
3430 | 3432 | pcMvFieldNeighbours[(iCount<<1)+refListIdY].setMvField( cMv, i ); |
3431 | 3433 | #if H_3D_NBDV |
3432 | 3434 | pcMvFieldNeighbours[(iCount<<1)+refListIdY].getMv().setIDVFlag (false); |
… |
… |
|
3476 | 3478 | { |
3477 | 3479 | cMv.setVer(0); |
3478 | 3480 | } |
| 3481 | #if !(NTT_BUG_FIX_CLIP) |
3479 | 3482 | clipMv( cMv ); |
| 3483 | #endif |
3480 | 3484 | |
3481 | 3485 | #if ETRIKHU_MERGE_REUSE_F0093 |
3482 | 3486 | rightShiftMergeCandList( pcMvFieldNeighbours, puhInterDirNeighbours, vspFlag, inheritedVSPDisInfo, iCount, (5-iCount), iCount3DV); |
… |
… |
|
4308 | 4312 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
4309 | 4313 | cMvPred+=cAdd; |
4310 | 4314 | cMvPred>>=2; |
| 4315 | #if !(NTT_BUG_FIX_CLIP) |
4311 | 4316 | clipMv(cMvPred); |
| 4317 | #endif |
4312 | 4318 | tmpMV[0].setMvField(cMvPred,tRef[0]); |
4313 | 4319 | } |
4314 | 4320 | if ( getSlice()->isInterB() ) |
… |
… |
|
4321 | 4327 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
4322 | 4328 | cMvPred+=cAdd; |
4323 | 4329 | cMvPred>>=2; |
| 4330 | #if !(NTT_BUG_FIX_CLIP) |
4324 | 4331 | clipMv(cMvPred); |
| 4332 | #endif |
4325 | 4333 | tmpMV[1].setMvField(cMvPred,tRef[1]); |
4326 | 4334 | } |
4327 | 4335 | } |
… |
… |
|
4423 | 4431 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
4424 | 4432 | cMvPred+=cAdd; |
4425 | 4433 | cMvPred>>=2; |
| 4434 | #if !(NTT_BUG_FIX_CLIP) |
4426 | 4435 | clipMv(cMvPred); |
| 4436 | #endif |
4427 | 4437 | pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); |
4428 | 4438 | } |
4429 | 4439 | if ( getSlice()->isInterB() ) |
… |
… |
|
4436 | 4446 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
4437 | 4447 | cMvPred+=cAdd; |
4438 | 4448 | cMvPred>>=2; |
| 4449 | #if !(NTT_BUG_FIX_CLIP) |
4439 | 4450 | clipMv(cMvPred); |
| 4451 | #endif |
4440 | 4452 | pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); |
4441 | 4453 | } |
4442 | 4454 | } |
… |
… |
|
5600 | 5612 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
5601 | 5613 | cMvPred+=cAdd; |
5602 | 5614 | cMvPred>>=2; |
| 5615 | #if !(NTT_BUG_FIX_CLIP) |
5603 | 5616 | clipMv(cMvPred); |
| 5617 | #endif |
5604 | 5618 | pcMvFieldNeighbours[iCount<<1].setMvField(cMvPred,iValidDepRef); |
5605 | 5619 | } |
5606 | 5620 | |
… |
… |
|
5614 | 5628 | const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); |
5615 | 5629 | cMvPred+=cAdd; |
5616 | 5630 | cMvPred>>=2; |
| 5631 | #if !(NTT_BUG_FIX_CLIP) |
5617 | 5632 | clipMv(cMvPred); |
| 5633 | #endif |
5618 | 5634 | pcMvFieldNeighbours[(iCount<<1)+1].setMvField(cMvPred,iValidDepRef); |
5619 | 5635 | } |
5620 | 5636 | } |
… |
… |
|
7747 | 7763 | |
7748 | 7764 | if( bCheck ) |
7749 | 7765 | { |
| 7766 | #if !(NTT_BUG_FIX_CLIP) |
7750 | 7767 | clipMv(cColMv); |
| 7768 | #endif |
7751 | 7769 | pDInfo->m_acNBDV = cColMv; |
7752 | 7770 | pDInfo->m_aVIdxCan = iTargetViewIdx; |
7753 | 7771 | |
… |
… |
|
7816 | 7834 | if( cIDVInfo.m_bAvailab[iList][curPos] ) |
7817 | 7835 | { |
7818 | 7836 | TComMv cDispVec = cIDVInfo.m_acMvCand[iList][ curPos ]; |
| 7837 | #if !(NTT_BUG_FIX_CLIP) |
7819 | 7838 | clipMv( cDispVec ); |
| 7839 | #endif |
7820 | 7840 | pDInfo->m_acNBDV = cDispVec; |
7821 | 7841 | pDInfo->m_aVIdxCan = cIDVInfo.m_aVIdxCan[iList][ curPos ]; |
7822 | 7842 | #if H_3D_NBDV_REF |
… |
… |
|
7946 | 7966 | |
7947 | 7967 | Pel iDisp = getMcpFromDM( pcBaseViewDepthPicYuv, cMvPred, iBlkX, iBlkY, iWidth, iHeight, aiShiftLUT ); |
7948 | 7968 | cMvPred->setHor( iDisp ); |
| 7969 | #if !(NTT_BUG_FIX_CLIP) |
7949 | 7970 | clipMv(*cMvPred); |
| 7971 | #endif |
7950 | 7972 | } |
7951 | 7973 | } |
7952 | 7974 | #endif //H_3D_NBDV_REF |
… |
… |
|
7972 | 7994 | Int refViewIdx = pcTmpCU->getSlice()->getRefPic(eRefPicList, refId)->getViewIndex(); |
7973 | 7995 | if (refViewIdx != m_pcSlice->getViewIndex()) |
7974 | 7996 | { |
| 7997 | #if !(NTT_BUG_FIX_CLIP) |
7975 | 7998 | clipMv(cMvPred); |
| 7999 | #endif |
7976 | 8000 | pNbDvInfo->m_acNBDV = cMvPred; |
7977 | 8001 | pNbDvInfo->m_aVIdxCan = refViewIdx; |
7978 | 8002 | #if H_3D_NBDV_REF |
… |
… |
|
8375 | 8399 | cMv.setIDVVer (cDv.getVer()); |
8376 | 8400 | cMv.setIDVVId (iViewIndex); |
8377 | 8401 | } |
8378 | | |
| 8402 | |
| 8403 | #if !(NTT_BUG_FIX_CLIP) |
8379 | 8404 | clipMv( cMv ); |
| 8405 | #endif |
8380 | 8406 | bLoop_stop = true; |
8381 | 8407 | |
8382 | 8408 | pcMvFieldSP[2*iPartition + uiCurrRefListId].setMvField(cMv, iPdmRefIdx); |
… |
… |
|
8507 | 8533 | } |
8508 | 8534 | #endif |
8509 | 8535 | #endif |
| 8536 | #if !(NTT_BUG_FIX_CLIP) |
8510 | 8537 | clipMv( cMv ); |
| 8538 | #endif |
8511 | 8539 | paiPdmRefIdx [ (uiCurrRefListId + (iLoopCan<<2)) ] = iPdmRefIdx; |
8512 | 8540 | pacPdmMv [ (uiCurrRefListId + (iLoopCan<<2)) ] = cMv; |
8513 | 8541 | stopLoop = true; |
… |
… |
|
8556 | 8584 | cMv.setHor((cMv.getHor()+2)>>2); |
8557 | 8585 | #endif |
8558 | 8586 | cMv.setVer( 0 ); |
| 8587 | #if !(NTT_BUG_FIX_CLIP) |
8559 | 8588 | clipMv( cMv ); |
| 8589 | #endif |
8560 | 8590 | pacPdmMv [iRefListId + 2 + (iLoopCan<<2)] = cMv; |
8561 | 8591 | } |
8562 | 8592 | break; |
diff -ur D:/work/JCT-3V/HTM\HTM9.0r1/source/Lib/TLibCommon/TComPrediction.cpp D:/work/AT/JCT3V-G/pre/HTM9.0r1-BugFixClip/source/Lib/TLibCommon/TComPrediction.cpp
old
|
new
|
|
1016 | 1016 | |
1017 | 1017 | assert ( cDistparity.bDV ); |
1018 | 1018 | |
| 1019 | #if NTT_BUG_FIX_CLIP |
| 1020 | TComMv cNBDV = cDistparity.m_acNBDV; |
| 1021 | pcCU->clipMv( cNBDV ); |
| 1022 | |
| 1023 | pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); |
| 1024 | xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); |
| 1025 | xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cNBDV, iWidth, iHeight, pYuvB0, bi, true ); |
| 1026 | #else |
1019 | 1027 | pcPicYuvRef = pcPicYuvBaseCol->getPicYuvRec(); |
1020 | 1028 | xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true ); |
1021 | 1029 | xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cDistparity.m_acNBDV, iWidth, iHeight, pYuvB0, bi, true ); |
1022 | | |
| 1030 | #endif |
1023 | 1031 | pcPicYuvRef = pcPicYuvBaseRef->getPicYuvRec(); |
1024 | 1032 | xPredInterLumaBlk ( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true ); |
1025 | 1033 | xPredInterChromaBlk( pcCU, pcPicYuvRef, uiPartAddr, &cMVwithDisparity, iWidth, iHeight, pYuvB1, bi, true ); |
diff -ur D:/work/JCT-3V/HTM\HTM9.0r1/source/Lib/TLibCommon/TypeDef.h D:/work/AT/JCT3V-G/pre/HTM9.0r1-BugFixClip/source/Lib/TLibCommon/TypeDef.h
old
|
new
|
|
38 | 38 | #ifndef _TYPEDEF__ |
39 | 39 | #define _TYPEDEF__ |
40 | 40 | |
| 41 | #define NTT_BUG_FIX_CLIP 1 |
| 42 | |
41 | 43 | //! \ingroup TLibCommon |
42 | 44 | //! \{ |
43 | 45 | ///////////////////////////////////////////////////////////////////////////////////////// |