HEVC Test Model (HM)  HM-16.3
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]

Protected Member Functions

Bool getdQPFlag ()
 
Void setdQPFlag (Bool b)
 
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_CodeChromaQpAdjFlag
 
Int m_ChromaQpAdjIdc
 
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 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, UInt uiDepth)
 
Void xCompressCU (TComDataCU *&rpcBestCU, TComDataCU *&rpcTempCU, 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, Double &cost, 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, TComDataCU *pcCU, UInt uiLPelX, UInt uiTPelY)
 
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

Void TEncCu::compressCtu ( TComDataCU pCtu)

CTU analysis function.

Parameters
pCtupointer of CU data class

Definition at line 228 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 274 of file TEncCu.cpp.

Void TEncCu::destroy ( )

destroy internal buffers

Definition at line 112 of file TEncCu.cpp.

Void TEncCu::encodeCtu ( TComDataCU pCtu)

CTU encoding function.

Parameters
pCtupointer of CU data class

Definition at line 252 of file TEncCu.cpp.

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

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

Parameters
pcCU
uiAbsPartIdx
uiDepth
Returns
Void

Definition at line 878 of file TEncCu.cpp.

Bool TEncCu::getCodeChromaQpAdjFlag ( )
inlineprotected

Definition at line 155 of file TEncCu.h.

Bool TEncCu::getdQPFlag ( )
inlineprotected

Definition at line 152 of file TEncCu.h.

Void TEncCu::init ( TEncTop pcEncTop)

copy parameters from encoder class

Parameters
pcEncToppointer of encoder class

Definition at line 205 of file TEncCu.cpp.

Void TEncCu::setCodeChromaQpAdjFlag ( Bool  b)
inlineprotected

Definition at line 156 of file TEncCu.h.

Void TEncCu::setdQPFlag ( Bool  b)
inlineprotected

Definition at line 153 of file TEncCu.h.

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

Definition at line 1128 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 1432 of file TEncCu.cpp.

Void TEncCu::xCheckDQP ( TComDataCU pcCU)
protected

Definition at line 1472 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 1386 of file TEncCu.cpp.

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

Definition at line 1279 of file TEncCu.cpp.

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

Definition at line 1318 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 1154 of file TEncCu.cpp.

Void TEncCu::xCompressCU ( TComDataCU *&  rpcBestCU,
TComDataCU *&  rpcTempCU,
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 349 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 902 of file TEncCu.cpp.

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

Definition at line 1495 of file TEncCu.cpp.

Void TEncCu::xCopyYuv2Pic ( TComPic rpcPic,
UInt  uiCUAddr,
UInt  uiAbsPartIdx,
UInt  uiDepth,
UInt  uiSrcDepth,
TComDataCU pcCU,
UInt  uiLPelX,
UInt  uiTPelY 
)
protected

Definition at line 1503 of file TEncCu.cpp.

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

Definition at line 1516 of file TEncCu.cpp.

Void TEncCu::xCtuCollectARLStats ( TComDataCU pCtu)
protected

Collect ARL statistics from one CTU.

Definition at line 1585 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 933 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 1527 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 1559 of file TEncCu.cpp.

Member Data Documentation

Bool TEncCu::m_bEncodeDQP
private

Definition at line 82 of file TEncCu.h.

Int TEncCu::m_ChromaQpAdjIdc
private

Definition at line 84 of file TEncCu.h.

Bool TEncCu::m_CodeChromaQpAdjFlag
private

Definition at line 83 of file TEncCu.h.

TEncBinCABAC* TEncCu::m_pcBinCABAC
private

Definition at line 93 of file TEncCu.h.

TEncCfg* TEncCu::m_pcEncCfg
private

Definition at line 87 of file TEncCu.h.

TEncEntropy* TEncCu::m_pcEntropyCoder
private

Definition at line 92 of file TEncCu.h.

TEncSearch* TEncCu::m_pcPredSearch
private

Definition at line 88 of file TEncCu.h.

TEncRateCtrl* TEncCu::m_pcRateCtrl
private

Definition at line 98 of file TEncCu.h.

TComRdCost* TEncCu::m_pcRdCost
private

Definition at line 90 of file TEncCu.h.

TEncSbac* TEncCu::m_pcRDGoOnSbacCoder
private

Definition at line 97 of file TEncCu.h.

TComTrQuant* TEncCu::m_pcTrQuant
private

Definition at line 89 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 96 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: