Changeset 537 in 3DVCSoftware for branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
- Timestamp:
- 13 Jul 2013, 15:51:26 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HTM-DEV-0.3-dev2/source/Lib/TLibCommon/TComDataCU.cpp
r534 r537 136 136 #endif 137 137 #endif 138 139 138 m_bDecSubCu = false; 140 139 m_sliceStartCU = 0; … … 143 142 m_pDvInfo = NULL; 144 143 #endif 145 146 144 #if H_3D_VSP 147 145 m_piVSPFlag = NULL; 148 146 #endif 149 150 147 #if H_3D_ARP 151 148 m_puhARPW = NULL; 152 149 #endif 153 154 150 #if H_3D_IC 155 151 m_pbICFlag = NULL; … … 783 779 } 784 780 785 UInt uiTmp = uhWidth*uhHeight;786 787 781 if(getPic()->getPicSym()->getInverseCUOrderMap(getAddr())*m_pcPic->getNumPartInCU()+m_uiAbsIdxInLCU >= getSlice()->getSliceSegmentCurStartCUAddr()) 788 782 { 789 783 m_acCUMvField[0].clearMvField(); 790 784 m_acCUMvField[1].clearMvField(); 791 uiTmp = uhWidth*uhHeight;785 UInt uiTmp = uhWidth*uhHeight; 792 786 793 787 memset( m_pcTrCoeffY, 0, uiTmp * sizeof( *m_pcTrCoeffY ) ); … … 1056 1050 m_uiCUPelY = pcCU->getCUPelY() + g_auiRasterToPelY[ g_auiZscanToRaster[uiAbsPartIdx] ]; 1057 1051 1058 UInt uiWidth = g_uiMaxCUWidth >> uiDepth;1059 UInt uiHeight = g_uiMaxCUHeight >> uiDepth;1060 1061 1052 m_skipFlag=pcCU->getSkipFlag() + uiPart; 1062 1053 … … 1139 1130 m_apcCUColocated[1] = pcCU->getCUColocated(REF_PIC_LIST_1); 1140 1131 1141 UInt uiTmp = uiWidth*uiHeight;1142 1132 UInt uiMaxCuWidth=pcCU->getSlice()->getSPS()->getMaxCUWidth(); 1143 1133 UInt uiMaxCuHeight=pcCU->getSlice()->getSPS()->getMaxCUHeight(); … … 1151 1141 m_pcIPCMSampleY = pcCU->getPCMSampleY() + uiCoffOffset; 1152 1142 1153 uiTmp >>= 2;1154 1143 uiCoffOffset >>=2; 1155 1144 m_pcTrCoeffCb=pcCU->getCoeffCb() + uiCoffOffset; … … 1352 1341 memcpy( m_sliceStartCU + uiOffset, pcCU->m_sliceStartCU, sizeof( UInt ) * uiNumPartition ); 1353 1342 memcpy( m_sliceSegmentStartCU + uiOffset, pcCU->m_sliceSegmentStartCU, sizeof( UInt ) * uiNumPartition ); 1354 1355 1343 #if H_3D_ARP 1356 1344 memcpy( m_puhARPW + uiOffset, pcCU->getARPW(), iSizeInUchar ); … … 1430 1418 #endif 1431 1419 #endif 1432 1433 1420 memcpy( rpcCU->getDepth() + m_uiAbsIdxInLCU, m_puhDepth, iSizeInUchar ); 1434 1421 memcpy( rpcCU->getWidth() + m_uiAbsIdxInLCU, m_puhWidth, iSizeInUchar ); … … 1465 1452 memcpy( rpcCU->m_sliceStartCU + m_uiAbsIdxInLCU, m_sliceStartCU, sizeof( UInt ) * m_uiNumPartition ); 1466 1453 memcpy( rpcCU->m_sliceSegmentStartCU + m_uiAbsIdxInLCU, m_sliceSegmentStartCU, sizeof( UInt ) * m_uiNumPartition ); 1467 1468 1454 #if H_3D_ARP 1469 1455 memcpy( rpcCU->getARPW() + m_uiAbsIdxInLCU, m_puhARPW, iSizeInUchar ); … … 1539 1525 #endif 1540 1526 #endif 1541 1542 1527 memcpy( rpcCU->getDepth() + uiPartOffset, m_puhDepth, iSizeInUchar ); 1543 1528 memcpy( rpcCU->getWidth() + uiPartOffset, m_puhWidth, iSizeInUchar ); … … 1575 1560 memcpy( rpcCU->m_sliceStartCU + uiPartOffset, m_sliceStartCU, sizeof( UInt ) * uiQNumPart ); 1576 1561 memcpy( rpcCU->m_sliceSegmentStartCU + uiPartOffset, m_sliceSegmentStartCU, sizeof( UInt ) * uiQNumPart ); 1577 1578 1562 #if H_3D_ARP 1579 1563 memcpy( rpcCU->getARPW() + uiPartOffset, m_puhARPW, iSizeInUchar ); … … 2027 2011 return getSlice()->getSliceQp(); 2028 2012 } 2029 else 2030 if ( iLastValidPartIdx >= 0 ) 2013 else if ( iLastValidPartIdx >= 0 ) 2031 2014 { 2032 2015 return getQP( iLastValidPartIdx ); … … 2255 2238 } 2256 2239 #endif 2257 2258 2240 UInt TComDataCU::getCtxInterDir( UInt uiAbsPartIdx ) 2259 2241 { … … 2492 2474 } 2493 2475 #endif 2494 2495 2476 Void TComDataCU::setMergeFlagSubParts ( Bool bMergeFlag, UInt uiAbsPartIdx, UInt uiPartIdx, UInt uiDepth ) 2496 2477 { … … 2509 2490 } 2510 2491 #endif 2511 2512 2492 Void TComDataCU::setChromIntraDirSubParts( UInt uiDir, UInt uiAbsPartIdx, UInt uiDepth ) 2513 2493 { … … 3030 3010 3031 3011 #endif 3032 3033 3012 /** Constructs a list of merging candidates 3034 3013 * \param uiAbsPartIdx … … 3139 3118 pcTextureCU->getMvField( pcTextureCU, uiPartIdxCenter, REF_PIC_LIST_1, pcMvFieldNeighbours[(iCount<<1)+1] ); 3140 3119 TComMv cMvPred = pcMvFieldNeighbours[(iCount<<1)+1].getMv(); 3141 3142 3120 #if H_3D_IC 3143 3121 const TComMv cAdd( 1 << ( 2 - 1 ), 1 << ( 2 - 1 ) ); … … 3568 3546 //>> MTK colocated-RightBottom 3569 3547 UInt uiPartIdxRB; 3570 Int uiLCUIdx = getAddr();3571 3548 3572 3549 deriveRightBottomIdx( uiPUIdx, uiPartIdxRB ); … … 3577 3554 TComMv cColMv; 3578 3555 Int iRefIdx; 3556 Int uiLCUIdx = -1; 3579 3557 3580 3558 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdxTmp] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 3581 3559 { 3582 uiLCUIdx = -1;3583 3560 } 3584 3561 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdxTmp] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 3585 3562 { 3586 uiLCUIdx = -1;3587 3563 } 3588 3564 else … … 3597 3573 { 3598 3574 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdxTmp + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 3599 uiLCUIdx = -1 ;3600 3575 } 3601 3576 else if ( uiAbsPartIdxTmp / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU … … 3607 3582 { 3608 3583 uiAbsPartAddr = 0; 3609 uiLCUIdx = -1 ;3610 3584 } 3611 3585 } … … 3885 3859 if (!bAdded) 3886 3860 { 3887 bAdded =xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLB, MD_LEFT );3861 xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLB, MD_LEFT ); 3888 3862 } 3889 3863 } … … 3898 3872 if(!bAdded) 3899 3873 { 3900 bAdded =xAddMVPCand( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT);3874 xAddMVPCand( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT); 3901 3875 } 3902 3876 bAdded = bAddedSmvp; … … 3913 3887 if(!bAdded) 3914 3888 { 3915 bAdded =xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT);3889 xAddMVPCandOrder( pInfo, eRefPicList, iRefIdx, uiPartIdxLT, MD_ABOVE_LEFT); 3916 3890 } 3917 3891 } … … 3933 3907 UInt uiAbsPartIdx; 3934 3908 UInt uiAbsPartAddr; 3935 Int uiLCUIdx = getAddr();3936 3909 3937 3910 deriveRightBottomIdx( uiPartIdx, uiPartIdxRB ); … … 3940 3913 //---- co-located RightBottom Temporal Predictor (H) ---// 3941 3914 uiAbsPartIdx = g_auiZscanToRaster[uiPartIdxRB]; 3915 Int uiLCUIdx = -1; 3942 3916 if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelX() + g_auiRasterToPelX[uiAbsPartIdx] + m_pcPic->getMinCUWidth() ) >= m_pcSlice->getSPS()->getPicWidthInLumaSamples() ) // image boundary check 3943 3917 { 3944 uiLCUIdx = -1;3945 3918 } 3946 3919 else if ( ( m_pcPic->getCU(m_uiCUAddr)->getCUPelY() + g_auiRasterToPelY[uiAbsPartIdx] + m_pcPic->getMinCUHeight() ) >= m_pcSlice->getSPS()->getPicHeightInLumaSamples() ) 3947 3920 { 3948 uiLCUIdx = -1;3949 3921 } 3950 3922 else … … 3959 3931 { 3960 3932 uiAbsPartAddr = g_auiRasterToZscan[ (uiAbsPartIdx + uiNumPartInCUWidth + 1) % m_pcPic->getNumPartInCU() ]; 3961 uiLCUIdx = -1 ;3962 3933 } 3963 3934 else if ( uiAbsPartIdx / uiNumPartInCUWidth < m_pcPic->getNumPartInHeight() - 1 ) // is not at the last row of LCU But is last column of LCU … … 3969 3940 { 3970 3941 uiAbsPartAddr = 0; 3971 uiLCUIdx = -1 ;3972 3942 } 3973 3943 } … … 4043 4013 UInt TComDataCU::getIntraSizeIdx(UInt uiAbsPartIdx) 4044 4014 { 4045 UInt uiShift = ( (m_puhTrIdx[uiAbsPartIdx]==0) && (m_pePartSize[uiAbsPartIdx]==SIZE_NxN) ) ? m_puhTrIdx[uiAbsPartIdx]+1 : m_puhTrIdx[uiAbsPartIdx]; 4046 uiShift = ( m_pePartSize[uiAbsPartIdx]==SIZE_NxN ? 1 : 0 ); 4015 UInt uiShift = ( m_pePartSize[uiAbsPartIdx]==SIZE_NxN ? 1 : 0 ); 4047 4016 4048 4017 UChar uiWidth = m_puhWidth[uiAbsPartIdx]>>uiShift; … … 4130 4099 } 4131 4100 4132 #if L0363_MVP_POC4133 4101 if ( pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) >= 0 && m_pcSlice->getRefPic( eRefPicList, iRefIdx)->getPOC() == pcTmpCU->getSlice()->getRefPOC( eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx) )) 4134 #else4135 if ( m_pcSlice->isEqualRef(eRefPicList, pcTmpCU->getCUMvField(eRefPicList)->getRefIdx(uiIdx), iRefIdx) )4136 #endif4137 4102 { 4138 4103 TComMv cMvPred = pcTmpCU->getCUMvField(eRefPicList)->getMv(uiIdx); … … 4340 4305 } 4341 4306 iCurrPOC = m_pcSlice->getPOC(); 4342 iCurrRefPOC = m_pcSlice->getRefPic(eRefPicList, riRefIdx)->getPOC();4343 4307 iColPOC = pColCU->getSlice()->getPOC(); 4344 4308
Note: See TracChangeset for help on using the changeset viewer.