HM代码学习-数据结构-TComYuvPic

本文介绍了HM-16.6版本中TComYuvPic类的学习,包括成员变量m_apiPicBuf和m_piPicOrg的区别,以及create和extendPicBorder函数的作用。extendPicBorder负责边缘填充,而getStride和getTotalHeight分别提供水平和垂直方向的像素数,getBuf与getAddr则涉及带padding和实际图像像素的地址获取。理解这些概念有助于掌握YUV像素值的存储和处理。
摘要由CSDN通过智能技术生成

代码版本:HM-16.6

“数据结构”部分记录学习HM代码过程中总结的一些类的成员变量、成员函数定义和细节。

成员变量

/// picture YUV buffer class
class TComPicYuv
{
private:

  // ------------------------------------------------------------------------------------------------
  //  YUV buffer
  // ------------------------------------------------------------------------------------------------

// 存储像素值数据的缓冲区(包含填充边缘)
  Pel*  m_apiPicBuf[MAX_NUM_COMPONENT];             ///< Buffer (including margin)
// 存储像素值数据的缓冲区(不包含填充边缘)
  Pel*  m_piPicOrg[MAX_NUM_COMPONENT];              ///< m_apiPicBufY + m_iMarginLuma*getStride() + m_iMarginLuma

  // ------------------------------------------------------------------------------------------------
  //  Parameter for general YUV buffer usage
  // ------------------------------------------------------------------------------------------------
// 宽度、高度、颜色格式
  Int   m_iPicWidth;                                ///< Width of picture in pixels
  Int   m_iPicHeight;                               ///< Height of picture in pixels
  ChromaFormat m_chromaFormatIDC;                   ///< Chroma Format
// 给定CTU/CU,查询其在像素buffer中的偏移
  Int*  m_ctuOffsetInBuffer[MAX_NUM_CHANNEL_TYPE];  ///< Gives an offset in the buffer for a given CTU (and channel)
  Int*  m_subCuOffsetInBuffer[MAX_NUM_CHANNEL_TYPE];///< Gives an offset in the buffer for a given sub-CU (and channel), relative to start of CTU
// 边缘填充大小
  Int   m_iMarginX;                                 ///< margin of Luma channel (chroma's may be smaller, depending on ratio)
  Int   m_iMarginY;                                 ///< margin of Luma channel (chroma's may be smaller, depending on ratio)
// 边缘填充flag,构造函数中默认为false
// 通过TComPicYuv::extendPicBor
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值