今天来详细看下色度帧内候选模式列表,函数是getIntraChromaCandModes,代码部分很简单。

MDMS

VTM中使用的是HM色度候选模式,MDMS在CE中,估计是因为复杂度的问题,目前还没有采用。在L0139中给出了一个简单的复杂度分析,性能上使用MDMS相比VTM在AI下的Y BD-rate估计为-0.2%,UV估计约-1%(个人根据提案数据估计,没有具体测过)。
VTM3.0色度帧内候选模式列表
下图是MDMS的候选构成,按下图顺序不重复的填入候选模式,直到列表填满,具体算法不再赘述。
VTM3.0色度帧内候选模式列表

VTM3.0

之前在VTM3.0色度帧内预测跟进中提到已经说明了VTM3.0色度帧内预测相比VTM2.0的改进,这里不再赘述,直接来看VTM3.0中的色度帧内候选列表getIntraChromaCandModes,代码很简单。

void PU::getIntraChromaCandModes( const PredictionUnit &pu, unsigned modeList[NUM_CHROMA_MODE] )
{
  {
    modeList[  0 ] = PLANAR_IDX;
    modeList[  1 ] = VER_IDX;
    modeList[  2 ] = HOR_IDX;
    modeList[  3 ] = DC_IDX;
    modeList[4] = LM_CHROMA_IDX;
#if JVET_L0338_MDLM
    modeList[5] = MDLM_L_IDX;
    modeList[6] = MDLM_T_IDX;
    modeList[7] = DM_CHROMA_IDX;
#else
    modeList[5] = DM_CHROMA_IDX;
#endif

#if JVET_L0053_L0272_DM
    Position topLeftPos = pu.blocks[pu.chType].lumaPos();
    Position refPos = topLeftPos.offset( pu.blocks[pu.chType].lumaSize().width >> 1, pu.blocks[pu.chType].lumaSize().height >> 1 );
    const PredictionUnit *lumaPU = CS::isDualITree( *pu.cs ) ? pu.cs->picture->cs->getPU( refPos, CHANNEL_TYPE_LUMA ) : &pu;
#else
    const PredictionUnit *lumaPU = CS::isDualITree( *pu.cs ) ? pu.cs->picture->cs->getPU( pu.blocks[pu.chType].lumaPos(), CHANNEL_TYPE_LUMA ) : &pu;
#endif
    const uint32_t lumaMode = lumaPU->intraDir[CHANNEL_TYPE_LUMA];

    for( int i = 0; i < 4; i++ )
    {
      if( lumaMode == modeList[i] )
      {
        modeList[i] = VDIA_IDX;
        break;
      }
    }
  }
}

这里和VTM2.0的不同有两处:
1.增加了LM_L和LM_T两种LM新模式。
2.DM模式中改用色度中心位置对应的亮度块的预测模式。
VTM2.0代码部分就不贴了。

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-02-14
  • 2022-12-23
  • 2021-09-15
  • 2021-10-31
  • 2021-10-13
猜你喜欢
  • 2021-07-15
  • 2021-09-03
  • 2021-10-23
  • 2021-07-27
  • 2021-06-28
  • 2021-05-01
  • 2021-04-11
相关资源
相似解决方案