HEVC帧内编码一个CU

HEVC帧内编码一个CU

1.        CU编码开始于函数TEncCu::xCompressCU();

2.        然后由函数xCheckRDCostIntra()调用函数estIntraPredQT(),estIntraPredChromaQT()进行色度和亮度预测;

3.        estIntraPredQT()函数根据uiNumPU(前一篇博客已讲),遍历每一个subpart;

4.        对于每一个子划分做35种模式进行初步预测,并进行hadamard变换。通过xUpdateCandList()更新CandCostList,这样就得到一个按uiCost由小到大排列的帧内编码模式CandModeList;

UInt TEncSearch::xUpdateCandList( UIntuiMode, Double uiCost, UInt uiFastCandNum, UInt * CandModeList, Double *CandCostList )
{
 UInt i;
 UInt shift=0;
 //=====找到当前uiCost的位置,本身CandCostList是按由小到大排列。类似冒泡排序
 while ( shift<uiFastCandNum && uiCost<CandCostList[uiFastCandNum-1-shift ] ) shift++;
 
  if(shift!=0 )
  {
         //=====数组中所有数据从当前位置往后顶,空出uiCost的位置
   for(i=1; i<shift; i++)
    {
     CandModeList[ uiFastCandNum-i ] = CandModeList[ uiFastCandNum-1-i ];
     CandCostList[ uiFastCandNum-i ] = CandCostList[ uiFastCandNum-1-i ];
    }
         //=====更新当前位置的模式和cost
   CandModeList[ uiFastCandNum-shift ] = uiMode;
   CandCostList[ uiFastCandNum-shift ] = uiCost;
   return 1;
  }
 
 return 0;
}


5.        接下来就是宏FAST_UDI_USE_MPM来进行MPM预测,然后进行遍历numModesForFullRD进行帧内预测,其实有个问题:不是MPM增加了numModesForFullRD吗?但是这里他并没有把MPM算进去,不知道为什么,接下来再仔细想想。有想法再说。

Jyno  2013/09/09

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值