<TComPic.h>
line :178-181
#if CU_SPILT
TComPic *m_pcPrevPic;
#endif
TComPi.cpp
LINE406: Int iSize = Int( m_cListPic.size() );
#if CU_SPILT
TComList<TComPic*>::iterator iterP = m_cListPic.end();
iterP--;
rpcPic->m_pcPrevPic = *iterP;
#endif
LINE:442
m_cListPic.pushBack( rpcPic );
#if CU_SPILT
TComList<TComPic*>::iterator iterP = m_cListPic.end();
iterP--;
if(iterP != m_cListPic.begin())
iterP--;
rpcPic->m_pcPrevPic = *iterP;
#endif
TEncCU.cpp
LINE:244
xCompressCU( m_ppcBestCU[0], m_ppcTempCU[0], 0 );
#if CU_SPILT
TComDataCU *pcPrevCU = rpcCU->getPic()->m_pcPrevPic->getCU(rpcCU->getAddr());
for(int zIdx=0; zIdx <256 ;zIdx++ )
{
// UInt quadtreeTUMaxDepth = rpcCU->getPredictionMode( zIdx ) == MODE_INTRA ? rpcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthIntra() : rpcCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter();
Int intraSplitFlag = (rpcCU->getPredictionMode( zIdx ) == MODE_INTRA &&rpcCU->getPartitionSize(zIdx) == SIZE_NxN ) ? 1 : 0;
Int interSplitFlag = (rpcCU->getPredictionMode( zIdx ) == MODE_INTER) && (rpcCU->getPartitionSize(zIdx) != SIZE_2Nx2N);
bool SplitFlag =interSplitFlag;// ||interSplitFlag;
UInt Depth =pcPrevCU->getDepth(zIdx)+SplitFlag;
// UInt quadtreePrevTUMaxDepth = pcPrevCU->getPredictionMode( zIdx ) == MODE_INTRA ? pcPrevCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthIntra() : pcPrevCU->getSlice()->getSPS()->getQuadtreeTUMaxDepthInter();
Int intraPrevSplitFlag = (pcPrevCU->getPredictionMode( zIdx ) == MODE_INTRA &&pcPrevCU->getPartitionSize(zIdx) == SIZE_NxN ) ? 1 : 0;
Int interPrevSplitFlag = (pcPrevCU->getPredictionMode( zIdx ) == MODE_INTER) && (pcPrevCU->getPartitionSize(zIdx) != SIZE_2Nx2N);
bool PrevSplitFlag =interPrevSplitFlag;// ||interPrevSplitFlag;
UInt PrevDepth =pcPrevCU->getDepth(zIdx)+PrevSplitFlag;
switch(Depth){
case 0:
num0++;
if( PrevDepth==Depth)
NUM0++;
break;
case 1:
num1++;
if( PrevDepth==Depth)
NUM1++;
break;
case 2:
num2++;
if( PrevDepth==Depth)
NUM2++;
break;
case 3:
num3++;
if( PrevDepth==Depth)
NUM3++;
break;
case 4:
num4++;
if( PrevDepth==Depth)
NUM4++;
break;
default :
break;
}
}
Hit0=NUM0/num0*100,Hit1=NUM1/num1*100, Hit2=NUM2/num2*100,Hit3=NUM3/num3*100,Hit4=NUM4/num4*100;
ofstream file ;
file.open("E:\\code\\output\\pu-hit.txt",ios::in|ios::app);
file<<"Hit0: "<<Hit0<<"%--Hit1: "<<Hit1<<"% num2 : "<<num2<<"NUM2 "<< NUM2<<" --Hit2: "<<Hit2<<"%"<<endl;
file<<"num3 : "<<num3<<"NUM3 "<< NUM3<<" Hit3:"<<Hit3<<"%--Hit4: "<<Hit4<<"%"<<endl;
file<<"------------------"<<endl;
file.close();
#endif
测试20帧:Hit0--4都达到99%