HEVC 版本 1 中有 8 种类型的 PU,例如 2Nx2N、Nx2N、2NxN、NxN、2NxnU、2NxnD、nRx2N 和 nLx2N。您可以从 pcCU 中的 m_pePartSize 中看到 PU 类型(TComDataCU* 结构)
我建议参考 TComLoopFilter.cpp 中的 xSetEdgefilterPU 函数 你可以看到如何检查 PU 的类型
switch ( pcCU->getPartitionSize( uiAbsZorderIdx )) {
case SIZE_2Nx2N:
{
break;
}
case SIZE_2NxN:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_HOR, uiHHeightInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_Nx2N:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_VER, uiHWidthInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_NxN:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_VER, uiHWidthInBaseUnits, m_stLFCUParam.bInternalEdge );
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_HOR, uiHHeightInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_2NxnU:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_HOR, uiQHeightInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_2NxnD:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_HOR, uiHeightInBaseUnits - uiQHeightInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_nLx2N:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_VER, uiQWidthInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
case SIZE_nRx2N:
{
xSetEdgefilterMultiple( pcCU, uiAbsZorderIdx, uiDepth, EDGE_VER, uiWidthInBaseUnits - uiQWidthInBaseUnits, m_stLFCUParam.bInternalEdge );
break;
}
default:
{
break;
} }