Changeset 319 in SHVCSoftware for branches/SHM-3.0-dev/source/Lib/TLibEncoder
- Timestamp:
- 2 Aug 2013, 22:20:38 (11 years ago)
- Location:
- branches/SHM-3.0-dev/source/Lib/TLibEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncCu.cpp
r313 r319 1889 1889 1890 1890 m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase ); 1891 #if NO_RESIDUAL_FLAG_FOR_BLPRED1892 rpcTempCU->setDepthSubParts( uiDepth, 0 );1893 // rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth );1894 // rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth );1895 m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma ( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0));1896 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0);1897 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(rpcTempCU->getLayerId() - 1), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1);1898 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false );1899 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() );1900 #else1901 1902 1891 m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] ); 1903 1892 … … 1923 1912 } 1924 1913 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1925 #endif1926 1914 1927 1915 xCheckDQP( rpcTempCU ); -
branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncEntropy.cpp
r313 r319 343 343 344 344 #if INTRA_BL 345 #if NO_RESIDUAL_FLAG_FOR_BLPRED346 if( ( !pcCU->isIntra( uiAbsPartIdx ) || pcCU->isIntraBL(uiAbsPartIdx)) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) )347 #else348 345 if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) 349 #endif350 346 #else 351 347 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) … … 607 603 UInt uiChromaOffset = uiLumaOffset>>2; 608 604 609 #if NO_RESIDUAL_FLAG_FOR_BLPRED610 if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) )611 #else612 605 if( pcCU->isIntra(uiAbsPartIdx) ) 613 #endif614 606 { 615 607 DTRACE_CABAC_VL( g_nSymbolCounter++ ) -
branches/SHM-3.0-dev/source/Lib/TLibEncoder/TEncSearch.cpp
r313 r319 1055 1055 pcCU->getPattern()->initAdiPattern( pcCU, uiAbsPartIdx, uiTrDepth, m_piYuvExt, m_iYuvExtStride, m_iYuvExtHeight, bAboveAvail, bLeftAvail ); 1056 1056 //===== get prediction signal ===== 1057 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED1057 #if INTRA_BL 1058 1058 if(pcCU->isIntraBL ( uiAbsPartIdx ) ) 1059 1059 { … … 1247 1247 1248 1248 //===== get prediction signal ===== 1249 #if INTRA_BL && !NO_RESIDUAL_FLAG_FOR_BLPRED1249 #if INTRA_BL 1250 1250 if(pcCU->isIntraBL ( uiAbsPartIdx ) ) 1251 1251 { … … 4567 4567 Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes ) 4568 4568 { 4569 #if NO_RESIDUAL_FLAG_FOR_BLPRED4570 if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0))4571 #else4572 4569 if ( pcCU->isIntra(0) ) 4573 #endif4574 4570 { 4575 4571 return; … … 4682 4678 pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) ); 4683 4679 } 4684 #if NO_RESIDUAL_FLAG_FOR_BLPRED4685 else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros4686 {4687 const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1);4688 ::memset( pcCU->getTransformIdx() , 0, uiQPartNum * sizeof(UChar) );4689 ::memset( pcCU->getCbf( TEXT_LUMA ) , 0, uiQPartNum * sizeof(UChar) );4690 ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) );4691 ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) );4692 ::memset( pcCU->getCoeffY() , 0, uiWidth * uiHeight * sizeof( TCoeff ) );4693 ::memset( pcCU->getCoeffCb() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );4694 ::memset( pcCU->getCoeffCr() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 );4695 pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) );4696 }4697 #endif4698 4680 else 4699 4681 { … … 4994 4976 Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA]; 4995 4977 assert(scalingListType < 6); 4996 #if NO_RESIDUAL_FLAG_FOR_BLPRED4997 if(pcCU->isIntraBL(uiAbsPartIdx) )4998 {4999 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only5000 }5001 else5002 {5003 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only5004 }5005 #else5006 4978 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only 5007 #endif5008 5009 4979 const UInt uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), 5010 4980 pcResi->getLumaAddr( absTUPartIdx ), pcResi->getStride(), trWidth,trHeight ); … … 5275 5245 assert(scalingListType < 6); 5276 5246 5277 #if NO_RESIDUAL_FLAG_FOR_BLPRED5278 if(pcCU->isIntraBL(uiAbsPartIdx) )5279 {5280 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true );5281 }5282 else5283 {5284 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true );5285 }5286 #else5287 5247 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true ); 5288 #endif5289 5248 5290 5249 uiNonzeroDistY = m_pcRdCost->getDistPart(g_bitDepthY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), … … 5618 5577 { 5619 5578 #if INTRA_BL 5620 #if NO_RESIDUAL_FLAG_FOR_BLPRED5621 assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx));5622 #else5623 5579 assert( !pcCU->isIntra(uiAbsPartIdx) ); 5624 #endif5625 5580 #else 5626 5581 assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA ); … … 5863 5818 { 5864 5819 m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true); 5865 #if !NO_RESIDUAL_FLAG_FOR_BLPRED5866 5820 assert( pcCU->isIntraBL( 0 ) == false ); 5867 #endif 5868 } 5869 #endif 5870 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5871 if( !pcCU->isIntraBL(0)) 5872 { 5821 } 5873 5822 #endif 5874 5823 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 5875 5824 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 5876 5825 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 5877 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5878 } 5879 #endif 5826 5880 5827 Bool bDummy = false; 5881 5828 m_pcEntropyCoder->encodeCoeff ( pcCU, 0, pcCU->getDepth(0), pcCU->getWidth(0), pcCU->getHeight(0), bDummy );
Note: See TracChangeset for help on using the changeset viewer.