HEVC代码阅读- -predIntraLumaAng函数

predIntraLumaAng函数

功能:执行具体的亮度预测过程,包括角度模式预测、Planar模式预测和DC滤波操作。

 

Void TComPrediction::predIntraLumaAng(TComPattern* pcTComPattern, UInt uiDirMode, Pel* piPred, UInt uiStride, Int iWidth, Int iHeight,  TComDataCU* pcCU, Bool bAbove, Bool bLeft )
{
  Pel *pDst = piPred;
  Int *ptrSrc;

  //限制块的大小
  assert( g_aucConvertToBit[ iWidth ] >= 0 ); //   4x  4
  assert( g_aucConvertToBit[ iWidth ] <= 5 ); // 128x128
  assert( iWidth == iHeight  );

  //返回预测像素的位置- -指针
  ptrSrc = pcTComPattern->getPredictorPtr( uiDirMode, g_aucConvertToBit[ iWidth ] + 2, m_piYuvExt );

  
  //获取块开始的像素--位置信息
  Int sw = 2 * iWidth + 1;

  // Create the prediction
  // ptrSrc+sw+1是块的开始位置- -指针
  if ( uiDirMode == PLANAR_IDX )//Planar模式
  {
    xPredIntraPlanar( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight );
  }
  else//Angular模式
  {
    xPredIntraAng( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight, uiDirMode, bAbove, bLeft, true );

    if( (uiDirMode == DC_IDX ) && bAbove && bLeft )//DC模式的滤波操作
    {
      xDCPredFiltering( ptrSrc+sw+1, sw, pDst, uiStride, iWidth, iHeight);
    }
  }
}

 
posted @ 2021-02-02 16:34  Keep_Silent  阅读(1)  评论(0编辑  收藏  举报