Changeset 166 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 1 Nov 2012, 19:22:41 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.cpp
r100 r166 49 49 Int * TComDataCU::m_pcGlbArlCoeffCb = NULL; 50 50 Int * TComDataCU::m_pcGlbArlCoeffCr = NULL; 51 #endif 52 53 #if FORCE_REF_VSP==1 54 #define CHECK_ADD_YET(pcCURef,uiIdx) 55 #define SET_AOUND_MVINFO(pcCURef,uiIdx) \ 56 {\ 57 if((pcCURef)->isVspMode((uiIdx))){\ 58 pcMvFieldNeighbours[iCount<<1].setRefIdx(getSlice()->getRefIdxVsp(REF_PIC_LIST_0));\ 59 if(getSlice()->isInterB()){\ 60 pcMvFieldNeighbours[(iCount<<1)+1].setRefIdx(getSlice()->getRefIdxVsp(REF_PIC_LIST_1));\ 61 }\ 62 }\ 63 } 64 65 #elif FORCE_REF_VSP==2 66 #define CHECK_ADD_YET(pcCURef,uiIdx) &&!((pcCURef)->isVspMode((uiIdx),TComMv(0,0))&&bVspMvZeroDone) 67 #define SET_AOUND_MVINFO(pcCURef,uiIdx) if((pcCURef)->isVspMode((uiIdx),TComMv(0,0))){bVspMvZeroDone=true;} 68 69 inline bool TComDataCU::xAddVspSkip(UChar ucVspMergePos, Bool bVspMvZeroDone, UInt uiDepth, Bool* abCandIsInter, Int& iCount, 70 UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int mrgCandIdx) 71 { 72 #if VSP_SLICE_HEADER 73 if( !getSlice()->getVspFlag() ) return true; 74 #endif 75 76 if( ucVspMergePos == VSP_MERGE_POS ) 77 { 78 #if VSP_TEXT_ONLY 79 if( !getSlice()->getSPS()->isDepth() ) 80 #endif 81 if( getSlice()->getSPS()->getViewId()!=0 && !bVspMvZeroDone ) 82 { 83 Bool bSubCUCanBeSynthesized[4]; 84 Bool * pbSubCUCanBeSynthesized = bSubCUCanBeSynthesized; 85 getPic()->checkSynthesisAvailability( getAddr(), getZorderIdxInCU(), uiDepth, pbSubCUCanBeSynthesized ); 86 if( bSubCUCanBeSynthesized[0] && bSubCUCanBeSynthesized[1] && bSubCUCanBeSynthesized[2] && bSubCUCanBeSynthesized[3] ) 87 { 88 abCandIsInter[iCount] = true; 89 // get Inter Dir 90 Int iInterDir = ((getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0 && getSlice()->getNumRefIdx(REF_PIC_LIST_1) > 0) ? 3 : 91 (getSlice()->getNumRefIdx(REF_PIC_LIST_0) > 0 ? 1 : 2)); 92 puhInterDirNeighbours[iCount] = iInterDir; //pcCUAboveLeft->getInterDir( uiAboveLeftPartIdx ); 93 // get Mv from Left 94 pcMvFieldNeighbours[iCount<<1].setMvField( TComMv(0, 0), getSlice()->getRefIdxVsp(REF_PIC_LIST_0) ); //pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_0, pcMvFieldNeighbours[iCount<<1] ); 95 if ( getSlice()->isInterB() ) 96 { 97 pcMvFieldNeighbours[(iCount<<1)+1].setMvField( TComMv(0, 0), getSlice()->getRefIdxVsp(REF_PIC_LIST_1) ); //pcCUAboveLeft->getMvField( pcCUAboveLeft, uiAboveLeftPartIdx, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 98 } 99 #if SIMP_MRG_PRUN 100 if ( mrgCandIdx == iCount ) 101 { 102 return false; 103 } 104 #endif 105 iCount ++; 106 } 107 } 108 } 109 return true; 110 } 51 111 #endif 52 112 … … 3450 3510 #endif 3451 3511 3512 #if FORCE_REF_VSP==2 3513 bool bVspMvZeroDone = false; 3514 #endif 3515 3452 3516 Int iCount = 0; 3453 3517 … … 3513 3577 #endif 3514 3578 3515 //left 3579 #if FORCE_REF_VSP==2 3580 //===== vsp 0 ===== 3581 if ( !xAddVspSkip(0, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 3582 return; 3583 #endif 3584 3585 //===== left ===== 3516 3586 UInt uiLeftPartIdx = 0; 3517 3587 TComDataCU* pcCULeft = 0; … … 3533 3603 if (!(uiPUIdx == 1 && (partSize == SIZE_Nx2N || partSize == SIZE_nLx2N || partSize == SIZE_nRx2N))) 3534 3604 { 3535 if ( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) ) 3605 if ( pcCULeft && !pcCULeft->isIntra( uiLeftPartIdx ) 3606 #if FORCE_REF_VSP 3607 CHECK_ADD_YET(pcCULeft, uiLeftPartIdx) 3608 #endif 3609 ) 3536 3610 { 3537 3611 abCandIsInter[iCount] = true; … … 3548 3622 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3549 3623 #endif 3624 #if FORCE_REF_VSP 3625 SET_AOUND_MVINFO(pcCULeft, uiLeftPartIdx) 3626 #endif 3550 3627 #if SIMP_MRG_PRUN 3551 3628 if ( mrgCandIdx == iCount ) … … 3581 3658 #endif 3582 3659 3583 // above 3660 #if FORCE_REF_VSP==2 3661 //===== vsp 1 ===== 3662 if ( !xAddVspSkip(1, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 3663 return; 3664 #endif 3665 3666 //===== above ===== 3584 3667 #if !SIMP_MRG_PRUN 3585 3668 partSize = getPartitionSize( uiAbsPartIdx ); … … 3605 3688 #if SIMP_MRG_PRUN 3606 3689 if ( pcCUAbove && !pcCUAbove->isIntra( uiAbovePartIdx ) 3690 #if FORCE_REF_VSP 3691 CHECK_ADD_YET(pcCUAbove, uiAbovePartIdx) 3692 #endif 3607 3693 && !(uiPUIdx == 1 && (cCurPS == SIZE_2NxN || cCurPS == SIZE_2NxnU || cCurPS == SIZE_2NxnD)) 3608 3694 && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAbove, uiAbovePartIdx ) ) ) … … 3624 3710 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3625 3711 #endif 3712 #if FORCE_REF_VSP 3713 SET_AOUND_MVINFO(pcCUAbove, uiAbovePartIdx) 3714 #endif 3626 3715 #if SIMP_MRG_PRUN 3627 3716 if ( mrgCandIdx == iCount ) … … 3659 3748 #endif 3660 3749 3661 // above right 3750 #if FORCE_REF_VSP==2 3751 //===== vsp 2 ===== 3752 if ( !xAddVspSkip(2, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 3753 return; 3754 #endif 3755 3756 //===== above right ===== 3662 3757 UInt uiAboveRightPartIdx = 0; 3663 3758 TComDataCU* pcCUAboveRight = 0; … … 3677 3772 #endif 3678 3773 #if SIMP_MRG_PRUN 3679 if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx ) && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) ) 3774 if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx ) 3775 #if FORCE_REF_VSP 3776 CHECK_ADD_YET(pcCUAboveRight, uiAboveRightPartIdx) 3777 #endif 3778 && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveRight, uiAboveRightPartIdx ) ) ) 3680 3779 #else 3681 3780 if ( pcCUAboveRight && !pcCUAboveRight->isIntra( uiAboveRightPartIdx ) ) … … 3695 3794 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3696 3795 #endif 3796 #if FORCE_REF_VSP 3797 SET_AOUND_MVINFO(pcCUAboveRight, uiAboveRightPartIdx) 3798 #endif 3697 3799 #if SIMP_MRG_PRUN 3698 3800 if ( mrgCandIdx == iCount ) … … 3727 3829 #endif 3728 3830 3729 //left bottom 3831 #if FORCE_REF_VSP==2 3832 //===== vsp 3 ===== 3833 if ( !xAddVspSkip(3, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 3834 return; 3835 #endif 3836 3837 //===== left bottom ===== 3838 #if VSP_MERGE_POS < 4 3839 #if HHI_INTER_VIEW_MOTION_PRED 3840 if( iCount < 4 + extraMergeCand ) 3841 #else 3842 if( iCount < 4 ) 3843 #endif 3844 { 3845 #endif 3730 3846 UInt uiLeftBottomPartIdx = 0; 3731 3847 TComDataCU* pcCULeftBottom = 0; … … 3745 3861 #endif 3746 3862 #if SIMP_MRG_PRUN 3747 if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) 3863 if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) 3864 #if FORCE_REF_VSP 3865 CHECK_ADD_YET(pcCULeftBottom, uiLeftBottomPartIdx) 3866 #endif 3867 && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCULeftBottom, uiLeftBottomPartIdx ) ) ) 3748 3868 #else 3749 3869 if ( pcCULeftBottom && !pcCULeftBottom->isIntra( uiLeftBottomPartIdx ) ) … … 3763 3883 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3764 3884 #endif 3885 #if FORCE_REF_VSP 3886 SET_AOUND_MVINFO(pcCULeftBottom, uiLeftBottomPartIdx) 3887 #endif 3765 3888 #if SIMP_MRG_PRUN 3766 3889 if ( mrgCandIdx == iCount ) … … 3771 3894 iCount ++; 3772 3895 } 3896 #if VSP_MERGE_POS < 4 3897 } 3898 #endif 3773 3899 3774 3900 #if HHI_INTER_VIEW_MOTION_PRED … … 3795 3921 #endif 3796 3922 3797 // above left 3923 #if FORCE_REF_VSP==2 3924 //===== vsp 4 ===== 3925 if( iCount < 4 + extraMergeCand ) 3926 { 3927 if ( !xAddVspSkip(4, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 3928 return; 3929 } 3930 #endif 3931 3932 //===== above left ===== 3798 3933 #if HHI_INTER_VIEW_MOTION_PRED 3799 3934 if( iCount < 4 + extraMergeCand ) … … 3820 3955 #if SIMP_MRG_PRUN 3821 3956 if( pcCUAboveLeft && !pcCUAboveLeft->isIntra( uiAboveLeftPartIdx ) 3957 #if FORCE_REF_VSP 3958 CHECK_ADD_YET(pcCUAboveLeft, uiAboveLeftPartIdx) 3959 #endif 3822 3960 && ( !pcCULeft || pcCULeft->isIntra( uiLeftPartIdx ) || !pcCULeft->hasEqualMotion( uiLeftPartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) 3823 3961 && ( !pcCUAbove || pcCUAbove->isIntra( uiAbovePartIdx ) || !pcCUAbove->hasEqualMotion( uiAbovePartIdx, pcCUAboveLeft, uiAboveLeftPartIdx ) ) … … 3840 3978 pcMvFieldNeighbours[(iCount<<1)+1].getMv().m_bDvMcp = false; 3841 3979 #endif 3980 #if FORCE_REF_VSP 3981 SET_AOUND_MVINFO(pcCUAboveLeft, uiAboveLeftPartIdx) 3982 #endif 3842 3983 #if SIMP_MRG_PRUN 3843 3984 if ( mrgCandIdx == iCount ) … … 3849 3990 } 3850 3991 } 3992 3993 #if FORCE_REF_VSP==2 3994 //===== vsp 5 ===== 3995 #if HHI_INTER_VIEW_MOTION_PRED 3996 if( iCount < 4 + extraMergeCand ) 3997 #else 3998 if( iCount < 4 ) 3999 #endif 4000 { 4001 if ( !xAddVspSkip(5, bVspMvZeroDone, uiDepth, abCandIsInter, iCount, puhInterDirNeighbours, pcMvFieldNeighbours, mrgCandIdx) ) 4002 return; 4003 } 4004 #endif 3851 4005 3852 4006 if ( getSlice()->getPPS()->getEnableTMVPFlag() ) … … 4268 4422 if( uiIter == 0 ) 4269 4423 { 4270 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) ) 4424 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 4425 #if FORCE_REF_VSP==1 4426 && !pcCorner->isVspMode( uiCornerPUIdx ) 4427 #endif 4428 ) 4271 4429 { 4272 4430 rbValidCand = true; … … 4303 4461 else 4304 4462 { 4305 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) ) 4463 if( pcCorner && !pcCorner->isIntra( uiCornerPUIdx ) 4464 #if FORCE_REF_VSP==1 4465 && !pcCorner->isVspMode( uiCornerPUIdx ) 4466 #endif 4467 ) 4306 4468 { 4307 4469 rbValidCand = true; … … 4452 4614 #endif 4453 4615 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4616 #if VSP_N 4617 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4618 #endif 4454 4619 { 4455 4620 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4478 4643 4479 4644 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4645 #if VSP_N 4646 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4647 #endif 4480 4648 { 4481 4649 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4504 4672 #endif 4505 4673 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4674 #if VSP_N 4675 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4676 #endif 4506 4677 { 4507 4678 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4529 4700 #endif 4530 4701 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4702 #if VSP_N 4703 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4704 #endif 4531 4705 { 4532 4706 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4557 4731 #endif 4558 4732 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 4733 #if VSP_N 4734 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4735 #endif 4559 4736 { 4560 4737 for(Int iList = 0; iList < (getSlice()->isInterB() ? 2: 1); iList ++) … … 4768 4945 UInt uiNumPartInCUWidth = m_pcPic->getNumPartInWidth(); 4769 4946 4770 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ º í·°¿¡¼ »ç¿ëµÈ DV¸¦ ÀúÀå4947 Int aiDvMcpDvCand[2][7] = {{0,}, {0,}}; // dummy, 5 spatial + 1 temporal, DV-MCP ÁÖº¯ ºúÓ°¿¡¼ »ç¿EÈ DV¸¦ ÀúÀE 4771 4948 Bool abDvMcpFlag [2][7] = {{false,},{false,}}; 4772 4949 //Int aiRefPOC [2][7] = {{-1,},{-1}}; // debug … … 4788 4965 UInt uiLeftPartIdx = uiIdx; 4789 4966 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 4967 #if VSP_N 4968 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 4969 #endif 4790 4970 { 4791 4971 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 4826 5006 4827 5007 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5008 #if VSP_N 5009 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 5010 #endif 4828 5011 { 4829 5012 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 4863 5046 #endif 4864 5047 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx ) ) 5048 #if VSP_N 5049 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 5050 #endif 4865 5051 { 4866 5052 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 4900 5086 #endif 4901 5087 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5088 #if VSP_N 5089 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 5090 #endif 4902 5091 { 4903 5092 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 4939 5128 #endif 4940 5129 if(pcTmpCU != NULL && !pcTmpCU->isIntra( uiIdx )) 5130 #if VSP_N 5131 if(pcTmpCU->getSlice()->getViewId() != NUM_VIEW_VSP) 5132 #endif 4941 5133 { 4942 5134 bTmpIsSkipped = pcTmpCU->isSkipped( uiIdx ); … … 5551 5743 } 5552 5744 5745 #if FORCE_REF_VSP==2 5746 Int TComDataCU::isVspMode ( UInt uiPartIdx ) 5747 { 5748 if( m_pePredMode[ uiPartIdx ] == MODE_SKIP ) return 0; 5749 if( m_pePredMode[ uiPartIdx ] == MODE_INTRA ) return 0; 5750 5751 Int aiRefIdx[2] = {NOT_VALID, NOT_VALID}, iRet = 0; 5752 for( Int iList = 0; iList < 2; iList++ ) 5753 { 5754 aiRefIdx[iList] = getCUMvField( RefPicList(iList) )->getRefIdx( uiPartIdx ); 5755 if( aiRefIdx[iList] >= 0 && getSlice()->getRefViewId( RefPicList(iList), aiRefIdx[iList] ) == NUM_VIEW_VSP ) 5756 { 5757 iRet |= (iList ? 0x02 : 0x01); // L0=1, L1=2, BI=3 5758 continue; 5759 } 5760 } 5761 5762 return iRet; 5763 } 5764 5765 Int TComDataCU::isVspMode ( UInt uiPartIdx, TComMv cCompMv ) 5766 { 5767 TComMv cMv; 5768 Int iRet = 0, iList = 0; 5769 5770 if( (iList = isVspMode( uiPartIdx )) ) 5771 { 5772 switch( iList ) 5773 { 5774 case 1: 5775 cMv = getCUMvField( RefPicList(0) )->getMv( uiPartIdx ); 5776 if( cMv == cCompMv ) 5777 { 5778 iRet = 1; // L0=1 5779 } 5780 break; 5781 case 2: 5782 cMv = getCUMvField( RefPicList(1) )->getMv( uiPartIdx ); 5783 if( cMv == cCompMv ) 5784 { 5785 iRet = 2; // L1=2 5786 } 5787 break; 5788 case 3: 5789 cMv = getCUMvField( RefPicList(0) )->getMv( uiPartIdx ); 5790 if( cMv == cCompMv ) 5791 { 5792 cMv = getCUMvField( RefPicList(1) )->getMv( uiPartIdx ); 5793 if( cMv == cCompMv ) 5794 { 5795 iRet = 3; // BI=3 5796 } 5797 } 5798 break; 5799 } 5800 } 5801 5802 return iRet; 5803 } 5804 #endif 5805 5553 5806 // ==================================================================================================================== 5554 5807 // Protected member functions … … 5612 5865 } 5613 5866 5867 #if AMVP_VSP_UNAVAILABLE 5868 if( pcTmpCU != NULL && pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP ) 5869 { 5870 return false; 5871 } 5872 #endif 5873 5614 5874 if ( pcTmpCU != NULL && m_pcSlice->isEqualRef(eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx), iRefIdx) ) 5615 5875 { … … 5713 5973 TComDataCU* pcTmpCU = NULL; 5714 5974 UInt uiIdx; 5975 #if VSP_N 5976 Bool bRefVsp = false; 5977 #endif 5715 5978 switch( eDir ) 5716 5979 { … … 5770 6033 return false; 5771 6034 } 6035 6036 #if AMVP_VSP_UNAVAILABLE 6037 if( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP ) 6038 { 6039 return false; 6040 } 6041 #endif 5772 6042 5773 6043 RefPicList eRefPicList2nd = REF_PIC_LIST_0; … … 5815 6085 } 5816 6086 6087 #if VSP_N 6088 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP ) 6089 { 6090 bRefVsp = true; 6091 } 6092 Int iScale = bRefVsp ? 4096 : xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC ); 6093 #else 5817 6094 Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC ); 6095 #endif 5818 6096 if ( iScale == 4096 ) 5819 6097 { … … 5842 6120 } 5843 6121 6122 #if VSP_N 6123 if( pcTmpCU->getSlice()->getRefViewId( eRefPicList2nd, pcTmpCU->getCUMvField(eRefPicList2nd)->getRefIdx(uiIdx) ) == NUM_VIEW_VSP ) 6124 { 6125 bRefVsp = true; 6126 } 6127 Int iScale = bRefVsp ? 4096 : xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC ); 6128 #else 5844 6129 Int iScale = xGetDistScaleFactor( iCurrPOC, iCurrRefPOC, iNeibPOC, iNeibRefPOC ); 6130 #endif 5845 6131 if ( iScale == 4096 ) 5846 6132 { … … 5875 6161 Int iColViewIdx, iColRefViewIdx; 5876 6162 TComPic *pColPic = getSlice()->getRefPic( eRefPicList, refidx); 6163 #if VSP_MV_ZERO // shimizu 5877 6164 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 5878 6165 iColViewIdx = pColCU->getSlice()->getViewId(); 5879 6166 #if VSP_N 6167 if( iColViewIdx == NUM_VIEW_VSP ) 6168 { 6169 return false; 6170 } 6171 #endif 6172 #else 6173 #if VSP_N 6174 if( pColPic->getSlice(0)->getViewId() == NUM_VIEW_VSP ) 6175 { 6176 return false; 6177 } 6178 #endif 6179 TComDataCU *pColCU = pColPic->getCU( uiCUAddr ); 6180 iColViewIdx = pColCU->getSlice()->getViewId(); 6181 #endif 5880 6182 5881 6183 if (pColCU->getPic()==0||pColCU->getPartitionSize(uiPartUnitIdx)==SIZE_NONE||pColCU->isIntra(uiAbsPartAddr)) … … 5904 6206 5905 6207 iColRefViewIdx = pColCU->getSlice()->getRefPic(eColRefPicList, iColRefIdx)->getViewId(); 6208 #if VSP_N 6209 if( iColRefViewIdx == NUM_VIEW_VSP ) 6210 { 6211 continue; 6212 } 6213 #endif 5906 6214 5907 6215 if ( iColViewIdx == iColRefViewIdx ) // temporal vector … … 6040 6348 iScale = 0; 6041 6349 iCurrRefViewOrderIdx = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewOrderIdx(); 6350 #if VSP_N 6351 // UInt uiColRefViewId = pColCU->getSlice()->getRefPic( eColRefPicList, pColCU->getCUMvField(eColRefPicList)->getRefIdx(uiAbsPartAddr))->getViewId(); 6352 UInt uiCurRefViewId = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getViewId(); 6353 if( uiCurRefViewId == NUM_VIEW_VSP ) 6354 iScale = 4096; 6355 else 6356 #endif 6042 6357 if((iColPOC != iColRefPOC)&&(iCurrPOC != iCurrRefPOC)) 6043 6358 iScale = xGetDistScaleFactor(iCurrPOC, iCurrRefPOC, iColPOC, iColRefPOC); … … 6052 6367 if ( iScale == 4096 ) 6053 6368 { 6369 #if VSP_MV_ZERO 6370 if( uiCurRefViewId == NUM_VIEW_VSP ) 6371 rcMv.setZero(); 6372 else 6373 #endif 6054 6374 rcMv = cColMv; 6055 6375 } … … 6151 6471 return false; 6152 6472 } 6473 6474 #if VSP_N //?? 6475 if (pColCU->isSkipped(uiPartIdxCenter)) 6476 return false; 6477 #endif 6153 6478 6154 6479 if( m_pcSlice->getRefPic( eRefPicList, iRefIdx )->getViewId() != m_pcSlice->getViewId() ) … … 7705 8030 7706 8031 //! \} 8032
Note: See TracChangeset for help on using the changeset viewer.