0

我正在使用 HM 12.1 参考代码。我的任务是从编码的 h.265 比特流中找到 PU 尺寸(对称和非对称)。
在 TLibDecoder > TDecEntropy.cpp > decodePUWise 函数中,我插入了一个 printf 语句来打印尺寸,但它似乎没有给出正确的答案。请帮忙!


for ( UInt uiPartIdx = 0, uiSubPartIdx = uiAbsPartIdx; uiPartIdx < uiNumPU; uiPartIdx++, uiSubPartIdx += uiPUOffset ) { printf("%d X %d\n", pcCU->getHeight(uiSubPartIdx), pcCU->getWidth(uiSubPartIdx)); /* I put this code */

  decodeMergeFlag( pcCU, uiSubPartIdx, uiDepth, uiPartIdx );
  ....
  ....

4

1 回答 1

1

HEVC 版本 1 中有 8 种类型的 PU,例如 2Nx2N、Nx2N、2NxN、NxN、2NxnU、2NxnD、nRx2N 和 nLx2N。您可以从 pcCU 中的 m_pePartSize 中看到 PU 类型(TComDataCU* 结构)

我建议参考 TComLoopF​​ilter.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;
}  }
于 2014-03-12T04:02:06.603 回答