Changeset 1259 in 3DVCSoftware for branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon
- Timestamp:
- 23 Jun 2015, 03:55:51 (10 years ago)
- Location:
- branches/HTM-14.1-update-dev3-MediaTek-Qualcomm/source/Lib/TLibCommon
- Files:
-
- 11 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
Note: See TracChangeset for help on using the changeset viewer.