Changeset 1234 in SHVCSoftware
- Timestamp:
- 9 Jul 2015, 01:03:38 (9 years ago)
- Location:
- branches/SHM-dev/source/Lib
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.cpp
r1226 r1234 944 944 } 945 945 946 Void TComDataCU::copyToPic( UChar uhDepth, UInt uiPartIdx, UInt uiPartDepth )947 {948 TComDataCU* pCtu = m_pcPic->getCtu( m_ctuRsAddr );949 UInt uiQNumPart = m_uiNumPartition>>(uiPartDepth<<1);950 951 UInt uiPartStart = uiPartIdx*uiQNumPart;952 UInt uiPartOffset = m_absZIdxInCtu + uiPartStart;953 954 const UInt numValidComp=pCtu->getPic()->getNumberValidComponents();955 const UInt numValidChan=pCtu->getPic()->getChromaFormat()==CHROMA_400 ? 1:2;956 957 pCtu->getTotalCost() = m_dTotalCost;958 pCtu->getTotalDistortion() = m_uiTotalDistortion;959 pCtu->getTotalBits() = m_uiTotalBits;960 961 Int iSizeInUchar = sizeof( UChar ) * uiQNumPart;962 Int iSizeInBool = sizeof( Bool ) * uiQNumPart;963 Int sizeInChar = sizeof( Char ) * uiQNumPart;964 965 memcpy( pCtu->getSkipFlag() + uiPartOffset, m_skipFlag, sizeof( *m_skipFlag ) * uiQNumPart );966 967 memcpy( pCtu->getQP() + uiPartOffset, m_phQP, sizeInChar );968 memcpy( pCtu->getPartitionSize() + uiPartOffset, m_pePartSize, sizeof( *m_pePartSize ) * uiQNumPart );969 memcpy( pCtu->getPredictionMode() + uiPartOffset, m_pePredMode, sizeof( *m_pePredMode ) * uiQNumPart );970 971 memcpy( pCtu->getCUTransquantBypass()+ uiPartOffset, m_CUTransquantBypass, sizeof( *m_CUTransquantBypass ) * uiQNumPart );972 memcpy( pCtu->getMergeFlag() + uiPartOffset, m_pbMergeFlag, iSizeInBool );973 memcpy( pCtu->getMergeIndex() + uiPartOffset, m_puhMergeIndex, iSizeInUchar );974 for (UInt ch=0; ch<numValidChan; ch++)975 {976 memcpy( pCtu->getIntraDir(ChannelType(ch)) + uiPartOffset, m_puhIntraDir[ch], iSizeInUchar );977 }978 979 memcpy( pCtu->getInterDir() + uiPartOffset, m_puhInterDir, iSizeInUchar );980 memcpy( pCtu->getTransformIdx() + uiPartOffset, m_puhTrIdx, iSizeInUchar );981 982 for(UInt comp=0; comp<numValidComp; comp++)983 {984 memcpy( pCtu->getCrossComponentPredictionAlpha(ComponentID(comp)) + uiPartOffset, m_crossComponentPredictionAlpha[comp], iSizeInUchar );985 memcpy( pCtu->getTransformSkip(ComponentID(comp) ) + uiPartOffset, m_puhTransformSkip[comp], iSizeInUchar );986 memcpy( pCtu->getCbf(ComponentID(comp)) + uiPartOffset, m_puhCbf[comp], iSizeInUchar );987 memcpy( pCtu->getExplicitRdpcmMode(ComponentID(comp) ) + uiPartOffset, m_explicitRdpcmMode[comp], iSizeInUchar );988 }989 990 memcpy( pCtu->getDepth() + uiPartOffset, m_puhDepth, iSizeInUchar );991 memcpy( pCtu->getWidth() + uiPartOffset, m_puhWidth, iSizeInUchar );992 memcpy( pCtu->getHeight() + uiPartOffset, m_puhHeight, iSizeInUchar );993 994 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)995 {996 const RefPicList rpl=RefPicList(i);997 memcpy( pCtu->getMVPIdx(rpl) + uiPartOffset, m_apiMVPIdx[rpl], iSizeInUchar );998 memcpy( pCtu->getMVPNum(rpl) + uiPartOffset, m_apiMVPNum[rpl], iSizeInUchar );999 }1000 1001 for(UInt i=0; i<NUM_REF_PIC_LIST_01; i++)1002 {1003 const RefPicList rpl=RefPicList(i);1004 m_acCUMvField[rpl].copyTo( pCtu->getCUMvField( rpl ), m_absZIdxInCtu, uiPartStart, uiQNumPart );1005 }1006 1007 memcpy( pCtu->getIPCMFlag() + uiPartOffset, m_pbIPCMFlag, iSizeInBool );1008 1009 const UInt numCoeffY = (g_uiMaxCUWidth*g_uiMaxCUHeight)>>((uhDepth+uiPartDepth)<<1);1010 const UInt offsetY = uiPartOffset*m_pcPic->getMinCUWidth()*m_pcPic->getMinCUHeight();1011 for (UInt comp=0; comp<numValidComp; comp++)1012 {1013 UInt componentShift = m_pcPic->getComponentScaleX(ComponentID(comp)) + m_pcPic->getComponentScaleY(ComponentID(comp));1014 memcpy( pCtu->getCoeff(ComponentID(comp)) + (offsetY>>componentShift), m_pcTrCoeff[comp], sizeof(TCoeff)*(numCoeffY>>componentShift) );1015 #if ADAPTIVE_QP_SELECTION1016 memcpy( pCtu->getArlCoeff(ComponentID(comp)) + (offsetY>>componentShift), m_pcArlCoeff[comp], sizeof(TCoeff)*(numCoeffY>>componentShift) );1017 #endif1018 memcpy( pCtu->getPCMSample(ComponentID(comp)) + (offsetY>>componentShift), m_pcIPCMSample[comp], sizeof(Pel)*(numCoeffY>>componentShift) );1019 }1020 1021 pCtu->getTotalBins() = m_uiTotalBins;1022 }1023 1024 946 // -------------------------------------------------------------------------------------------------------------------- 1025 947 // Other public functions -
branches/SHM-dev/source/Lib/TLibCommon/TComDataCU.h
r1057 r1234 202 202 203 203 Void copyToPic ( UChar uiDepth ); 204 Void copyToPic ( UChar uiDepth, UInt uiPartIdx, UInt uiPartDepth ); 205 204 206 205 // ------------------------------------------------------------------------------------------------------------------- 207 206 // member functions for CU description -
branches/SHM-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r1203 r1234 2975 2975 pcCU->getTotalDistortion() = uiDistortion; 2976 2976 2977 pcCU->copyToPic(uiDepth , 0, 0);2977 pcCU->copyToPic(uiDepth); 2978 2978 } 2979 2979
Note: See TracChangeset for help on using the changeset viewer.