HEVC帧内编码一个CU

来源:互联网 发布:sql导入sybase数据 编辑:程序博客网 时间:2024/05/01 08:02

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

 

原创粉丝点击