Changeset 166 in 3DVCSoftware for branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon
- Timestamp:
- 1 Nov 2012, 19:22:41 (12 years ago)
- Location:
- branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon
- Files:
-
- 2 added
- 16 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/CommonDef.h
r134 r166 110 110 #define MAX_GOP 64 ///< max. value of hierarchical GOP size 111 111 112 #if VSP_N 113 #define MAX_NUM_REF 5 ///< max. value of multiple reference frames 114 #define MAX_NUM_REF_LC 10 ///< max. value of combined reference frames 115 #else 112 116 #define MAX_NUM_REF 4 ///< max. value of multiple reference frames 113 117 #define MAX_NUM_REF_LC 8 ///< max. value of combined reference frames 118 #endif 114 119 115 120 #define MAX_UINT 0xFFFFFFFFU ///< max. value of unsigned 32-bit integer -
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 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDataCU.h
r100 r166 265 265 Bool xAddMVPCand ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 266 266 Bool xAddMVPCandOrder ( AMVPInfo* pInfo, RefPicList eRefPicList, Int iRefIdx, UInt uiPartUnitIdx, MVP_DIR eDir ); 267 #if FORCE_REF_VSP==2 268 inline bool xAddVspSkip(UChar ucVspMergePos, Bool bVspMvZeroDone, UInt uiDepth, Bool* abCandIsInter, Int& iCount, 269 UChar* puhInterDirNeighbours, TComMvField* pcMvFieldNeighbours, Int mrgCandIdx); 270 #endif 267 271 268 272 Void deriveRightBottomIdx ( PartSize eCUMode, UInt uiPartIdx, UInt& ruiPartIdxRB ); … … 656 660 Bool isIntra ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_INTRA; } 657 661 Bool isSkipped ( UInt uiPartIdx ); ///< SKIP (no residual) 662 #if FORCE_REF_VSP==1 663 Int isVspMode ( UInt uiPartIdx ) { return m_pePredMode[ uiPartIdx ] == MODE_SYNTH; } 664 #elif FORCE_REF_VSP==2 665 Int isVspMode ( UInt uiPartIdx ); 666 Int isVspMode ( UInt uiPartIdx, TComMv cCompMv ); 667 #endif 658 668 659 669 // ------------------------------------------------------------------------------------------------------------------- -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.cpp
r100 r166 562 562 m_cTmpPic.dump( acFilename, ( pcPic->getPOC() != 0 ) ); 563 563 } 564 565 #if VSP_N 566 Void 567 TComDepthMapGenerator::clearDepthMap( TComPic* pcPic, Int iVal/*=PDM_UNDEFINED_DEPTH*/ ) 568 { 569 xClearDepthMap( pcPic, iVal ); 570 } 571 #endif 564 572 #endif 565 573 … … 733 741 Int iNumRefPics = pcSlice->getNumRefIdx( eRefPicList ); 734 742 for( Int iPdmRefIdx = 0; iPdmRefIdx < iNumRefPics; iPdmRefIdx++ ) 735 { 743 { 744 #if VSP_N 745 if( pcSlice->getRefViewId( eRefPicList, iPdmRefIdx ) != NUM_VIEW_VSP ) 746 #endif 736 747 if( pcSlice->getRefPOC( eRefPicList, iPdmRefIdx ) == pcSlice->getPOC()) 737 748 { … … 834 845 Int iRefPoc = pcRefPic->getPOC(); 835 846 Bool bInterview = ( uiRefViewId < m_uiCurrViewId ); 847 #if VSP_N 848 Bool bVsp = ( pcRefPic->getViewId() == NUM_VIEW_VSP ); 849 AOT( bInterview && bVsp && iRefPoc != pcSlice->getPOC() ); 850 AOT( !bInterview && !bVsp && iRefPoc == pcSlice->getPOC() ); 851 #else 836 852 AOT( bInterview && iRefPoc != pcSlice->getPOC() ); 837 853 AOT( !bInterview && iRefPoc == pcSlice->getPOC() ); 854 #endif 855 856 #if FORCE_REF_VSP 857 if( bVsp ) return false; 858 #endif 859 838 860 Bool bPdmIView = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW ); 839 861 Bool bPdmInter = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_INTER ) == PDM_USE_FOR_INTER ); … … 924 946 Int iRefPoc = pcRefPic->getPOC(); 925 947 Bool bInterview = ( uiRefViewId < m_uiCurrViewId ); 948 #if VSP_N 949 Bool bVsp = ( pcRefPic->getViewId() == NUM_VIEW_VSP ); 950 AOT( bInterview && bVsp && iRefPoc != pcSlice->getPOC() ); 951 AOT( !bInterview && !bVsp && iRefPoc == pcSlice->getPOC() ); 952 #else 926 953 AOT( bInterview && iRefPoc != pcSlice->getPOC() ); 927 954 AOT( !bInterview && iRefPoc == pcSlice->getPOC() ); 955 #endif 956 957 #if FORCE_REF_VSP 958 if( bVsp ) return false; 959 #endif 928 960 929 961 Bool bPdmIView = ( ( pcSPS->getMultiviewMvPredMode() & PDM_USE_FOR_IVIEW ) == PDM_USE_FOR_IVIEW ); … … 1351 1383 xInterPredictCUDepthMap( pcSubCU, pcSubDM ); 1352 1384 break; 1385 #if FORCE_REF_VSP==1 1386 case MODE_SYNTH: 1387 xIntraPredictCUDepthMap( pcSubCU, pcSubDM ); //What to do? Need Fix! 1388 break; 1389 #endif 1353 1390 default: 1354 1391 AOT( true ); … … 1464 1501 aiCurrRefIdx[1] >= 0 && pcCU->getSlice()->getRefPic( REF_PIC_LIST_1, aiCurrRefIdx[1] )->getSPS()->getViewId() != m_uiCurrViewId }; 1465 1502 Bool bUsesInterViewPrd = ( abCurrIntView[0] || abCurrIntView[1] ); 1503 #if VSP_N 1504 if(( aiCurrRefIdx[0] >= 0 && pcCU->getSlice()->getRefPic( REF_PIC_LIST_0, aiCurrRefIdx[0] )->getViewId() == NUM_VIEW_VSP ) || 1505 ( aiCurrRefIdx[1] >= 0 && pcCU->getSlice()->getRefPic( REF_PIC_LIST_1, aiCurrRefIdx[1] )->getViewId() == NUM_VIEW_VSP )) { 1506 //if refpic is VSP, copy to Original cuurent PDM 1507 TComPicYuv* pcPdm = pcCU->getPic()->getPredDepthMap(); 1508 UInt uiZOrderIdx = pcCU->getZorderIdxInCU() + uiAbsPartIdx; 1509 assert( pcPdm ); 1510 pcCUDepthMap->copyFromPicYuv( pcPdm, pcCU->getAddr(), uiZOrderIdx ); 1511 } 1512 #endif 1466 1513 if( bUsesInterViewPrd ) 1467 1514 { -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComDepthMapGenerator.h
r100 r166 140 140 Void updateDepthMap ( TComPic* pcPic ); 141 141 Void dumpDepthMap ( TComPic* pcPic, char* pFilenameBase ); 142 #if VSP_N 143 Void clearDepthMap ( TComPic* pcPic, Int iVal = PDM_UNDEFINED_DEPTH); 144 #endif 142 145 #endif 143 146 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComLoopFilter.cpp
r56 r166 439 439 440 440 //-- Set BS for Intra MB : BS = 4 or 3 441 if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) ) 441 if ( pcCUP->isIntra(uiPartP) || pcCUQ->isIntra(uiPartQ) 442 #if FORCE_REF_VSP==1 443 || pcCUP->isVspMode(uiPartP) || pcCUQ->isVspMode(uiPartQ) 444 #endif 445 ) 442 446 { 443 447 uiBs = 2; … … 445 449 446 450 //-- Set BS for not Intra MB : BS = 2 or 1 or 0 447 if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) ) 451 if ( !pcCUP->isIntra(uiPartP) && !pcCUQ->isIntra(uiPartQ) 452 #if FORCE_REF_VSP==1 453 && !pcCUP->isVspMode(uiPartP) && !pcCUQ->isVspMode(uiPartQ) 454 #endif 455 ) 448 456 { 449 457 #if NSQT_LFFIX … … 542 550 } // enf of "if( not Intra )" 543 551 552 #if FORCE_REF_VSP==1 553 if ( pcCUP->isVspMode(uiPartP) || pcCUQ->isVspMode(uiPartQ)) 554 { 555 uiBs = 0; 556 } 557 #endif 558 544 559 m_aapucBS[iDir][uiAbsPartIdx] = uiBs; 545 560 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.cpp
r100 r166 53 53 m_apcPicYuv[0] = NULL; 54 54 m_apcPicYuv[1] = NULL; 55 #if VSP_N 56 m_apcPicYuvAvail = NULL; 57 m_apcPicYuvSynth = NULL; 58 #endif 55 59 #if DEPTH_MAP_GENERATION 56 60 m_pcPredDepthMap = NULL; … … 64 68 #if HHI_INTER_VIEW_RESIDUAL_PRED 65 69 m_pcResidual = NULL; 70 #endif 71 #if DEBUGIMGOUT 72 m_acPicYuvDebug = NULL; 66 73 #endif 67 74 m_pcPicYuvPred = NULL; … … 95 102 } 96 103 m_apcPicYuv[1] = new TComPicYuv; m_apcPicYuv[1]->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 97 104 #if DEBUGIMGOUT 105 m_acPicYuvDebug = new TComPicYuv; m_acPicYuvDebug->create( iWidth, iHeight, uiMaxWidth, uiMaxHeight, uiMaxDepth ); 106 #endif 107 98 108 /* there are no SEI messages associated with this picture initially */ 99 109 m_SEIs = NULL; … … 162 172 delete m_pcResidual; 163 173 m_pcResidual = NULL; 174 } 175 #endif 176 #if DEBUGIMGOUT 177 if (m_acPicYuvDebug) 178 { 179 m_acPicYuvDebug->destroy(); 180 delete m_acPicYuvDebug; 181 m_acPicYuvDebug = NULL; 164 182 } 165 183 #endif … … 623 641 } 624 642 643 #if VSP_N 644 Void TComPic::checkSynthesisAvailability( /*TComDataCU*& rpcCU, */UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied ) 645 { 646 rpbCUSynthesied[0] = true; 647 rpbCUSynthesied[1] = true; 648 rpbCUSynthesied[2] = true; 649 rpbCUSynthesied[3] = true; 650 651 if (!getPicYuvAvail()) 652 { 653 rpbCUSynthesied[0] = false; 654 rpbCUSynthesied[1] = false; 655 rpbCUSynthesied[2] = false; 656 rpbCUSynthesied[3] = false; 657 return; 658 } 659 660 Int x, y; 661 Pel* pAvail = getPicYuvAvail()->getLumaAddr ( iCuAddr, uiAbsZorderIdx ); 662 Int CUHeight = g_uiMaxCUHeight >> uiPartDepth; //rpcCU->getHeight(uiAbsZorderIdx); 663 Int CUWidth = g_uiMaxCUWidth >> uiPartDepth; //rpcCU->getWidth(uiAbsZorderIdx); 664 665 Int iStride = getPicYuvAvail()->getStride(); 666 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) 667 { 668 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 669 { 670 rpbCUSynthesied[0] &= (pAvail[x] != 0); 671 } 672 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 673 { 674 rpbCUSynthesied[1] &= (pAvail[x] != 0); 675 } 676 pAvail += iStride; 677 } 678 //for ( y = CUHeight - 1; y >= ((CUHeight) >> 1); y-- ) 679 for ( y = ((CUHeight - 1) >> 1); y >= 0; y-- ) //Owieczka 680 { 681 for ( x = ((CUWidth - 1) >> 1); x >= 0; x-- ) 682 { 683 rpbCUSynthesied[2] &= (pAvail[x] != 0); 684 } 685 for ( x = CUWidth - 1; x >= ((CUWidth) >> 1); x-- ) 686 { 687 rpbCUSynthesied[3] &= (pAvail[x] != 0); 688 } 689 pAvail += iStride; 690 } 691 692 //rpbCUSynthesied[0] = !rpbCUSynthesied[0]; 693 //rpbCUSynthesied[1] = !rpbCUSynthesied[1]; 694 //rpbCUSynthesied[2] = !rpbCUSynthesied[2]; 695 //rpbCUSynthesied[3] = !rpbCUSynthesied[3]; 696 } 697 #endif 625 698 626 699 //! \} -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPic.h
r100 r166 65 65 TComPicYuv* m_apcPicYuv[2]; // Texture, 0:org / 1:rec 66 66 67 #if VSP_N 68 TComPicYuv* m_apcPicYuvAvail; // Availability Map - Does the given pixel can be synthesised in receiver 69 TComPicYuv* m_apcPicYuvSynth; // Sythesied image 70 #endif 71 67 72 #if DEPTH_MAP_GENERATION 68 73 TComPicYuv* m_pcPredDepthMap; // estimated depth map … … 85 90 #if HHI_INTER_VIEW_RESIDUAL_PRED 86 91 TComPicYuv* m_pcResidual; // residual buffer (coded or inter-view predicted residual) 92 #endif 93 #if DEBUGIMGOUT 94 TComPicYuv* m_acPicYuvDebug; // debug image 87 95 #endif 88 96 … … 145 153 TComPicYuv* getPicYuvOrg() { return m_apcPicYuv[0]; } 146 154 TComPicYuv* getPicYuvRec() { return m_apcPicYuv[1]; } 155 #if VSP_N 156 Void setPicYuvAvail( TComPicYuv* pc ){ m_apcPicYuvAvail = pc; } 157 Void setPicYuvSynth( TComPicYuv* pc ){ m_apcPicYuvSynth = pc; } 158 TComPicYuv* getPicYuvAvail() { return m_apcPicYuvAvail; } 159 TComPicYuv* getPicYuvSynth() { return m_apcPicYuvSynth; } 160 Void checkSynthesisAvailability( /*TComDataCU*& rpcBestCU, */UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth, Bool *&rpbCUSynthesied); 161 #endif 147 162 #if HHI_INTERVIEW_SKIP 148 163 TComPicYuv* getUsedPelsMap() { return m_pcUsedPelsMap; } … … 168 183 #if HHI_INTER_VIEW_RESIDUAL_PRED 169 184 TComPicYuv* getResidual() { return m_pcResidual; } 185 #endif 186 187 #if DEBUGIMGOUT 188 TComPicYuv* getPicYuvRecDbg() { return m_acPicYuvDebug; } 170 189 #endif 171 190 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicSym.cpp
r56 r166 97 97 m_puiInverseCUOrderMap[i] = i; 98 98 } 99 100 #if VSP_N 101 m_apcTComTile = NULL; 102 #endif 99 103 } 100 104 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPicYuv.h
r56 r166 184 184 Void setChromaTo ( Pel pVal ); 185 185 186 #if DEBUGIMGOUT 187 // Degub tools 188 public: 189 Void colsetToPicYuv ( const UChar ucColor[3], Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 190 Void colsetToPicLuma ( const UChar ucLumaOffCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 191 Void colsetToPicChroma( const UChar ucUCol, const UChar ucVCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 192 Void drawLineToPicYuv ( bool bHor, bool bVer, UInt uiSize, TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 193 #endif 194 186 195 };// END CLASS DEFINITION TComPicYuv 187 196 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComPrediction.h
r100 r166 95 95 Void xPredInterPrdDepthMap ( TComDataCU* pcCU, TComPicYuv* pcPicYuvRef, UInt uiPartAddr, TComMv* pcMv, Int iWidth, Int iHeight, TComYuv*& rpcYuv, UInt uiRShift, UInt uiOffset ); 96 96 #endif 97 98 97 #if DEPTH_MAP_GENERATION 99 98 Void xWeightedAveragePdm ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst, UInt uiSubSampExpX, UInt uiSubSampExpY ); … … 103 102 Void xPredInterChromaBlk( TComDataCU *cu, TComPicYuv *refPic, UInt partAddr, TComMv *mv, Int width, Int height, TComYuv *&dstPic, Bool bi ); 104 103 Void xWeightedAverage ( TComDataCU* pcCU, TComYuv* pcYuvSrc0, TComYuv* pcYuvSrc1, Int iRefIdx0, Int iRefIdx1, UInt uiPartAddr, Int iWidth, Int iHeight, TComYuv*& rpcYuvDst ); 105 104 106 105 Void xGetLLSPrediction ( TComPattern* pcPattern, Int* pSrc0, Int iSrcStride, Pel* pDst0, Int iDstStride, UInt uiWidth, UInt uiHeight, UInt uiExt0 ); 107 106 … … 142 141 Void motionCompensation ( TComDataCU* pcCU, TComYuv* pcYuvPred, RefPicList eRefPicList = REF_PIC_LIST_X, Int iPartIdx = -1 ); 143 142 #endif 144 143 145 144 // motion vector prediction 146 145 Void getMvPredAMVP ( TComDataCU* pcCU, UInt uiPartIdx, UInt uiPartAddr, RefPicList eRefPicList, Int iRefIdx, TComMv& rcMvPred ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComResidualGenerator.cpp
r100 r166 390 390 xSetRecResidualInterCU( pcSubCU, pcSubRes ); 391 391 break; 392 #if FORCE_REF_VSP==1 393 case MODE_SYNTH: 394 xSetRecResidualIntraCU( pcSubCU, pcSubRes ); //MayBe it should be seperate function 395 break; 396 #endif 392 397 default: 393 398 AOT( true ); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.cpp
r101 r166 114 114 { 115 115 m_aiNumRefIdx[0] = m_aiNumRefIdx[1] = m_aiNumRefIdx[2] = 0; 116 117 #if FORCE_REF_VSP 118 m_iRefIdxVsp[0] = m_iRefIdxVsp[1] = NOT_VALID; 119 #endif 116 120 117 121 initEqualRef(); … … 139 143 resetWpScalingLC(m_weightPredTableLC); 140 144 initWpAcDcParam(); 145 146 #if VSP_SLICE_HEADER 147 m_bVspFlag = false; 148 #endif 141 149 } 142 150 … … 185 193 m_numEntryPointOffsets = 0; 186 194 #endif 195 #if VSP_SLICE_HEADER 196 m_bVspFlag = false; 197 #endif 198 187 199 } 188 200 … … 407 419 } 408 420 421 #if VSP_N 422 Void TComSlice::setRefPicListMvc( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics, TComPic* pcVspPic ) 423 #else 409 424 Void TComSlice::setRefPicListMvc( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics ) 425 #endif 410 426 { 411 427 if( m_eSliceType == I_SLICE ) … … 422 438 TComPic* RefPicSetLtCurr [16]; 423 439 TComPic* RefPicSetIvCurr [16]; 440 #if VSP_N 441 TComPic* RefPicSetVspCurr [16] = {NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL}; //for Linux comp 442 #endif 424 443 425 444 UInt NumPocStCurr0 = 0; … … 427 446 UInt NumPocLtCurr = 0; 428 447 UInt NumPocIvCurr = 0; 448 #if VSP_N 449 UInt NumPocVspCurr = 0; 450 #endif 429 451 430 452 Int i; … … 474 496 NumPocIvCurr++; 475 497 } 498 #if VSP_N 499 if( pcVspPic ) 500 { 501 pcRefPic = pcVspPic; 502 pcRefPic->setIsLongTerm( 0 ); 503 pcRefPic->getPicYuvRec()->extendPicBorder(); 504 RefPicSetVspCurr[NumPocVspCurr] = pcRefPic; 505 NumPocVspCurr++; 506 } 507 #endif 476 508 477 509 // ref_pic_list_init … … 481 513 482 514 assert( (NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + NumPocIvCurr) == getNumPocTotalCurrMvc() ); 515 #if VSP_N 516 Int numRpsCurrTempList0 = max( (num_ref_idx_l0_active_minus1 + 1), (NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + NumPocIvCurr + NumPocVspCurr) ); 517 Int numRpsCurrTempList1 = max( (num_ref_idx_l1_active_minus1 + 1), (NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + NumPocIvCurr + NumPocVspCurr) ); 518 #else 483 519 Int numRpsCurrTempList0 = max( (num_ref_idx_l0_active_minus1 + 1), (NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + NumPocIvCurr) ); 484 520 Int numRpsCurrTempList1 = max( (num_ref_idx_l1_active_minus1 + 1), (NumPocStCurr0 + NumPocStCurr1 + NumPocLtCurr + NumPocIvCurr) ); 521 #endif 485 522 486 523 assert( numRpsCurrTempList0 <= 16 ); … … 509 546 for( cIdx = 0; cIdx <= num_ref_idx_l0_active_minus1; cIdx ++ ) 510 547 { 548 #if VSP_N 549 if( pcVspPic && cIdx == num_ref_idx_l0_active_minus1 ) 550 { 551 m_apcRefPicList[0][cIdx] = RefPicSetVspCurr[0]; 552 #if FORCE_REF_VSP 553 m_iRefIdxVsp[0] = cIdx; 554 #endif 555 } 556 else 557 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; 558 #else 511 559 m_apcRefPicList[0][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL0() ? refPicListTemp0[ m_RefPicListModification.getRefPicSetIdxL0(cIdx) ] : refPicListTemp0[cIdx]; 560 #endif 512 561 } 513 562 if( m_eSliceType == P_SLICE ) … … 520 569 for( cIdx = 0; cIdx <= num_ref_idx_l1_active_minus1; cIdx ++ ) 521 570 { 571 #if VSP_N 572 if( pcVspPic && cIdx == num_ref_idx_l1_active_minus1 ) 573 { 574 m_apcRefPicList[1][cIdx] = RefPicSetVspCurr[0]; 575 #if FORCE_REF_VSP 576 m_iRefIdxVsp[1] = cIdx; 577 #endif 578 } 579 else 580 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; 581 #else 522 582 m_apcRefPicList[1][cIdx] = m_RefPicListModification.getRefPicListModificationFlagL1() ? refPicListTemp1[ m_RefPicListModification.getRefPicSetIdxL1(cIdx) ] : refPicListTemp1[cIdx]; 583 #endif 523 584 } 524 585 } -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComSlice.h
r101 r166 45 45 #include "TComRom.h" 46 46 #include "TComList.h" 47 48 47 //! \ingroup TLibCommon 49 48 //! \{ … … 1269 1268 1270 1269 #if SONY_COLPIC_AVAILABILITY 1271 Int m_iViewOrderIdx; 1270 Int m_iViewOrderIdx; 1271 #endif 1272 1273 #if FORCE_REF_VSP 1274 Int m_iRefIdxVsp[2]; // L0/L1 1275 #endif 1276 1277 #if VSP_SLICE_HEADER 1278 Bool m_bVspFlag; 1272 1279 #endif 1273 1280 … … 1411 1418 Int getNumPocTotalCurr(); 1412 1419 Int getNumPocTotalCurrMvc(); 1420 #if VSP_N 1421 Void setRefPicListMvc ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics, TComPic* pcVspPic ); 1422 #else 1413 1423 Void setRefPicListMvc ( TComList<TComPic*>& rcListPic, std::vector<TComPic*>& rapcInterViewRefPics ); 1424 #endif 1414 1425 Void setRefPOCnViewListsMvc(); 1415 1426 … … 1565 1576 Int* getInvCodedOffset () { return m_aaiCodedOffset[1]; } 1566 1577 1578 #if FORCE_REF_VSP 1579 Void setRefIdxVsp ( Int idx, Int refList ) { m_iRefIdxVsp[refList] = idx; } 1580 Int getRefIdxVsp ( Int refList ) { return m_iRefIdxVsp[refList]; } 1581 #endif 1582 1583 #if VSP_SLICE_HEADER 1584 Void setVspFlag ( Bool val ) { m_bVspFlag = val; } 1585 Bool getVspFlag () { return m_bVspFlag; } 1586 #endif 1587 1567 1588 protected: 1568 1589 TComPic* xGetRefPic (TComList<TComPic*>& rcListPic, UInt uiPOC); -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TComYuv.h
r100 r166 213 213 214 214 __inline Pel xClip (Pel x ) { return ( (x < 0) ? 0 : (x > (Pel)g_uiIBDI_MAX) ? (Pel)g_uiIBDI_MAX : x ); } 215 216 #if DEBUGIMGOUT 217 public: 218 Void colsetToPicYuv ( const UChar ucColor[3], Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 219 Void colsetToPicLuma ( const UChar ucLumaOffCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 220 Void colsetToPicChroma( const UChar ucUCol, const UChar ucVCol, Int iOffset[2][2], TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 221 Void drawLineToPicYuv ( bool bHor, bool bVer, UInt uiSize, TComPicYuv* pcPicYuvDst, UInt iCuAddr, UInt uiAbsZorderIdx, UInt uiPartDepth = 0, UInt uiPartIdx = 0 ); 222 #endif 223 215 224 };// END CLASS DEFINITION TComYuv 216 225 -
branches/HTM-4.0.1-VSP-dev0/source/Lib/TLibCommon/TypeDef.h
r133 r166 42 42 //! \{ 43 43 44 #define VSP_N 1 45 #if VSP_N 46 #define VSP_TEXT_ONLY 1 47 #define NUM_VIEW_VSP 99 48 #define VSP_N_DUMP 0 49 #define FORCE_REF_VSP 2 // 0=NotUseVSPSKIP 1:VSPSKIPforFlag 2:VSPSKIPforMergeIdx 50 #define VSP_MV_ZERO 0 // use zero vector for VSP 51 #if VSP_MV_ZERO 52 #define AMVP_VSP_UNAVAILABLE 1 53 #endif 54 #define VSP_MERGE_POS 5 // position of vsp in merge list (0..5) 55 #define NTT_SUBPEL 1 56 #endif 57 #define DEBUGIMGOUT 0 //Debug YUVImage Out 58 #define DEBUGLOGOUT 0 //Debug Log Out 59 60 #define VSP_SLICE_HEADER 1 61 #define VSP_FRAME_INTERVAL 2 62 44 63 #define FIXES 1 45 64 #define POZNAN_CABAC_INIT_FLAG_FIX 1 … … 115 134 #define HHI_FULL_PEL_DEPTH_MAP_MV_ACC 1 // full-pel mv accuracy for depth maps 116 135 117 #if HHI_INTER_VIEW_MOTION_PRED 136 #if HHI_INTER_VIEW_MOTION_PRED 118 137 #define SAIT_IMPROV_MOTION_PRED_M24829 1 // improved inter-view motion vector prediction 119 138 #else … … 727 746 MODE_INTER, ///< inter-prediction mode 728 747 MODE_INTRA, ///< intra-prediction mode 748 #if FORCE_REF_VSP==1 749 MODE_SYNTH, ///< synth-mode 750 #endif 729 751 MODE_NONE = 15 730 752 };
Note: See TracChangeset for help on using the changeset viewer.