Changeset 1259 in 3DVCSoftware for branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source
- Timestamp:
- 23 Jun 2015, 03:55:51 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib
- Files:
-
- 22 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComDataCU.cpp
r1255 r1259 131 131 m_piVSPFlag = NULL; 132 132 #endif 133 #if H_3D_SPIVMP133 #if NH_3D_SPIVMP 134 134 m_pbSPIVMPFlag = NULL; 135 135 #endif … … 188 188 m_piVSPFlag = (Char* )xMalloc(Char, uiNumPartition); 189 189 #endif 190 #if H_3D_SPIVMP190 #if NH_3D_SPIVMP 191 191 m_pbSPIVMPFlag = (Bool* )xMalloc(Bool, uiNumPartition); 192 192 #endif … … 379 379 } 380 380 #endif 381 #if H_3D_SPIVMP381 #if NH_3D_SPIVMP 382 382 if ( m_pbSPIVMPFlag ) { xFree(m_pbSPIVMPFlag); m_pbSPIVMPFlag = NULL; } 383 383 #endif … … 630 630 memset( m_piVSPFlag , 0, m_uiNumPartition * sizeof( *m_piVSPFlag ) ); 631 631 #endif 632 #if H_3D_SPIVMP633 m_pbSPIVMPFlag[ui] = pcFrom->m_pbSPIVMPFlag[ui];632 #if NH_3D_SPIVMP 633 memset( m_pbSPIVMPFlag , 0, m_uiNumPartition * sizeof( *m_pbSPIVMPFlag ) ); 634 634 #endif 635 635 #if H_3D_DIM_SDC … … 642 642 memset( m_bDISFlag + firstElement, false, numElements * sizeof( *m_bDISFlag ) ); 643 643 memset( m_uiDISType + firstElement, 0, numElements * sizeof( *m_uiDISType) ); 644 #endif645 #if H_3D_SPIVMP646 memset( m_pbSPIVMPFlag + firstElement, 0, numElements * sizeof( *m_pbSPIVMPFlag ) );647 644 #endif 648 645 … … 799 796 m_piVSPFlag[ui] = 0; 800 797 #endif 801 #if H_3D_SPIVMP802 798 #if NH_3D_SPIVMP 799 m_pbSPIVMPFlag[ui] = 0; 803 800 #endif 804 801 … … 900 897 memset( m_piVSPFlag, 0, sizeof( Char ) * m_uiNumPartition ); 901 898 #endif 902 #if H_3D_SPIVMP899 #if NH_3D_SPIVMP 903 900 memset( m_pbSPIVMPFlag, 0, sizeof( Bool ) * m_uiNumPartition ); 904 901 #endif … … 981 978 m_pDvInfo[ ui ] = pcCU->m_pDvInfo[uiPartOffset+ui]; 982 979 #endif 983 #if H_3D_SPIVMP984 980 #if NH_3D_SPIVMP 981 m_pbSPIVMPFlag[ui]=pcCU->m_pbSPIVMPFlag[uiPartOffset+ui]; 985 982 #endif 986 983 #if H_3D_ARP … … 1088 1085 m_piVSPFlag = pcCU->getVSPFlag() + uiPart; 1089 1086 #endif 1090 #if H_3D_SPIVMP1087 #if NH_3D_SPIVMP 1091 1088 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiPart; 1092 1089 #endif … … 1243 1240 m_pDvInfo = pcCU->getDvInfo() + uiAbsPartIdx; 1244 1241 #endif 1245 #if H_3D_SPIVMP1242 #if NH_3D_SPIVMP 1246 1243 m_pbSPIVMPFlag = pcCU->getSPIVMPFlag() + uiAbsPartIdx; 1247 1244 #endif … … 1301 1298 memcpy( m_pDvInfo + uiOffset, pcCU->getDvInfo(), sizeof( *m_pDvInfo ) * uiNumPartition ); 1302 1299 #endif 1303 #if H_3D_SPIVMP1300 #if NH_3D_SPIVMP 1304 1301 memcpy( m_pbSPIVMPFlag + uiOffset, pcCU->getSPIVMPFlag(), sizeof( Bool ) * uiNumPartition ); 1305 1302 #endif … … 1427 1424 memcpy( pCtu->getVSPFlag() + m_absZIdxInCtu, m_piVSPFlag, sizeof( Char ) * m_uiNumPartition ); 1428 1425 #endif 1429 #if H_3D_SPIVMP1430 memcpy( rpcCU->getSPIVMPFlag() + m_uiAbsIdxInLCU, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition );1426 #if NH_3D_SPIVMP 1427 memcpy( pCtu->getSPIVMPFlag() + m_absZIdxInCtu, m_pbSPIVMPFlag, sizeof( Bool ) * m_uiNumPartition ); 1431 1428 #endif 1432 1429 … … 2494 2491 } 2495 2492 2496 #if H_3D_SPIVMP2493 #if NH_3D_SPIVMP 2497 2494 Void TComDataCU::setSPIVMPFlagSubParts( Bool bSPIVMPFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2498 2495 { … … 3123 3120 dirVSP = (predFlag[0] | (predFlag[1] << 1)); 3124 3121 m_mergCands[MRG_VSP].setCand( mvVSP, dirVSP, true 3125 #if H_3D_SPIVMP3122 #if NH_3D_SPIVMP 3126 3123 , false 3127 3124 #endif … … 3138 3135 #endif 3139 3136 3140 #if H_3D_IV_MERGE3137 #if NH_3D_IV_MERGE 3141 3138 inline Bool TComDataCU::xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ) 3142 3139 { … … 3202 3199 , Int* vspFlag 3203 3200 #endif 3204 #if H_3D_SPIVMP3201 #if NH_3D_SPIVMP 3205 3202 , Bool* pbSPIVMPFlag 3206 3203 #endif … … 3238 3235 , vspFlag 3239 3236 #endif 3240 #if H_3D_SPIVMP3237 #if NH_3D_SPIVMP 3241 3238 , pbSPIVMPFlag 3242 3239 #endif … … 3292 3289 */ 3293 3290 Void TComDataCU::xGetInterMergeCandidates( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 3294 #if H_3D_SPIVMP3291 #if NH_3D_SPIVMP 3295 3292 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3296 3293 #endif … … 3298 3295 ) 3299 3296 { 3300 #if H_3D_IV_MERGE3297 #if NH_3D_IV_MERGE 3301 3298 TComMv cZeroMv; 3302 3299 #endif … … 3307 3304 //////// GET DISPARITIES //////// 3308 3305 ////////////////////////////////// 3309 #if H_3D_IV_MERGE3306 #if NH_3D_IV_MERGE 3310 3307 DisInfo cDisInfo = getDvInfo(uiAbsPartIdx); 3311 3308 m_cDefaultDisInfo = cDisInfo; … … 3335 3332 Bool bIsDepth = getSlice()->getIsDepth(); 3336 3333 #endif 3334 #if NH_3D_IV_MERGE 3335 Bool bIsDepth = getSlice()->getIsDepth(); 3336 #endif 3337 3337 3338 3338 #if H_3D_IC … … 3384 3384 ) 3385 3385 #endif 3386 #if H_3D_SPIVMP3386 #if NH_3D_SPIVMP 3387 3387 , false 3388 3388 #endif … … 3398 3398 , false 3399 3399 #endif 3400 #if H_3D_SPIVMP3400 #if NH_3D_SPIVMP 3401 3401 , false 3402 3402 #endif … … 3412 3412 , false 3413 3413 #endif 3414 #if H_3D_SPIVMP3414 #if NH_3D_SPIVMP 3415 3415 , false 3416 3416 #endif … … 3426 3426 , false 3427 3427 #endif 3428 #if H_3D_SPIVMP3428 #if NH_3D_SPIVMP 3429 3429 , false 3430 3430 #endif … … 3440 3440 , false 3441 3441 #endif 3442 #if H_3D_SPIVMP3442 #if NH_3D_SPIVMP 3443 3443 , false 3444 3444 #endif … … 3621 3621 } 3622 3622 } 3623 #endif 3624 3625 #if NH_3D_IV_MERGE 3623 3626 ///////////////////////////////////////////////////////////////// 3624 3627 //////// DERIVE IvMC, IvMCShift,IvDCShift, IvDC Candidates ///// … … 3638 3641 if ( ivMvPredFlag && cDisInfo.m_aVIdxCan!=-1) 3639 3642 { 3643 #if H_3D_IC 3640 3644 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, bICFlag ); 3645 #else 3646 getInterViewMergeCands(uiPUIdx, ivCandRefIdx, ivCandMv, &cDisInfo, ivCandDir , bIsDepth, pcMvFieldSP, puhInterDirSP, false ); 3647 #endif 3641 3648 } 3642 3649 … … 3752 3759 iCount += m_mergCands[MRG_B0].m_bAvailable; 3753 3760 3754 #if H_3D_IV_MERGE3761 #if NH_3D_IV_MERGE 3755 3762 ///////////////////////////////////////////// 3756 3763 //////// INTER VIEW DISP COMP (IvDC) //////// … … 3807 3814 iCount += m_mergCands[MRG_A0].m_bAvailable + m_mergCands[MRG_B2].m_bAvailable; 3808 3815 3809 #if H_3D_IV_MERGE3816 #if NH_3D_IV_MERGE 3810 3817 //////////////////////////////////////////////////// 3811 3818 //////// SHIFTED IV (IvMCShift + IvDCShift) //////// … … 5018 5025 #endif 5019 5026 5020 #if H_3D_IV_MERGE5027 #if NH_3D_IV_MERGE 5021 5028 Void TComDataCU::getDispforDepth (UInt uiPartIdx, UInt uiPartAddr, DisInfo* pDisp) 5022 5029 { … … 5028 5035 Int iViewIdx = getSlice()->getDefaultRefViewIdx(); 5029 5036 pDisp->m_aVIdxCan = iViewIdx; 5030 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth Y() - 1 )) ];5037 Int iDisp = getSlice()->getDepthToDisparityB( iViewIdx )[ (Int64) (1 << ( getSlice()->getSPS()->getBitDepth(CHANNEL_TYPE_LUMA) - 1 )) ]; 5031 5038 5032 5039 cMv.setHor(iDisp); … … 5607 5614 #endif 5608 5615 5609 #if H_3D_SPIVMP5616 #if NH_3D_SPIVMP 5610 5617 Void TComDataCU::getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight) 5611 5618 { … … 5624 5631 Void TComDataCU::getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ) 5625 5632 { 5626 uiBaseAbsPartIdx += m_ uiAbsIdxInLCU;5633 uiBaseAbsPartIdx += m_absZIdxInCtu; 5627 5634 Int iBasePelX = g_auiRasterToPelX[g_auiZscanToRaster[uiBaseAbsPartIdx]]; 5628 5635 Int iBasePelY = g_auiRasterToPelY[g_auiZscanToRaster[uiBaseAbsPartIdx]]; 5629 5636 Int iCurrPelX = iBasePelX + iPartIdx%iNumPartLine * iWidth; 5630 5637 Int iCurrPelY = iBasePelY + iPartIdx/iNumPartLine * iHeight; 5631 Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartIn Width() + iCurrPelX/getPic()->getMinCUWidth();5638 Int iCurrRaster = iCurrPelY / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + iCurrPelX/getPic()->getMinCUWidth(); 5632 5639 ruiPartAddr = g_auiRasterToZscan[iCurrRaster]; 5633 ruiPartAddr -= m_ uiAbsIdxInLCU;5640 ruiPartAddr -= m_absZIdxInCtu; 5634 5641 } 5635 5642 5636 5643 Void TComDataCU::setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight ) 5637 5644 { 5638 uiAbsPartIdx += getZorderIdxInC U();5645 uiAbsPartIdx += getZorderIdxInCtu(); 5639 5646 Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]]; 5640 5647 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; … … 5648 5655 for (Int j=iStartPelX; j < iEndPelX; j += getPic()->getMinCUWidth()) 5649 5656 { 5650 iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartIn Width() + j/getPic()->getMinCUWidth();5657 iCurrRaster = i / getPic()->getMinCUHeight() * getPic()->getNumPartInCtuWidth() + j/getPic()->getMinCUWidth(); 5651 5658 uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 5652 uiPartAddr -= getZorderIdxInC U();5659 uiPartAddr -= getZorderIdxInCtu(); 5653 5660 5654 5661 m_puhInterDir[uiPartAddr] = uiDir; … … 5658 5665 #endif 5659 5666 5660 #if H_3D_IV_MERGE5667 #if NH_3D_IV_MERGE 5661 5668 Bool 5662 5669 TComDataCU::getInterViewMergeCands(UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc , Bool bIsDepth 5663 #if H_3D_SPIVMP5670 #if NH_3D_SPIVMP 5664 5671 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 5665 5672 #endif … … 5680 5687 5681 5688 Int iCurrPosX, iCurrPosY; 5682 pcBaseRec->getTopLeftSamplePos( get Addr(), getZorderIdxInCU() + uiPartAddr, iCurrPosX, iCurrPosY );5683 5684 #if ! H_3D_SPIVMP5689 pcBaseRec->getTopLeftSamplePos( getCtuRsAddr(), getZorderIdxInCtu() + uiPartAddr, iCurrPosX, iCurrPosY ); 5690 5691 #if !NH_3D_SPIVMP 5685 5692 iCurrPosX += ( iWidth >> 1 ); 5686 5693 iCurrPosY += ( iHeight >> 1 ); … … 5709 5716 { 5710 5717 5711 #if H_3D_SPIVMP5718 #if NH_3D_SPIVMP 5712 5719 //////////////////////////////// 5713 5720 //////////sub-PU IvMC/////////// … … 5715 5722 if(!m_pcSlice->getIsDepth()) 5716 5723 { 5724 #if H_3D_DBBP 5717 5725 if (!getDBBPFlag(0)) 5726 #else 5727 if (1) 5728 #endif 5718 5729 { 5719 5730 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 5747 5758 } 5748 5759 5749 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) );5750 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) );5760 Int iRefCenterPosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCenterPosX + ( (cDv.getHor() + 2 ) >> 2 ) ); 5761 Int iRefCenterPosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCenterPosY + ( (cDv.getVer() + 2 ) >> 2 ) ); 5751 5762 5752 5763 pcBaseRec->getCUAddrAndPartIdx( iRefCenterPosX , iRefCenterPosY , iRefCenterCUAddr, iRefCenterAbsPartIdx ); 5753 TComDataCU* pcDefaultCU = pcBasePic->getC U( iRefCenterCUAddr );5764 TComDataCU* pcDefaultCU = pcBasePic->getCtu( iRefCenterCUAddr ); 5754 5765 if(!( pcDefaultCU->getPredictionMode( iRefCenterAbsPartIdx ) == MODE_INTRA )) 5755 5766 { … … 5776 5787 TComMv cMv(cDefaultMvField.getHor(), cDefaultMvField.getVer()); 5777 5788 #if NH_3D_NBDV 5778 #if H_3D_IV_MERGE5789 #if NH_3D_IV_MERGE 5779 5790 if( !bIsDepth ) 5780 5791 { … … 5784 5795 cMv.setIDVVer (cDv.getVer()); 5785 5796 cMv.setIDVVId (iViewIndex); 5786 #if H_3D_IV_MERGE5797 #if NH_3D_IV_MERGE 5787 5798 } 5788 5799 #endif … … 5809 5820 for (Int j = iCurrPosX; j < iCurrPosX + iWidth; j += iSPWidth) 5810 5821 { 5811 iBasePosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 ));5812 iBasePosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 ));5822 iBasePosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, j + iDelX + ( (cDv.getHor() + 2 ) >> 2 )); 5823 iBasePosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, i + iDelY + ( (cDv.getVer() + 2 ) >> 2 )); 5813 5824 5814 5825 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY, iBaseCUAddr, iBaseAbsPartIdx ); 5815 pcBaseCU = pcBasePic->getC U( iBaseCUAddr );5826 pcBaseCU = pcBasePic->getCtu( iBaseCUAddr ); 5816 5827 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 5817 5828 { … … 5881 5892 //////////////////////////////// 5882 5893 5883 #if H_3D_SPIVMP5894 #if NH_3D_SPIVMP 5884 5895 if(m_pcSlice->getIsDepth()) 5885 5896 { … … 5887 5898 iCurrPosY += ( iHeight >> 1 ); 5888 5899 } 5900 #if H_3D_DBBP 5889 5901 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5890 5902 #else 5903 for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5904 #endif 5905 #else 5891 5906 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) 5892 5907 #endif … … 5898 5913 Int iBaseAbsPartIdx; 5899 5914 5900 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2 5901 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2 5902 5903 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth ( ) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) );5904 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight( ) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) );5915 Int offsetW = (iLoopCan == 0) ? 0 : ( iWidth * 2); 5916 Int offsetH = (iLoopCan == 0) ? 0 : ( iHeight * 2); 5917 5918 Int iBasePosX = Clip3( 0, pcBaseRec->getWidth (COMPONENT_Y) - 1, iCurrPosX + ( (cDv.getHor() + offsetW + 2 ) >> 2 ) ); 5919 Int iBasePosY = Clip3( 0, pcBaseRec->getHeight(COMPONENT_Y) - 1, iCurrPosY + ( (cDv.getVer() + offsetH + 2 ) >> 2 ) ); 5905 5920 pcBaseRec->getCUAddrAndPartIdx( iBasePosX , iBasePosY , iBaseCUAddr, iBaseAbsPartIdx ); 5906 5921 5907 TComDataCU* pcBaseCU = pcBasePic->getC U( iBaseCUAddr );5922 TComDataCU* pcBaseCU = pcBasePic->getCtu( iBaseCUAddr ); 5908 5923 if(!( pcBaseCU->getPredictionMode( iBaseAbsPartIdx ) == MODE_INTRA )) 5909 5924 { … … 5933 5948 TComMv cMv(cBaseMvField.getHor(), cBaseMvField.getVer()); 5934 5949 #if NH_3D_NBDV 5935 #if H_3D_IV_MERGE5950 #if NH_3D_IV_MERGE 5936 5951 if( !bIsDepth ) 5937 5952 { … … 5941 5956 cMv.setIDVVer (cDv.getVer()); 5942 5957 cMv.setIDVVId (iViewIndex); 5943 #if H_3D_IV_MERGE5958 #if NH_3D_IV_MERGE 5944 5959 } 5945 5960 #endif … … 5957 5972 } 5958 5973 } 5959 #if H_3D_SPIVMP 5974 #if NH_3D_SPIVMP 5975 #if H_3D_DBBP 5960 5976 for(Int iLoopCan = ( (m_pcSlice->getIsDepth() || getDBBPFlag(0)) ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5977 #else 5978 for(Int iLoopCan = ( m_pcSlice->getIsDepth() ? 0 : 1 ); iLoopCan < ( 2 - m_pcSlice->getIsDepth() ); iLoopCan ++) 5979 #endif 5961 5980 #else 5962 5981 for(Int iLoopCan = 0; iLoopCan < 2; iLoopCan ++) … … 5991 6010 #endif 5992 6011 cMv.setHor( cMv.getHor() + ioffsetDV ); 5993 #if H_3D_IV_MERGE6012 #if NH_3D_IV_MERGE 5994 6013 if( bIsDepth ) 5995 6014 { -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComDataCU.h
r1255 r1259 173 173 Char* m_piVSPFlag; ///< array of VSP flags to indicate whehter a block uses VSP or not ///< 0: non-VSP; 1: VSP 174 174 #endif 175 #if H_3D_SPIVMP175 #if NH_3D_SPIVMP 176 176 Bool* m_pbSPIVMPFlag; ///< array of sub-PU IVMP flags to indicate whehter a block uses sub-PU IVMP ///< 0: non-SPIVMP; 1: SPIVMP 177 177 #endif … … 236 236 Bool xAddVspCand( Int mrgCandIdx, DisInfo* pDInfo, Int& iCount); 237 237 #endif 238 #if H_3D_IV_MERGE238 #if NH_3D_IV_MERGE 239 239 Bool xAddIvMRGCand( Int mrgCandIdx, Int& iCount, Int* ivCandDir, TComMv* ivCandMv, Int* ivCandRefIdx ); 240 240 #endif … … 499 499 ); 500 500 501 #if NH_3D_IV_MERGE 502 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); 503 #endif 504 501 505 #if H_3D 502 506 Void getDispforDepth ( UInt uiPartIdx, UInt uiPartAddr, DisInfo* cDisp); … … 513 517 Void getIVNStatus ( UInt uiPartIdx, DisInfo* pDInfo, Bool& bIVFMerge, Int& iIVFMaxD); 514 518 #endif 515 #if H_3D_SPIVMP519 #if NH_3D_SPIVMP 516 520 Void getSPPara(Int iPUWidth, Int iPUHeight, Int& iNumSP, Int& iNumSPInOneLine, Int& iSPWidth, Int& iSPHeight); 517 521 Void getSPAbsPartIdx(UInt uiBaseAbsPartIdx, Int iWidth, Int iHeight, Int iPartIdx, Int iNumPartLine, UInt& ruiPartAddr ); 518 522 Void setInterDirSP( UInt uiDir, UInt uiAbsPartIdx, Int iWidth, Int iHeight ); 519 523 #endif 520 #if H_3D_IV_MERGE524 #if NH_3D_IV_MERGE 521 525 Bool getInterViewMergeCands ( UInt uiPartIdx, Int* paiPdmRefIdx, TComMv* pacPdmMv, DisInfo* pDInfo, Int* availableMcDc, Bool bIsDepth 522 526 523 #if H_3D_SPIVMP527 #if NH_3D_SPIVMP 524 528 , TComMvField* pcMFieldSP, UChar* puhInterDirSP 525 529 #endif … … 665 669 , Int* vspFlag 666 670 #endif 667 #if H_3D_SPIVMP671 #if NH_3D_SPIVMP 668 672 , Bool* pbSPIVMPFlag 669 673 #endif … … 671 675 ); 672 676 Void xGetInterMergeCandidates ( UInt uiAbsPartIdx, UInt uiPUIdx, TComMvField* pcMFieldNeighbours, UChar* puhInterDirNeighbours 673 #if H_3D_SPIVMP677 #if NH_3D_SPIVMP 674 678 , TComMvField* pcMvFieldSP, UChar* puhInterDirSP 675 679 #endif … … 679 683 680 684 #if NH_3D_VSP 681 #if H_3D_SPIVMP685 #if NH_3D_SPIVMP 682 686 Bool* getSPIVMPFlag () { return m_pbSPIVMPFlag; } 683 687 Bool getSPIVMPFlag ( UInt uiIdx ) { return m_pbSPIVMPFlag[uiIdx]; } -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.cpp
r1200 r1259 40 40 #include "assert.h" 41 41 #include <stdlib.h> 42 #if H_3D_SPIVMP42 #if NH_3D_SPIVMP 43 43 #include "TComDataCU.h" 44 44 #include "TComPic.h" … … 328 328 } 329 329 330 #if H_3D_SPIVMP330 #if NH_3D_SPIVMP 331 331 Void TComCUMvField::setMvFieldSP( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ) 332 332 { 333 uiAbsPartIdx += pcCU->getZorderIdxInC U();333 uiAbsPartIdx += pcCU->getZorderIdxInCtu(); 334 334 Int iStartPelX = g_auiRasterToPelX[g_auiZscanToRaster[uiAbsPartIdx]]; 335 335 Int iStartPelY = g_auiRasterToPelY[g_auiZscanToRaster[uiAbsPartIdx]]; … … 341 341 for (Int j=iStartPelX; j < iEndPelX; j += pcCU->getPic()->getMinCUWidth()) 342 342 { 343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartIn Width() + j/pcCU->getPic()->getMinCUWidth();343 Int iCurrRaster = i / pcCU->getPic()->getMinCUHeight() * pcCU->getPic()->getNumPartInCtuWidth() + j/pcCU->getPic()->getMinCUWidth(); 344 344 Int uiPartAddr = g_auiRasterToZscan[iCurrRaster]; 345 uiPartAddr -= pcCU->getZorderIdxInC U();345 uiPartAddr -= pcCU->getZorderIdxInCtu(); 346 346 347 347 m_pcMv[uiPartAddr] = cMvField.getMv(); -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComMotionInfo.h
r1255 r1259 50 50 // ==================================================================================================================== 51 51 52 #if H_3D_SPIVMP52 #if NH_3D_SPIVMP 53 53 class TComDataCU; 54 54 #endif … … 107 107 Int getHor () const { return m_acMv.getHor(); } 108 108 Int getVer () const { return m_acMv.getVer(); } 109 #if H_3D_IV_MERGE109 #if NH_3D_IV_MERGE 110 110 Bool operator== ( const TComMvField& rcMv ) const 111 111 { … … 167 167 Void setAllRefIdx ( Int iRefIdx, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 168 168 Void setAllMvField( TComMvField const & mvField, PartSize eMbMode, Int iPartAddr, UInt uiDepth, Int iPartIdx=0 ); 169 #if H_3D_SPIVMP169 #if NH_3D_SPIVMP 170 170 Void setMvFieldSP ( TComDataCU* pcCU, UInt uiAbsPartIdx, TComMvField cMvField, Int iWidth, Int iHeight ); 171 171 #endif … … 203 203 Int m_iVspFlag; 204 204 #endif 205 #if H_3D_SPIVMP205 #if NH_3D_SPIVMP 206 206 Bool m_bSPIVMPFlag; 207 207 #endif … … 215 215 m_iVspFlag = 0; 216 216 #endif 217 #if H_3D_SPIVMP217 #if NH_3D_SPIVMP 218 218 m_bSPIVMPFlag = false; 219 219 #endif … … 234 234 m_iVspFlag = 0; 235 235 #endif 236 #if H_3D_SPIVMP236 #if NH_3D_SPIVMP 237 237 m_bSPIVMPFlag = false; 238 238 #endif … … 245 245 , Int vspFlag 246 246 #endif 247 #if H_3D_SPIVMP247 #if NH_3D_SPIVMP 248 248 , Bool bSPIVMPFlag 249 249 #endif … … 257 257 m_iVspFlag = vspFlag; 258 258 #endif 259 #if H_3D_SPIVMP259 #if NH_3D_SPIVMP 260 260 m_bSPIVMPFlag = bSPIVMPFlag; 261 261 #endif … … 266 266 , Int* vspFlag 267 267 #endif 268 #if H_3D_SPIVMP268 #if NH_3D_SPIVMP 269 269 , Bool* pbSPIVMPFlag 270 270 #endif … … 277 277 vspFlag[iCount] = m_iVspFlag; 278 278 #endif 279 #if H_3D_SPIVMP279 #if NH_3D_SPIVMP 280 280 pbSPIVMPFlag[iCount] = m_bSPIVMPFlag; 281 281 #endif -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPicYuv.cpp
r1200 r1259 91 91 m_iPicHeight = iPicHeight; 92 92 93 #if H_3D_IV_MERGE 93 #if NH_3D_IV_MERGE 94 m_iCuWidth = uiMaxCUWidth; 95 m_iCuHeight = uiMaxCUHeight; 96 94 97 m_iNumCuInWidth = m_iPicWidth / m_iCuWidth; 95 98 m_iNumCuInWidth += ( m_iPicWidth % m_iCuWidth ) ? 1 : 0; … … 292 295 fclose(pFile); 293 296 } 294 #if H_3D 295 #if H_3D_IV_MERGE 297 #if NH_3D_IV_MERGE 296 298 Void 297 299 TComPicYuv::getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ) … … 320 322 } 321 323 #endif 324 325 #if H_3D 322 326 Void TComPicYuv::setLumaTo( Pel pVal ) 323 327 { -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPicYuv.h
r1200 r1259 80 80 81 81 Bool m_bIsBorderExtended; 82 #if H_3D_IV_MERGE82 #if NH_3D_IV_MERGE 83 83 Int m_iBaseUnitWidth; ///< Width of Base Unit (with maximum depth or minimum size, m_iCuWidth >> Max. Depth) 84 84 Int m_iBaseUnitHeight; ///< Height of Base Unit (with maximum depth or minimum size, m_iCuHeight >> Max. Depth) 85 85 Int m_iNumCuInWidth; 86 Int m_iCuWidth; ///< Width of Coding Unit (CU) 87 Int m_iCuHeight; ///< Height of Coding Unit (CU) 86 88 #endif 87 89 … … 168 170 Void setLumaTo ( Pel pVal ); 169 171 Void setChromaTo ( Pel pVal ); 170 #if H_3D_IV_MERGE172 #if NH_3D_IV_MERGE 171 173 // sample to block and block to sample conversion 172 174 Void getTopLeftSamplePos( Int iCuAddr, Int iAbsZorderIdx, Int& riX, Int& riY ); -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPrediction.cpp
r1255 r1259 661 661 } 662 662 663 #if H_3D_SPIVMP663 #if NH_3D_SPIVMP 664 664 Void TComPrediction::xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ) 665 665 { … … 670 670 pcCU->getSPAbsPartIdx(uiPartAddr, iSPWidth, iSPHeight, i, iNumSPInOneLine, uiSPAddr[i]); 671 671 } 672 #if H_3D_ARP 672 673 if( pcCU->getARPW( uiPartAddr ) != 0 ) 673 674 { 674 675 return; 675 676 } 677 #endif 676 678 677 679 // horizontal sub-PU merge … … 1209 1211 { 1210 1212 #endif 1211 if ( eRefPicList != REF_PIC_LIST_X ) 1212 { 1213 if( pcCU->getSlice()->getPPS()->getUseWP()) 1214 { 1215 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1213 if ( eRefPicList != REF_PIC_LIST_X ) 1214 { 1215 if( pcCU->getSlice()->getPPS()->getUseWP()) 1216 { 1217 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred, true ); 1218 } 1219 else 1220 { 1221 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1222 } 1223 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1224 { 1225 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1226 } 1216 1227 } 1217 1228 else 1218 1229 { 1219 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1220 } 1221 if ( pcCU->getSlice()->getPPS()->getUseWP() ) 1222 { 1223 xWeightedPredictionUni( pcCU, pcYuvPred, uiPartAddr, iWidth, iHeight, eRefPicList, pcYuvPred ); 1224 } 1225 } 1226 else 1227 { 1228 #if H_3D_SPIVMP 1230 #if NH_3D_SPIVMP 1229 1231 if ( pcCU->getSPIVMPFlag(uiPartAddr)!=0) 1230 1232 { … … 1258 1260 { 1259 1261 #endif 1260 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )1261 {1262 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );1263 }1264 else1265 {1266 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );1267 }1268 #if H_3D_SPIVMP1269 } 1270 #endif 1271 }1262 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1263 { 1264 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1265 } 1266 else 1267 { 1268 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1269 } 1270 #if NH_3D_SPIVMP 1271 } 1272 #endif 1273 } 1272 1274 #if NH_3D_VSP 1273 1275 } … … 1312 1314 else 1313 1315 { 1314 #if H_3D_SPIVMP1315 1316 #if NH_3D_SPIVMP 1317 if (pcCU->getSPIVMPFlag(uiPartAddr)!=0) 1316 1318 { 1317 1319 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; … … 1343 1345 { 1344 1346 #endif 1345 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) )1346 {1347 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred );1348 }1349 else1350 {1351 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred );1352 }1353 #if H_3D_SPIVMP1354 1347 if ( xCheckIdenticalMotion( pcCU, uiPartAddr ) ) 1348 { 1349 xPredInterUni (pcCU, uiPartAddr, iWidth, iHeight, REF_PIC_LIST_0, pcYuvPred ); 1350 } 1351 else 1352 { 1353 xPredInterBi (pcCU, uiPartAddr, iWidth, iHeight, pcYuvPred ); 1354 } 1355 #if NH_3D_SPIVMP 1356 } 1355 1357 #endif 1356 1358 } -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComPrediction.h
r1255 r1259 140 140 Void xDCPredFiltering( const Pel* pSrc, Int iSrcStride, Pel* pDst, Int iDstStride, Int iWidth, Int iHeight, ChannelType channelType ); 141 141 Bool xCheckIdenticalMotion ( TComDataCU* pcCU, UInt PartAddr); 142 #if H_3D_SPIVMP142 #if NH_3D_SPIVMP 143 143 Bool xCheckTwoSPMotion ( TComDataCU* pcCU, UInt PartAddr0, UInt PartAddr1 ); 144 144 Void xGetSubPUAddrAndMerge(TComDataCU* pcCU, UInt uiPartAddr, Int iSPWidth, Int iSPHeight, Int iNumSPInOneLine, Int iNumSP, UInt* uiMergedSPW, UInt* uiMergedSPH, UInt* uiSPAddr ); -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComSlice.cpp
r1217 r1259 278 278 m_iSliceChromaQpDelta[component] = 0; 279 279 } 280 #if H_3D_IV_MERGE280 #if NH_3D_IV_MERGE 281 281 m_maxNumMergeCand = MRG_MAX_NUM_CANDS_MEM; 282 282 #else … … 3854 3854 #endif 3855 3855 3856 #if H_3D_IV_MERGE3856 #if NH_3D_IV_MERGE 3857 3857 setupLUT = setupLUT || ( getIvMvPredFlag() && getIsDepth() ); 3858 3858 #endif -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TComSlice.h
r1210 r1259 2709 2709 #if H_3D 2710 2710 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2711 #endif 2711 #endif 2712 #if NH_3D_IV_MERGE 2713 TComPic* getTexturePic () { return m_ivPicsCurrPoc[0][ m_viewIndex ]; } 2714 #endif 2712 2715 #if H_3D_IC 2713 2716 Void setApplyIC( Bool b ) { m_bApplyIC = b; } -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon/TypeDef.h
r1255 r1259 73 73 #define NH_3D_MLC 1 74 74 #define NH_3D_VSP 1 75 #define NH_3D_IV_MERGE 1 76 #define NH_3D_SPIVMP 1 75 77 #endif 76 78 -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecCAVLC.cpp
r1200 r1259 2805 2805 { 2806 2806 READ_UVLC( uiCode, "five_minus_max_num_merge_cand"); 2807 #if H_3D_IV_MERGE2807 #if NH_3D_IV_MERGE 2808 2808 pcSlice->setMaxNumMergeCand(( ( pcSlice->getMpiFlag() || pcSlice->getIvMvPredFlag() || pcSlice->getViewSynthesisPredFlag() ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS) - uiCode); 2809 2809 #else -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecCu.cpp
r1255 r1259 163 163 Void TDecCu::decompressCtu( TComDataCU* pCtu ) 164 164 { 165 #if ! H_3D_IV_MERGE165 #if !NH_3D_IV_MERGE 166 166 xDecompressCU( pCtu, 0, 0 ); 167 167 #endif … … 327 327 m_ppcCU[uiDepth]->setHeight(0, pcCU->getSlice()->getSPS()->getMaxCUHeight() / (1 << uiDepth)); 328 328 m_ppcCU[uiDepth]->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 329 #if H_3D_IV_MERGE329 #if NH_3D_IV_MERGE 330 330 if( pcCU->getSlice()->getIsDepth()) 331 331 { … … 345 345 m_ppcCU[uiDepth]->getDisMvpCandNBDV(&DvInfo); 346 346 } 347 #if H_3D_IV_MERGE347 #if NH_3D_IV_MERGE 348 348 } 349 349 #endif … … 392 392 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_0 ); 393 393 m_ppcCU[uiDepth]->copyInterPredInfoFrom( pcCU, uiAbsPartIdx, REF_PIC_LIST_1 ); 394 #if H_3D_IV_MERGE394 #if NH_3D_IV_MERGE 395 395 m_ppcCU[uiDepth]->copyDVInfoFrom(pcCU, uiAbsPartIdx); 396 396 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists … … 424 424 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 425 425 #endif 426 #if H_3D_SPIVMP426 #if NH_3D_SPIVMP 427 427 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 428 428 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 429 429 TComMvField* pcMvFieldSP; 430 430 UChar* puhInterDirSP; 431 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition ()*2];432 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition ()];431 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 432 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 433 433 #endif 434 434 … … 439 439 #if NH_3D_MLC 440 440 m_ppcCU[uiDepth]->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 441 #if H_3D_SPIVMP441 #if NH_3D_SPIVMP 442 442 , pcMvFieldSP, puhInterDirSP 443 443 #endif … … 448 448 , vspFlag 449 449 #endif 450 #if H_3D_SPIVMP450 #if NH_3D_SPIVMP 451 451 , bSPIVMPFlag 452 452 #endif … … 501 501 } 502 502 } 503 #if H_3D_SPIVMP503 #if NH_3D_SPIVMP 504 504 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiAbsPartIdx, 0, uiDepth ); 505 505 if (bSPIVMPFlag[uiMergeIndex]) … … 526 526 527 527 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 528 #if H_3D_IV_MERGE528 #if NH_3D_IV_MERGE 529 529 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 530 530 #endif … … 551 551 #endif 552 552 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 553 #if H_3D_IV_MERGE553 #if NH_3D_IV_MERGE 554 554 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 555 555 #endif … … 571 571 #endif 572 572 xFinishDecodeCU( pcCU, uiAbsPartIdx, uiDepth, isLastCtuOfSliceSegment ); 573 #if H_3D_IV_MERGE573 #if NH_3D_IV_MERGE 574 574 xDecompressCU(pcCU, uiAbsPartIdx, uiDepth ); 575 575 #endif … … 594 594 { 595 595 TComPic* pcPic = pCtu->getPic(); 596 #if ! H_3D_IV_MERGE596 #if !NH_3D_IV_MERGE 597 597 TComSlice * pcSlice = pCtu->getSlice(); 598 598 const TComSPS &sps=*(pcSlice->getSPS()); -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecEntropy.cpp
r1255 r1259 244 244 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS]; 245 245 #endif 246 #if H_3D_SPIVMP246 #if NH_3D_SPIVMP 247 247 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 248 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition ()*2];249 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition ()];250 #endif 251 #if H_3D_IV_MERGE248 TComMvField* pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 249 UChar* puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 250 #endif 251 #if NH_3D_IV_MERGE 252 252 pcSubCU->copyDVInfoFrom( pcCU, uiAbsPartIdx); 253 253 #endif … … 489 489 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 490 490 #endif 491 #if H_3D_SPIVMP491 #if NH_3D_SPIVMP 492 492 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 493 493 #endif … … 497 497 #if NH_3D_MLC 498 498 pcSubCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours, uhInterDirNeighbours 499 #if H_3D_SPIVMP499 #if NH_3D_SPIVMP 500 500 , pcMvFieldSP, puhInterDirSP 501 501 #endif … … 505 505 , vspFlag 506 506 #endif 507 #if H_3D_SPIVMP507 #if NH_3D_SPIVMP 508 508 , bSPIVMPFlag 509 509 #endif … … 526 526 memset(vspFlag, 0, sizeof(Int)*MRG_MAX_NUM_CANDS_MEM); 527 527 #endif 528 #if H_3D_SPIVMP528 #if NH_3D_SPIVMP 529 529 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 530 530 #endif … … 534 534 #if NH_3D_MLC 535 535 pcSubCU->xGetInterMergeCandidates( uiSubPartIdx-uiAbsPartIdx, uiPartIdx, cMvFieldNeighbours, uhInterDirNeighbours 536 #if H_3D_SPIVMP536 #if NH_3D_SPIVMP 537 537 , pcMvFieldSP, puhInterDirSP 538 538 #endif … … 542 542 , vspFlag 543 543 #endif 544 #if H_3D_SPIVMP544 #if NH_3D_SPIVMP 545 545 , bSPIVMPFlag 546 546 #endif … … 579 579 } 580 580 } 581 #if NH_3D_SPIVMP 582 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeIndex], uiSubPartIdx, uiPartIdx, uiDepth ); 583 if (bSPIVMPFlag[uiMergeIndex] != 0) 584 { 585 Int iWidth, iHeight; 586 UInt uiIdx; 587 pcCU->getPartIndexAndSize( uiPartIdx, uiIdx, iWidth, iHeight, uiSubPartIdx, true ); 588 589 UInt uiSPAddr; 590 591 Int iNumSPInOneLine, iNumSP, iSPWidth, iSPHeight; 592 593 pcCU->getSPPara(iWidth, iHeight, iNumSP, iNumSPInOneLine, iSPWidth, iSPHeight); 594 595 for (Int iPartitionIdx = 0; iPartitionIdx < iNumSP; iPartitionIdx++) 596 { 597 pcCU->getSPAbsPartIdx(uiSubPartIdx, iSPWidth, iSPHeight, iPartitionIdx, iNumSPInOneLine, uiSPAddr); 598 pcCU->setInterDirSP(puhInterDirSP[iPartitionIdx], uiSPAddr, iSPWidth, iSPHeight); 599 pcCU->getCUMvField( REF_PIC_LIST_0 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx], iSPWidth, iSPHeight); 600 pcCU->getCUMvField( REF_PIC_LIST_1 )->setMvFieldSP(pcCU, uiSPAddr, pcMvFieldSP[2*iPartitionIdx + 1], iSPWidth, iSPHeight); 601 } 602 } 603 #endif 581 604 } 582 605 else … … 612 635 } 613 636 #endif 614 #if H_3D_SPIVMP637 #if NH_3D_SPIVMP 615 638 delete[] pcMvFieldSP; 616 639 delete[] puhInterDirSP; -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecTop.cpp
r1210 r1259 292 292 293 293 294 #if H_3D_IV_MERGE294 #if NH_3D_IV_MERGE 295 295 Void 296 296 CamParsCollector::copyCamParamForSlice( TComSlice* pcSlice ) … … 1167 1167 #if NH_3D 1168 1168 pcSlice->checkInCompPredRefLayers(); 1169 #if H_3D_IV_MERGE1169 #if NH_3D_IV_MERGE 1170 1170 #if H_3D_FCO 1171 1171 //assert( !getIsDepth() ); … … 1264 1264 } 1265 1265 1266 #if H_3D_IV_MERGE1266 #if NH_3D_IV_MERGE 1267 1267 #if H_3D_FCO 1268 1268 if( !pcSlice->getIsDepth() && m_pcCamParsCollector ) -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibDecoder/TDecTop.h
r1200 r1259 81 81 Int**** getBaseViewShiftLUTI() { return m_aiBaseViewShiftLUT; } 82 82 83 #if H_3D_IV_MERGE83 #if NH_3D_IV_MERGE 84 84 Void copyCamParamForSlice( TComSlice* pcSlice ); 85 85 #endif -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncCavlc.cpp
r1200 r1259 2195 2195 } 2196 2196 #endif 2197 #if H_3D_IV_MERGE2197 #if NH_3D_IV_MERGE 2198 2198 assert(pcSlice->getMaxNumMergeCand()<=MRG_MAX_NUM_CANDS_MEM); 2199 2199 #else … … 2202 2202 if (!pcSlice->isIntra()) 2203 2203 { 2204 #if H_3D_IV_MERGE2204 #if NH_3D_IV_MERGE 2205 2205 WRITE_UVLC( ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? MRG_MAX_NUM_CANDS_MEM : MRG_MAX_NUM_CANDS ) - pcSlice->getMaxNumMergeCand(), "five_minus_max_num_merge_cand"); 2206 2206 #else -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncCu.cpp
r1255 r1259 615 615 PartSize ePartTemp = rpcTempCU->getPartitionSize(0); 616 616 rpcTempCU->setPartSizeSubParts(SIZE_2Nx2N, 0, uiDepth); 617 #if H_3D_IV_MERGE617 #if NH_3D_IV_MERGE 618 618 if (rpcTempCU->getSlice()->getIsDepth() ) 619 619 { … … 633 633 rpcTempCU->getDisMvpCandNBDV(&DvInfo); 634 634 } 635 #if H_3D_IV_MERGE635 #if NH_3D_IV_MERGE 636 636 } 637 637 #endif … … 1810 1810 rpcTempCU->setPartSizeSubParts( SIZE_2Nx2N, 0, uhDepth ); // interprets depth relative to CTU level 1811 1811 1812 #if NH_3D_SPIVMP 1813 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 1814 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 1815 TComMvField* pcMvFieldSP; 1816 UChar* puhInterDirSP; 1817 pcMvFieldSP = new TComMvField[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 1818 puhInterDirSP = new UChar[rpcTempCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 1819 #endif 1820 1812 1821 #if NH_3D_VSP 1813 1822 #if !H_3D_ARP … … 1820 1829 #if NH_3D_MLC 1821 1830 rpcTempCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 1822 #if H_3D_SPIVMP1831 #if NH_3D_SPIVMP 1823 1832 , pcMvFieldSP, puhInterDirSP 1824 1833 #endif … … 1827 1836 1828 1837 rpcTempCU->buildMCL( cMvFieldNeighbours,uhInterDirNeighbours, vspFlag 1829 #if H_3D_SPIVMP1838 #if NH_3D_SPIVMP 1830 1839 , bSPIVMPFlag 1831 1840 #endif … … 1856 1865 #endif 1857 1866 #endif 1858 1859 1860 1861 1862 1863 1864 1865 1867 1866 1868 #if NH_3D_MLC … … 1983 1985 rpcTempCU->setVSPFlagSubParts( vspFlag[uiMergeCand], 0, 0, uhDepth ); 1984 1986 #endif 1985 #if H_3D_SPIVMP1987 #if NH_3D_SPIVMP 1986 1988 rpcTempCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMergeCand], 0, 0, uhDepth); 1987 1989 if (bSPIVMPFlag[uiMergeCand]) … … 2206 2208 } 2207 2209 DEBUG_STRING_APPEND(sDebug, bestStr) 2208 #if H_3D_SPIVMP2210 #if NH_3D_SPIVMP 2209 2211 delete[] pcMvFieldSP; 2210 2212 delete[] puhInterDirSP; -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncGOP.cpp
r1210 r1259 1443 1443 } 1444 1444 1445 #if H_3D_IV_MERGE1445 #if NH_3D_IV_MERGE 1446 1446 // This needs to be done after initialization of 3D tool parameters. 1447 1447 pcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() + ( ( pcSlice->getMpiFlag( ) || pcSlice->getIvMvPredFlag( ) || pcSlice->getViewSynthesisPredFlag( ) ) ? 1 : 0 )); -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSearch.cpp
r1255 r1259 3872 3872 , Int* vspFlag 3873 3873 #endif 3874 #if H_3D_SPIVMP3874 #if NH_3D_SPIVMP 3875 3875 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 3876 3876 #endif … … 3929 3929 pcCU->getInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours, numValidMergeCand ); 3930 3930 pcCU->xGetInterMergeCandidates( 0, 0, cMvFieldNeighbours,uhInterDirNeighbours 3931 #if H_3D_SPIVMP3931 #if NH_3D_SPIVMP 3932 3932 , pcMvFieldSP, puhInterDirSP 3933 3933 #endif … … 3939 3939 , vspFlag 3940 3940 #endif 3941 #if H_3D_SPIVMP3941 #if NH_3D_SPIVMP 3942 3942 , pbSPIVMPFlag 3943 3943 #endif … … 3956 3956 pcCU->getInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand ); 3957 3957 pcCU->xGetInterMergeCandidates( uiAbsPartIdx, iPUIdx, cMvFieldNeighbours, uhInterDirNeighbours 3958 #if H_3D_SPIVMP3958 #if NH_3D_SPIVMP 3959 3959 , pcMvFieldSP, puhInterDirSP 3960 3960 #endif … … 3966 3966 , vspFlag 3967 3967 #endif 3968 #if H_3D_SPIVMP3968 #if NH_3D_SPIVMP 3969 3969 , pbSPIVMPFlag 3970 3970 #endif … … 4005 4005 #endif 4006 4006 4007 #if H_3D_SPIVMP4007 #if NH_3D_SPIVMP 4008 4008 pcCU->setSPIVMPFlagSubParts( pbSPIVMPFlag[uiMergeCand], uiAbsPartIdx, iPUIdx, pcCU->getDepth( uiAbsPartIdx )); 4009 4009 if (pbSPIVMPFlag[uiMergeCand]) … … 4172 4172 Distortion biPDistTemp = std::numeric_limits<Distortion>::max(); 4173 4173 4174 #if H_3D_IV_MERGE4174 #if NH_3D_IV_MERGE 4175 4175 TComMvField cMvFieldNeighbours[MRG_MAX_NUM_CANDS_MEM << 1]; // double length for mv of both lists 4176 4176 UChar uhInterDirNeighbours[MRG_MAX_NUM_CANDS_MEM]; … … 4599 4599 DisInfo OriginalDvInfo = pcCU->getDvInfo(uiAbsPartIdx); 4600 4600 #endif 4601 #if H_3D_SPIVMP4601 #if NH_3D_SPIVMP 4602 4602 Bool bSPIVMPFlag[MRG_MAX_NUM_CANDS_MEM]; 4603 4603 memset(bSPIVMPFlag, false, sizeof(Bool)*MRG_MAX_NUM_CANDS_MEM); 4604 4604 TComMvField* pcMvFieldSP; 4605 4605 UChar* puhInterDirSP; 4606 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartition ()*2];4607 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartition ()];4606 pcMvFieldSP = new TComMvField[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()*2]; 4607 puhInterDirSP = new UChar[pcCU->getPic()->getPicSym()->getNumPartitionsInCtu()]; 4608 4608 #endif 4609 4609 xMergeEstimation( pcCU, pcOrgYuv, iPartIdx, uiMRGInterDir, cMRGMvField, uiMRGIndex, uiMRGCost, cMvFieldNeighbours, uhInterDirNeighbours, numValidMergeCand … … 4611 4611 , vspFlag 4612 4612 #endif 4613 #if H_3D_SPIVMP4613 #if NH_3D_SPIVMP 4614 4614 , bSPIVMPFlag, pcMvFieldSP, puhInterDirSP 4615 4615 #endif … … 4624 4624 pcCU->setVSPFlagSubParts( vspFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4625 4625 #endif 4626 #if H_3D_SPIVMP4626 #if NH_3D_SPIVMP 4627 4627 pcCU->setSPIVMPFlagSubParts(bSPIVMPFlag[uiMRGIndex], uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4628 4628 if (bSPIVMPFlag[uiMRGIndex]!=0) … … 4700 4700 else 4701 4701 { 4702 #if H_3D_SPIVMP4702 #if NH_3D_SPIVMP 4703 4703 pcCU->setSPIVMPFlagSubParts(0, uiPartAddr, iPartIdx, pcCU->getDepth( uiPartAddr ) ); 4704 4704 #endif … … 4713 4713 pcCU->getCUMvField( REF_PIC_LIST_1 )->setAllMvField( cMEMvField[1], ePartSize, uiPartAddr, 0, iPartIdx ); 4714 4714 } 4715 #if H_3D_SPIVMP4715 #if NH_3D_SPIVMP 4716 4716 delete[] pcMvFieldSP; 4717 4717 delete[] puhInterDirSP; … … 5879 5879 const Double zeroCost = (pcCU->isLosslessCoded( 0 )) ? (nonZeroCost+1) : (m_pcRdCost->calcRdCost( zeroResiBits, zeroDistortion )); 5880 5880 #endif 5881 #if H_3D_SPIVMP5882 if ( dZeroCost < dCost || pcCU->getQtRootCbf(0)==0)5881 #if NH_3D_SPIVMP 5882 if ( zeroCost < nonZeroCost || pcCU->getQtRootCbf(0)==0) 5883 5883 #else 5884 5884 if ( zeroCost < nonZeroCost || !pcCU->getQtRootCbf(0) ) -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSearch.h
r1255 r1259 413 413 , Int* vspFlag 414 414 #endif 415 #if H_3D_SPIVMP415 #if NH_3D_SPIVMP 416 416 , Bool* pbSPIVMPFlag, TComMvField* pcMvFieldSP, UChar* puhInterDirSP 417 417 #endif -
branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibEncoder/TEncSlice.cpp
r1200 r1259 567 567 rpcSlice->setSliceSegmentMode ( m_pcCfg->getSliceSegmentMode() ); 568 568 rpcSlice->setSliceSegmentArgument ( m_pcCfg->getSliceSegmentArgument() ); 569 #if H_3D_IV_MERGE569 #if NH_3D_IV_MERGE 570 570 #else 571 571 rpcSlice->setMaxNumMergeCand ( m_pcCfg->getMaxNumMergeCand() );
Note: See TracChangeset for help on using the changeset viewer.