VTM3.0代码阅读:predIntraAng函数

predIntraAng函数进行帧内角度预测,根据给定的帧内预测模式,求得该模式下的预测像素piPred。
相比于VTM1,函数在进行完帧内DC、planar、角度预测之后,最后会判断进行PDPC。
相比于VTM1,函数中多了一些MRL和宽角度模式的代码。
planar和DC模式的处理过程和VTM1中没有任何变化。

void IntraPrediction::predIntraAng( const ComponentID compId, PelBuf &piPred, const PredictionUnit &pu, const bool useFilteredPredSamples )
{
   
  const ComponentID    compID       = MAP_CHROMA( compId );
  const ChannelType    channelType  = toChannelType( compID );
  const int            iWidth       = piPred.width;
  const int            iHeight      = piPred.height;
  const uint32_t       uiDirMode    = PU::getFinalIntraMode( pu, channelType );	//当前测试的帧内模式


  CHECK( g_aucLog2[iWidth] < 2 && pu.cs->pcv->noChroma2x2, "Size not allowed" );
  CHECK( g_aucLog2[iWidth] > 7, "Size not allowed" );
  CHECK( iWidth != iHeight && !pu.cs->pcv->rectCUs, "Rectangular block are only allowed with QTBT" );

  const int  multiRefIdx = (compID == COMPONENT_Y) ? pu.multiRefIdx : 0;	//MRL的multiRefIdx

  int whRatio           = std::max(1, iWidth / iHeight);
  int hwRatio           = std::max(1, iHeight / iWidth);
  const int  srcStride  = m_topRefLength  + 1 + (whRatio + 1) * multiRefIdx;	//参考像素的stride
  const int  srcHStride = m_leftRefLength + 1 + (hwRatio + 1) * multiRefIdx;
  
																	//initIntraPatternChType函数中得到的当前pu的参考像素
  Pel *ptrSrc = getPredictorPtr(compID, useFilteredPredSamples);	//获得参考像素
  const ClpRng& clpRng(pu.cu-
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值