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

20 篇文章 1 订阅

 

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

 

xCompressCU大体可分为一下三块.

Void TEncCu::xCompressCU()

{      

     //第一块 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)

// do inter modes, SKIP and 2Nx2N

      if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )

      {

        xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_2Nx2N );

      xCheckRDCostMerge2Nx2N( rpcBestCU, rpcTempCU, &earlyDetectionSkipMode );

      }

     //第二块 for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)

      // do inter modes, NxN, 2NxN, and Nx2N

      if( rpcBestCU->getSlice()->getSliceType() != I_SLICE )

      {

      xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_NxN   );

      xCheckRDCostInter( rpcBestCU, rpcTempCU, SIZE_Nx2N  );

      xCheckRDCostInter      ( rpcBestCU, rpcTempCU, SIZE_2NxN  );

      }

      //! Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)  

      // do normal intra modes // speedup for inter frames

        {

        xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_2Nx2N );

        xCheckRDCostIntra( rpcBestCU, rpcTempCU, SIZE_NxN   );

        }       

        // test PCM

        xCheckIntraPCM (rpcBestCU, rpcTempCU);

      第三块//for (Int iQP=iMinQP; iQP<=iMaxQP; iQP++)

        // further split

      for ( UInt uiPartUnitIdx = 0; uiPartUnitIdx < 4; uiPartUnitIdx++ )

      {

          if ( rpcBestCU->isIntra(0) )

            xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, SIZE_NONE );

          else

            xCompressCU( pcSubBestPartCU, pcSubTempPartCU, uhNextDepth, rpcBestCU->getPartitionSize(0) );

      }

      //check是否使用split

      xCheckBestMode( rpcBestCU, rpcTempCU, uiDepth);

}

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

 

 

评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值