在帧内编码时
在这里首先进行bEarlySkip的判断,是判断是否是SKIP模式,如果不是就进行是否需要进行帧内的判断。如果是I帧即直接进行帧内PU预测,如果不是I帧的话,判断CBF。cbf是code-block-flag标志,如果YUV中的cbf全部为0,则帧内的核查全部跳过不执行,如果不是B帧并且都不为0,才会对intra完全搜索。然后选择该depth的最佳PU模式,进而一个CU分割为4个sub-CU。
// do normal intra modes
if ( !bEarlySkip )
{
// speedup for inter frames
if( rpcBestCU->getSlice()->getSliceType() == I_SLICE ||
rpcBestCU->getCbf( 0, TEXT_LUMA ) != 0 ||
rpcBestCU->getCbf( 0, TEXT_CHROMA_U ) != 0 ||
rpcBestCU->getCbf( 0, TEXT_CHROMA_V ) != 0 ) // avoid very complex intra if it is unlikely
{
xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );
rpcTempCU->initEstData( uiDepth, iQP );
if( uiDepth == g_uiMaxCUDepth - g_uiAddCUDepth )
{
if( rpcTempCU->getWidth(0) > ( 1 << rpcTempCU->getSlice()->getSPS()->getQuadtreeTULog2MinSize() ) )
{
xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN );
rpcTempCU->initEstData( uiDepth, iQP );
}
}
}
}
在这里首先进行bEarlySkip的判断,是判断是否是SKIP模式,如果不是就进行是否需要进行帧内的判断。如果是I帧即直接进行帧内PU预测,如果不是I帧的话,判断CBF。cbf是code-block-flag标志,如果YUV中的cbf全部为0,则帧内的核查全部跳过不执行,如果不是B帧并且都不为0,才会对intra完全搜索。然后选择该depth的最佳PU模式,进而一个CU分割为4个sub-CU。