代码版本: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