HEVC Test Model (HM)  HM-16.18
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Member Functions | Private Attributes | List of all members
TEncCu Class Reference

CU encoder class. More...

#include <TEncCu.h>

Collaboration diagram for TEncCu:
Collaboration graph
[legend]

Public Member Functions

Void setSliceEncoder (TEncSlice *pSliceEncoder)
 
TEncSlicegetSliceEncoder ()
 
Void setFastDeltaQp (Bool b)
 

Protected Member Functions

Bool getdQPFlag ()
 
Void setdQPFlag (Bool b)
 
Bool getFastDeltaQp () const
 
Bool getCodeChromaQpAdjFlag ()
 
Void setCodeChromaQpAdjFlag (Bool b)
 

Private Attributes

TComDataCU ** m_ppcBestCU
 Best CUs in each depth. More...
 
TComDataCU ** m_ppcTempCU
 Temporary CUs in each depth. More...
 
UChar m_uhTotalDepth
 
TComYuv ** m_ppcPredYuvBest
 Best Prediction Yuv for each depth. More...
 
TComYuv ** m_ppcResiYuvBest
 Best Residual Yuv for each depth. More...
 
TComYuv ** m_ppcRecoYuvBest
 Best Reconstruction Yuv for each depth. More...
 
TComYuv ** m_ppcPredYuvTemp
 Temporary Prediction Yuv for each depth. More...
 
TComYuv ** m_ppcResiYuvTemp
 Temporary Residual Yuv for each depth. More...
 
TComYuv ** m_ppcRecoYuvTemp
 Temporary Reconstruction Yuv for each depth. More...
 
TComYuv ** m_ppcOrigYuv
 Original Yuv for each depth. More...
 
Bool m_bEncodeDQP
 
Bool m_bFastDeltaQP
 
Bool m_stillToCodeChromaQpOffsetFlag
 
Int m_cuChromaQpOffsetIdxPlus1
 
Int m_lumaLevelToDeltaQPLUT [LUMA_LEVEL_TO_DQP_LUT_MAXSIZE]
 
Int m_lumaQPOffset
 
TEncSlicem_pcSliceEncoder
 
TEncCfgm_pcEncCfg
 
TEncSearchm_pcPredSearch
 
TComTrQuantm_pcTrQuant
 
TComRdCostm_pcRdCost
 
TEncEntropym_pcEntropyCoder
 
TEncBinCABACm_pcBinCABAC
 
TEncSbac *** m_pppcRDSbacCoder
 
TEncSbacm_pcRDGoOnSbacCoder
 
TEncRateCtrlm_pcRateCtrl
 
Void init (TEncTop *pcEncTop)
 copy parameters from encoder class More...
 
Void initLumaDeltaQpLUT ()
 
Int calculateLumaDQP (TComDataCU *pCU, const UInt absPartIdx, const TComYuv *pOrgYuv)
 
Void create (UChar uhTotalDepth, UInt iMaxWidth, UInt iMaxHeight, ChromaFormat chromaFormat)
 create internal buffers More...
 
Void destroy ()
 destroy internal buffers More...
 
Void compressCtu (TComDataCU *pCtu)
 CTU analysis function. More...
 
Void encodeCtu (TComDataCU *pCtu)
 CTU encoding function. More...
 
Int updateCtuDataISlice (TComDataCU *pCtu, Int width, Int height)
 
Void finishCU (TComDataCU *pcCU, UInt uiAbsPartIdx)
 
Void xCompressCU (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, const UInt uiDepth, PartSize eParentPartSize=NUMBER_OF_PART_SIZES)
 
Void xEncodeCU (TComDataCU *pcCU, UInt uiAbsPartIdx, UInt uiDepth)
 
Int xComputeQP (TComDataCU *pcCU, UInt uiDepth)
 
Void xCheckBestMode (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, UInt uiDepth)
 
Void xCheckRDCostMerge2Nx2N (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, Bool *earlyDetectionSkipMode)
 
Void xCheckRDCostInter (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, PartSize ePartSize, Bool bUseMRG=false)
 
Void xCheckRDCostIntra (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, PartSize ePartSize)
 
Void xCheckDQP (TComDataCU *pcCU)
 
Void xCheckIntraPCM (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU)
 
Void xCopyAMVPInfo (AMVPInfo *pSrc, AMVPInfo *pDst)
 
Void xCopyYuv2Pic (TComPic *rpcPic, UInt uiCUAddr, UInt uiAbsPartIdx, UInt uiDepth, UInt uiSrcDepth)
 
Void xCopyYuv2Tmp (UInt uhPartUnitIdx, UInt uiDepth)
 
Void xCtuCollectARLStats (TComDataCU *pCtu)
 Collect ARL statistics from one CTU. More...
 
Int xTuCollectARLStats (TCoeff *rpcCoeff, TCoeff *rpcArlCoeff, Int NumCoeffInCU, Double *cSum, UInt *numSamples)
 
Void deriveTestModeAMP (TComDataCU *pcBestCU, PartSize eParentPartSize, Bool &bTestAMP_Hor, Bool &bTestAMP_Ver, Bool &bTestMergeAMP_Hor, Bool &bTestMergeAMP_Ver)
 Derive small set of test modes for AMP encoder speed-up. More...
 
Void xFillPCMBuffer (TComDataCU *pCU, TComYuv *pOrgYuv)
 

Detailed Description

CU encoder class.

Definition at line 65 of file TEncCu.h.

Member Function Documentation

Int TEncCu::calculateLumaDQP ( TComDataCU pCU,
const UInt  absPartIdx,
const TComYuv pOrgYuv 
)

Definition at line 299 of file TEncCu.cpp.

Void TEncCu::compressCtu ( TComDataCU pCtu)

CTU analysis function.

Parameters
pCtupointer of CU data class

Definition at line 231 of file TEncCu.cpp.

Void TEncCu::deriveTestModeAMP ( TComDataCU pcBestCU,
PartSize  eParentPartSize,
Bool bTestAMP_Hor,
Bool bTestAMP_Ver,
Bool bTestMergeAMP_Hor,
Bool bTestMergeAMP_Ver 
)
protected

Derive small set of test modes for AMP encoder speed-up.

Utilizing the partition size of parent PU

if parent is intra

Definition at line 360 of file TEncCu.cpp.

Void TEncCu::destroy ( )

destroy internal buffers

Definition at line 113 of file TEncCu.cpp.

Void TEncCu::encodeCtu ( TComDataCU pCtu)

CTU encoding function.

Parameters
pCtupointer of CU data class

Definition at line 255 of file TEncCu.cpp.

Void TEncCu::finishCU ( TComDataCU pcCU,
UInt  uiAbsPartIdx 
)
protected

finish encoding a cu and handle end-of-slice conditions

Parameters
pcCU
uiAbsPartIdx
uiDepth
Returns
Void

Definition at line 1012 of file TEncCu.cpp.

Bool TEncCu::getCodeChromaQpAdjFlag ( )
inlineprotected

Definition at line 167 of file TEncCu.h.

Bool TEncCu::getdQPFlag ( )
inlineprotected

Definition at line 162 of file TEncCu.h.

Bool TEncCu::getFastDeltaQp ( ) const
inlineprotected

Definition at line 165 of file TEncCu.h.

TEncSlice* TEncCu::getSliceEncoder ( )
inline

Definition at line 109 of file TEncCu.h.

Void TEncCu::init ( TEncTop pcEncTop)

copy parameters from encoder class

Parameters
pcEncToppointer of encoder class

Definition at line 206 of file TEncCu.cpp.

Void TEncCu::initLumaDeltaQpLUT ( )

Definition at line 275 of file TEncCu.cpp.

Void TEncCu::setCodeChromaQpAdjFlag ( Bool  b)
inlineprotected

Definition at line 168 of file TEncCu.h.

Void TEncCu::setdQPFlag ( Bool  b)
inlineprotected

Definition at line 163 of file TEncCu.h.

Void TEncCu::setFastDeltaQp ( Bool  b)
inline

Definition at line 127 of file TEncCu.h.

Void TEncCu::setSliceEncoder ( TEncSlice pSliceEncoder)
inline

Definition at line 108 of file TEncCu.h.

Int TEncCu::updateCtuDataISlice ( TComDataCU pCtu,
Int  width,
Int  height 
)

Definition at line 1267 of file TEncCu.cpp.

Void TEncCu::xCheckBestMode ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
UInt  uiDepth 
)
protected

check whether current try is the best with identifying the depth of current try

Parameters
rpcBestCU
rpcTempCU
uiDepth

Definition at line 1631 of file TEncCu.cpp.

Void TEncCu::xCheckDQP ( TComDataCU pcCU)
protected

Definition at line 1671 of file TEncCu.cpp.

Void TEncCu::xCheckIntraPCM ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU 
)
protected

Check R-D costs for a CU with PCM mode.

Parameters
rpcBestCUpointer to best mode CU data structure
rpcTempCUpointer to testing mode CU data structure
Returns
Void
Note
Current PCM implementation encodes sample values in a lossless way. The distortion of PCM mode CUs are zero. PCM mode is selected if the best mode yields bits greater than that of PCM mode.

Definition at line 1575 of file TEncCu.cpp.

Void TEncCu::xCheckRDCostInter ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
PartSize  ePartSize,
Bool  bUseMRG = false 
)
protected

Definition at line 1440 of file TEncCu.cpp.

Void TEncCu::xCheckRDCostIntra ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
PartSize  ePartSize 
)
protected

Definition at line 1500 of file TEncCu.cpp.

Void TEncCu::xCheckRDCostMerge2Nx2N ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
Bool earlyDetectionSkipMode 
)
protected

check RD costs for a CU block encoded with merge

Parameters
rpcBestCU
rpcTempCU
earlyDetectionSkipMode

Definition at line 1293 of file TEncCu.cpp.

Void TEncCu::xCompressCU ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
const UInt  uiDepth,
PartSize  eParentPartSize = NUMBER_OF_PART_SIZES 
)
protected

Compress a CU block recursively with enabling sub-CTU-level delta QP

  • for loop of QP value to compress the current CU with all possible QP

Try AMP (SIZE_2NxnU, SIZE_2NxnD, SIZE_nLx2N, SIZE_nRx2N)

Do horizontal AMP

Do horizontal AMP

Definition at line 435 of file TEncCu.cpp.

Int TEncCu::xComputeQP ( TComDataCU pcCU,
UInt  uiDepth 
)
protected

Compute QP for each CU

Parameters
pcCUTarget CU
uiDepthCU depth
Returns
quantization parameter

Definition at line 1036 of file TEncCu.cpp.

Void TEncCu::xCopyAMVPInfo ( AMVPInfo pSrc,
AMVPInfo pDst 
)
protected

Definition at line 1693 of file TEncCu.cpp.

Void TEncCu::xCopyYuv2Pic ( TComPic rpcPic,
UInt  uiCUAddr,
UInt  uiAbsPartIdx,
UInt  uiDepth,
UInt  uiSrcDepth 
)
protected

Definition at line 1701 of file TEncCu.cpp.

Void TEncCu::xCopyYuv2Tmp ( UInt  uhPartUnitIdx,
UInt  uiDepth 
)
protected

Definition at line 1714 of file TEncCu.cpp.

Void TEncCu::xCtuCollectARLStats ( TComDataCU pCtu)
protected

Collect ARL statistics from one CTU.

Definition at line 1783 of file TEncCu.cpp.

Void TEncCu::xEncodeCU ( TComDataCU pcCU,
UInt  uiAbsPartIdx,
UInt  uiDepth 
)
protected

encode a CU block recursively

Parameters
pcCU
uiAbsPartIdx
uiDepth
Returns
Void

Definition at line 1067 of file TEncCu.cpp.

Void TEncCu::xFillPCMBuffer ( TComDataCU pCU,
TComYuv pOrgYuv 
)
protected

Function for filling the PCM buffer of a CU using its original sample array

Parameters
pCUpointer to current CU
pOrgYuvpointer to original sample array

Definition at line 1725 of file TEncCu.cpp.

Int TEncCu::xTuCollectARLStats ( TCoeff rpcCoeff,
TCoeff rpcArlCoeff,
Int  NumCoeffInCU,
Double cSum,
UInt numSamples 
)
protected

Collect ARL statistics from one block

Definition at line 1757 of file TEncCu.cpp.

Member Data Documentation

Bool TEncCu::m_bEncodeDQP
private

Definition at line 82 of file TEncCu.h.

Bool TEncCu::m_bFastDeltaQP
private

Definition at line 83 of file TEncCu.h.

Int TEncCu::m_cuChromaQpOffsetIdxPlus1
private

Definition at line 85 of file TEncCu.h.

Int TEncCu::m_lumaLevelToDeltaQPLUT[LUMA_LEVEL_TO_DQP_LUT_MAXSIZE]
private

Definition at line 86 of file TEncCu.h.

Int TEncCu::m_lumaQPOffset
private

Definition at line 87 of file TEncCu.h.

TEncBinCABAC* TEncCu::m_pcBinCABAC
private

Definition at line 97 of file TEncCu.h.

TEncCfg* TEncCu::m_pcEncCfg
private

Definition at line 91 of file TEncCu.h.

TEncEntropy* TEncCu::m_pcEntropyCoder
private

Definition at line 96 of file TEncCu.h.

TEncSearch* TEncCu::m_pcPredSearch
private

Definition at line 92 of file TEncCu.h.

TEncRateCtrl* TEncCu::m_pcRateCtrl
private

Definition at line 102 of file TEncCu.h.

TComRdCost* TEncCu::m_pcRdCost
private

Definition at line 94 of file TEncCu.h.

TEncSbac* TEncCu::m_pcRDGoOnSbacCoder
private

Definition at line 101 of file TEncCu.h.

TEncSlice* TEncCu::m_pcSliceEncoder
private

Definition at line 88 of file TEncCu.h.

TComTrQuant* TEncCu::m_pcTrQuant
private

Definition at line 93 of file TEncCu.h.

TComDataCU** TEncCu::m_ppcBestCU
private

Best CUs in each depth.

Definition at line 69 of file TEncCu.h.

TComYuv** TEncCu::m_ppcOrigYuv
private

Original Yuv for each depth.

Definition at line 79 of file TEncCu.h.

TComYuv** TEncCu::m_ppcPredYuvBest
private

Best Prediction Yuv for each depth.

Definition at line 73 of file TEncCu.h.

TComYuv** TEncCu::m_ppcPredYuvTemp
private

Temporary Prediction Yuv for each depth.

Definition at line 76 of file TEncCu.h.

TComYuv** TEncCu::m_ppcRecoYuvBest
private

Best Reconstruction Yuv for each depth.

Definition at line 75 of file TEncCu.h.

TComYuv** TEncCu::m_ppcRecoYuvTemp
private

Temporary Reconstruction Yuv for each depth.

Definition at line 78 of file TEncCu.h.

TComYuv** TEncCu::m_ppcResiYuvBest
private

Best Residual Yuv for each depth.

Definition at line 74 of file TEncCu.h.

TComYuv** TEncCu::m_ppcResiYuvTemp
private

Temporary Residual Yuv for each depth.

Definition at line 77 of file TEncCu.h.

TComDataCU** TEncCu::m_ppcTempCU
private

Temporary CUs in each depth.

Definition at line 70 of file TEncCu.h.

TEncSbac*** TEncCu::m_pppcRDSbacCoder
private

Definition at line 100 of file TEncCu.h.

Bool TEncCu::m_stillToCodeChromaQpOffsetFlag
private

Definition at line 84 of file TEncCu.h.

UChar TEncCu::m_uhTotalDepth
private

Definition at line 71 of file TEncCu.h.


The documentation for this class was generated from the following files: