HEVC 中主要LCU分析函数xCompressCU说明

 

HEVC 中主要LCU分析函数xCompressCU说明

分类: H.265 HEVC   145人阅读  评论(0)  收藏  举报

 

所有LCU都是通过调用xCompressCU来实现其CU/PU划分. 然后通过其结果再调用 TEncCu::xencodeCU 函数来实现对所有CUs进行压缩编码.

 

xCompressCU大体可分为一下三块.

  1. Void TEncCu::xCompressCU()  
  2.   
  3. {        
  4.   
  5.      //第一块 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)  
  6.   
  7. // do inter modes, SKIP and 2Nx2N  
  8.   
  9.       if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )  
  10.   
  11.       {  
  12.   
  13.         xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  
  14.   
  15.       xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );  
  16.   
  17.       }  
  18.   
  19.      //第二块 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)  
  20.   
  21.       // do inter modes, NxN, 2NxN, and Nx2N  
  22.   
  23.       if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )  
  24.   
  25.       {  
  26.   
  27.       xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );  
  28.   
  29.       xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );  
  30.   
  31.       xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );  
  32.   
  33.       }  
  34.   
  35.       //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)    
  36.   
  37.       // do normal intra modes // speedup for inter frames  
  38.   
  39.         {  
  40.   
  41.         xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );  
  42.   
  43.         xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );  
  44.   
  45.         }         
  46.   
  47.         // test PCM  
  48.   
  49.         xCheckIntraPCM (rpcBestCU, rpcTempCU);  
  50.   
  51.       第三块//for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)  
  52.   
  53.         // further split  
  54.   
  55.       for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ )  
  56.   
  57.       {  
  58.   
  59.           if ( rpcBestCU->isIntra(0) )  
  60.   
  61.             xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, SIZE_NONE );  
  62.   
  63.           else  
  64.   
  65.             xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, rpcBestCU->getPartitionSize(0) );  
  66.   
  67.       }  
  68.   
  69.       //check是否使用split  
  70.   
  71.       xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth);  
  72.   
  73. }  

前2块实现对本层LCU的模式选择RDcost计算, 最后一块实现下层分割的计算,最后通过xCheckBestMode来比较是否选用分割!

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值