Changeset 17 in SHVCSoftware for trunk/source/Lib/TLibEncoder
- Timestamp:
- 29 Jan 2013, 03:06:57 (12 years ago)
- Location:
- trunk/source/Lib/TLibEncoder
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/source/Lib/TLibEncoder/TEncCu.cpp
r2 r17 1503 1503 1504 1504 m_pcPredSearch->setBaseRecPic( m_pcPicYuvRecBase ); 1505 #if NO_RESIDUAL_FLAG_FOR_BLPRED 1506 rpcTempCU->setDepthSubParts( uiDepth, 0 ); 1507 // rpcTempCU->setLumaIntraDirSubParts( DC_IDX, 0, uiDepth ); 1508 // rpcTempCU->setChromIntraDirSubParts( DC_IDX, 0, uiDepth ); 1509 m_ppcPredYuvTemp[uiDepth]->copyFromPicLuma ( rpcTempCU->getSlice()->getFullPelBaseRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, rpcTempCU->getWidth(0), rpcTempCU->getHeight(0)); 1510 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 0); 1511 m_ppcPredYuvTemp[uiDepth]->copyFromPicChroma( rpcTempCU->getSlice()->getFullPelBaseRec(), rpcTempCU->getAddr(), rpcTempCU->getZorderIdxInCU(), 0, (rpcTempCU->getWidth(0)>>1), (rpcTempCU->getHeight(0)>>1), 1); 1512 m_pcPredSearch->encodeResAndCalcRdInterCU( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcResiYuvBest[uiDepth], m_ppcRecoYuvTemp[uiDepth], false ); 1513 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1514 #else 1515 1505 1516 m_pcPredSearch->estIntraBLPredQT( rpcTempCU, m_ppcOrigYuv[uiDepth], m_ppcPredYuvTemp[uiDepth], m_ppcResiYuvTemp[uiDepth], m_ppcRecoYuvTemp[uiDepth] ); 1506 1517 … … 1526 1537 } 1527 1538 rpcTempCU->getTotalCost() = m_pcRdCost->calcRdCost( rpcTempCU->getTotalBits(), rpcTempCU->getTotalDistortion() ); 1539 #endif 1528 1540 1529 1541 xCheckDQP( rpcTempCU ); -
trunk/source/Lib/TLibEncoder/TEncEntropy.cpp
r6 r17 476 476 #endif 477 477 #if INTRA_BL 478 #if NO_RESIDUAL_FLAG_FOR_BLPRED 479 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 ) ) 480 #else 478 481 if( ( !pcCU->isIntra( uiAbsPartIdx ) ) && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) 482 #endif 479 483 #else 480 484 if( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA && uiDepth == pcCU->getDepth( uiAbsPartIdx ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_U, 0 ) && !pcCU->getCbf( uiAbsPartIdx, TEXT_CHROMA_V, 0 ) ) … … 754 758 pcCU->convertTransIdx( uiAbsPartIdx, pcCU->getTransformIdx(uiAbsPartIdx), uiLumaTrMode, uiChromaTrMode ); 755 759 760 #if NO_RESIDUAL_FLAG_FOR_BLPRED 761 if( pcCU->isIntra(uiAbsPartIdx) && !pcCU->isIntraBL(uiAbsPartIdx) ) 762 #else 756 763 if( pcCU->isIntra(uiAbsPartIdx) ) 764 #endif 757 765 { 758 766 DTRACE_CABAC_VL( g_nSymbolCounter++ ) -
trunk/source/Lib/TLibEncoder/TEncSearch.cpp
r6 r17 4717 4717 Void TEncSearch::encodeResAndCalcRdInterCU( TComDataCU* pcCU, TComYuv* pcYuvOrg, TComYuv* pcYuvPred, TComYuv*& rpcYuvResi, TComYuv*& rpcYuvResiBest, TComYuv*& rpcYuvRec, Bool bSkipRes ) 4718 4718 { 4719 #if NO_RESIDUAL_FLAG_FOR_BLPRED 4720 if ( pcCU->isIntra(0) && !pcCU->isIntraBL(0)) 4721 #else 4719 4722 if ( pcCU->isIntra(0) ) 4723 #endif 4720 4724 { 4721 4725 return; … … 4840 4844 #endif 4841 4845 } 4846 #if NO_RESIDUAL_FLAG_FOR_BLPRED 4847 else if(pcCU->getLayerId() > 0 && pcCU->isIntraBL(0) && uiZeroDistortion == uiDistortion) // all zeros 4848 { 4849 const UInt uiQPartNum = pcCU->getPic()->getNumPartInCU() >> (pcCU->getDepth(0) << 1); 4850 ::memset( pcCU->getTransformIdx() , 0, uiQPartNum * sizeof(UChar) ); 4851 ::memset( pcCU->getCbf( TEXT_LUMA ) , 0, uiQPartNum * sizeof(UChar) ); 4852 ::memset( pcCU->getCbf( TEXT_CHROMA_U ), 0, uiQPartNum * sizeof(UChar) ); 4853 ::memset( pcCU->getCbf( TEXT_CHROMA_V ), 0, uiQPartNum * sizeof(UChar) ); 4854 ::memset( pcCU->getCoeffY() , 0, uiWidth * uiHeight * sizeof( TCoeff ) ); 4855 ::memset( pcCU->getCoeffCb() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 ); 4856 ::memset( pcCU->getCoeffCr() , 0, uiWidth * uiHeight * sizeof( TCoeff ) >> 2 ); 4857 #if INTER_TRANSFORMSKIP 4858 pcCU->setTransformSkipSubParts ( 0, 0, 0, 0, pcCU->getDepth(0) ); 4859 #endif 4860 } 4861 #endif 4842 4862 else 4843 4863 { … … 5175 5195 Int scalingListType = 3 + g_eTTable[(Int)TEXT_LUMA]; 5176 5196 assert(scalingListType < 6); 5197 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5198 if(pcCU->isIntraBL(uiAbsPartIdx) ) 5199 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType );//this is for inter mode only 5200 else 5201 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 5202 #else 5177 5203 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 5204 #endif 5178 5205 5179 5206 const UInt uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), … … 5514 5541 assert(scalingListType < 6); 5515 5542 5543 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5544 if(pcCU->isIntraBL(uiAbsPartIdx) ) 5545 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,DC_IDX, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true ); 5546 else 5547 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true ); 5548 #else 5516 5549 m_pcTrQuant->invtransformNxN( pcCU->getCUTransquantBypass(uiAbsPartIdx), TEXT_LUMA,REG_DCT, pcResiCurrY, m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), pcCoeffCurrY, trWidth, trHeight, scalingListType, true ); 5550 #endif 5517 5551 5518 5552 uiNonzeroDistY = m_pcRdCost->getDistPart( m_pcQTTempTComYuv[uiQTTempAccessLayer].getLumaAddr( absTUPartIdx ), m_pcQTTempTComYuv[uiQTTempAccessLayer].getStride(), … … 5882 5916 { 5883 5917 #if INTRA_BL 5918 #if NO_RESIDUAL_FLAG_FOR_BLPRED 5919 assert( !pcCU->isIntra(uiAbsPartIdx) || pcCU->isIntraBL(uiAbsPartIdx)); 5920 #else 5884 5921 assert( !pcCU->isIntra(uiAbsPartIdx) ); 5922 #endif 5885 5923 #else 5886 5924 assert( pcCU->getPredictionMode(uiAbsPartIdx) != MODE_INTRA ); … … 6159 6197 { 6160 6198 m_pcEntropyCoder->encodeIntraBLFlag(pcCU, 0, true); 6199 #if !NO_RESIDUAL_FLAG_FOR_BLPRED 6161 6200 assert( pcCU->isIntraBL( 0 ) == false ); 6162 } 6201 #endif 6202 } 6203 #endif 6204 #if NO_RESIDUAL_FLAG_FOR_BLPRED 6205 if( !pcCU->isIntraBL(0)) 6206 { 6163 6207 #endif 6164 6208 m_pcEntropyCoder->encodePredMode( pcCU, 0, true ); 6165 6209 m_pcEntropyCoder->encodePartSize( pcCU, 0, pcCU->getDepth(0), true ); 6166 6210 m_pcEntropyCoder->encodePredInfo( pcCU, 0, true ); 6211 #if NO_RESIDUAL_FLAG_FOR_BLPRED 6212 } 6213 #endif 6167 6214 Bool bDummy = false; 6168 6215 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.