VTM1.0代码阅读:EncModeCtrl类

EncModeCtrl类控制ctu中所有cu在compress过程中需要test的模式,其中最主要的成员变量是一个堆栈,用来存储ctu中各个cu的情况。
EncCu::*m_modeCtrl在xCompressCU函数中用来控制一个cu需要test的模式。可以看到m_modeCtrl被定义在了EncCu类中,即m_modeCtrl其实是用来控制一个ctu中所有cu的compress过程的test模式。
m_modeCtrl中的成员m_ComprCUCtxList堆栈,就是用来存储一个ctu中的所有cu在compress过程中的test模式。
m_ComprCUCtxList堆栈中的成员ComprCUCtx,则是用来存储ctu中的一个cu在compress过程中的各种数据,而ComprCUCtx::testModes堆栈,则用来存储一个cu需要test的各种模式。

struct ComprCUCtx		//用来存储ctu中的一个cu在compress过程中的各种数据
{
   
  unsigned                          minDepth;
  unsigned                          maxDepth;
  unsigned                          cuX, cuY, cuW, cuH, partIdx;	//cu的pos和size
  std::vector<EncTestMode>          testModes;			//堆栈,用来存储一个cu在compress过程中需要test的所有模式
  EncTestMode                       lastTestMode;		//一个cu test的上一个模式
  bool                              earlySkip;
  CodingStructure                  *bestCS;
  CodingUnit                       *bestCU;
  TransformUnit                    *bestTU;				//记录compress过程中cu的最优数据
  static_vector<Int64,  30>         extraFeatures;
  static_vector<double, 30>         extraFeaturesd;
  double                            bestInterCost;
  Distortion                        interHad;
	///...
};

class EncModeCtrl		//控制ctu中所有cu在compress过程中需要test的模式
{
   
protected:

  const EncCfg         *m_pcEncCfg;
  const class RateCtrl *m_pcRateCtrl;
        class RdCost   *m_pcRdCost;
  const Slice          *m_slice;
#if SHARP_LUMA_DELTA_QP
  int                   m_lumaLevelToDeltaQPLUT[LUMA_LEVEL_TO_DQP_LUT_MAXSIZE];
  int                   m_lumaQPOffset;
#endif
  bool                  m_fastDeltaQP;
							//堆栈,用来存储一个ctu中的所有cu在compress过程中的test模式
  static_vector<ComprCUCtx, ( MAX_CU_DEPTH << 2 )>
  • 2
    点赞
  • 9
    收藏
    觉得还不错? 一键收藏
  • 3
    评论
评论 3
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值