38 #ifndef __TENCSEARCH__
39 #define __TENCSEARCH__
72 #if ADAPTIVE_QP_SELECTION
86 #if ADAPTIVE_QP_SELECTION
128 Int bipredSearchRange,
130 const UInt maxCUWidth,
131 const UInt maxCUHeight,
132 const UInt maxTotalCUDepth,
194 ,
Bool bUseMRG =
false
211 Void xEncPCM (
TComDataCU* pcCU,
UInt uiAbsPartIdx,
Pel* piOrg,
Pel* piPCM,
Pel* piPred,
Pel* piResi,
Pel* piReco,
UInt uiStride,
UInt uiWidth,
UInt uiHeight,
const ComponentID compID );
244 const Bool checkCrossCPrediction,
249 ,
Int default0Save1Load2 = 0
268 const Pel *pBestLuma,
272 const Int strideResi,
273 const Int strideBest );
346 UChar* uhInterDirNeighbours,
347 Int& numValidMergeCand
353 UChar* interDirNeighbours,
354 Int numValidMergeCand );
374 const Pel*
const piRefY,
375 const Int iRefStride,
376 const TComMv*
const pcMvSrchRngLT,
377 const TComMv*
const pcMvSrchRngRB,
380 const TComMv*
const pIntegerMv2Nx2NPred,
381 const Bool bExtendedSettings
386 const Pel*
const piRefY,
387 const Int iRefStride,
388 const TComMv*
const pcMvSrchRngLT,
389 const TComMv*
const pcMvSrchRngRB,
392 const TComMv*
const pIntegerMv2Nx2NPred
412 const Pel*
const piRefY,
413 const Int iRefStride,
414 const TComMv*
const pcMvSrchRngLT,
415 const TComMv*
const pcMvSrchRngRB,
418 const TComMv*
const pIntegerMv2Nx2NPred
423 const Int iRefStride,
424 const TComMv*
const pcMvSrchRngLT,
425 const TComMv*
const pcMvSrchRngRB,
430 Bool bIsLosslessCoded,
469 #endif // __TENCSEARCH__
Void xRestrictBipredMergeCand(TComDataCU *pcCU, UInt puIdx, TComMvField *mvFieldNeighbours, UChar *interDirNeighbours, Int numValidMergeCand)
entropy encoder class (header)
Void xEncPCM(TComDataCU *pcCU, UInt uiAbsPartIdx, Pel *piOrg, Pel *piPCM, Pel *piPred, Pel *piResi, Pel *piReco, UInt uiStride, UInt uiWidth, UInt uiHeight, const ComponentID compID)
SChar * m_phQTTempCrossComponentPredictionAlpha[MAX_NUM_COMPONENT]
static const UInt MAX_IDX_ADAPT_SR
TCoeff * m_ppcQTTempTUArlCoeff[MAX_NUM_COMPONENT]
prediction class (header)
UInt Distortion
distortion measurement
MESearchMethod
supported ME search methods
Void xTZSearchSelective(const TComDataCU *const pcCU, const TComPattern *const pcPatternKey, const Pel *const piRefY, const Int iRefStride, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *const pIntegerMv2Nx2NPred)
TCoeff ** m_ppcQTTempArlCoeff[MAX_NUM_COMPONENT]
__inline Void xTZSearchHelp(const TComPattern *const pcPatternKey, IntTZSearchStruct &rcStruct, const Int iSearchX, const Int iSearchY, const UChar ucPointNr, const UInt uiDistance)
Void xEncIntraHeader(TComDataCU *pcCU, UInt uiTrDepth, UInt uiAbsPartIdx, Bool bLuma, Bool bChroma)
Void xEncSubdivCbfQT(TComTU &rTu, Bool bLuma, Bool bChroma)
general YUV buffer class (header)
class for motion vector with reference index
static const UInt MAX_NUM_REF_LIST_ADAPT_SR
neighbouring pixel access class for all components
Void xPatternSearchFast(const TComDataCU *const pcCU, const TComPattern *const pcPatternKey, const Pel *const piRefY, const Int iRefStride, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *const pIntegerMv2Nx2NPred)
Void xMotionEstimation(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, RefPicList eRefPicList, TComMv *pcMvPred, Int iRefIdxPred, TComMv &rcMv, UInt &ruiBits, Distortion &ruiCost, Bool bBi=false)
Distortion xPatternRefinement(TComPattern *pcPatternKey, TComMv baseRefMv, Int iFrac, TComMv &rcMvFrac, Bool bAllowUseOfHadamard)
sub-function for motion vector refinement used in fractional-pel accuracy
Void setDistParamComp(ComponentID compIdx)
Void xEncCoeffQT(TComTU &rTu, ComponentID component, Bool bRealCoeff)
Void xTZSearch(const TComDataCU *const pcCU, const TComPattern *const pcPatternKey, const Pel *const piRefY, const Int iRefStride, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD, const TComMv *const pIntegerMv2Nx2NPred, const Bool bExtendedSettings)
Void xSetIntraResultLumaQT(TComYuv *pcRecoYuv, TComTU &rTu)
UInt xGetMvpIdxBits(Int iIdx, Int iNum)
TComYuv m_pcQTTempTransformSkipTComYuv
Void setWpScalingDistParam(TComDataCU *pcCU, Int iRefIdx, RefPicList eRefPicListCur)
set wp tables
__inline Void xTZ8PointSquareSearch(const TComPattern *const pcPatternKey, IntTZSearchStruct &rcStruct, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist)
Void xAddSymbolBitsInter(TComDataCU *pcCU, UInt &ruiBits)
Int m_aaiAdaptSR[MAX_NUM_REF_LIST_ADAPT_SR][MAX_IDX_ADAPT_SR]
static const Int MAX_NUM_REF
max. number of entries in picture reference list
UInt xUpdateCandList(UInt uiMode, Double uiCost, UInt uiFastCandNum, UInt *CandModeList, Double *CandCostList)
Void xCopyAMVPInfo(AMVPInfo *pSrc, AMVPInfo *pDst)
UChar * m_puhQTTempTransformSkipFlag[MAX_NUM_COMPONENT]
Void xIntraCodingTUBlock(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE *MAX_CU_SIZE], const Bool checkCrossCPrediction, Distortion &ruiDist, const ComponentID compID, TComTU &rTu, Int default0Save1Load2=0)
Distortion xGetTemplateCost(TComDataCU *pcCU, UInt uiPartAddr, TComYuv *pcOrgYuv, TComYuv *pcTemplateCand, TComMv cMvCand, Int iMVPIdx, Int iMVPNum, RefPicList eRefPicList, Int iRefIdx, Int iSizeX, Int iSizeY)
Void xRecurIntraChromaCodingQT(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE *MAX_CU_SIZE], Distortion &ruiDist, TComTU &rTu)
Void setAdaptiveSearchRange(Int iDir, Int iRefIdx, Int iSearchRange)
set ME search range
Void xInitTileBorders(const TComDataCU *const pcCU, TComPattern *pcPatternKey)
UInt xModeBitsIntra(TComDataCU *pcCU, UInt uiMode, UInt uiPartOffset, UInt uiDepth, const ChannelType compID)
TCoeff ** m_ppcQTTempCoeff[MAX_NUM_COMPONENT]
PartSize
supported partition shape
UInt m_auiMVPIdxCost[AMVP_MAX_NUM_CANDS+1][AMVP_MAX_NUM_CANDS+1]
encoder configuration class (header)
Void xPatternSearch(const TComPattern *const pcPatternKey, const Pel *piRefY, const Int iRefStride, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, TComMv &rcMv, Distortion &ruiSAD)
Void xEstimateInterResidualQT(TComYuv *pcResi, Double &rdCost, UInt &ruiBits, Distortion &ruiDist, Distortion *puiZeroDist, TComTU &rTu)
TEncSbac * m_pcRDGoOnSbacCoder
static const UInt NUM_MV_PREDICTORS
Void xSetSearchRange(const TComDataCU *const pcCU, const TComMv &cMvPred, const Int iSrchRng, TComMv &rcMvSrchRngLT, TComMv &rcMvSrchRngRB, const TComPattern *const pcPatternKey)
distortion parameter class
Void xExtDIFUpSamplingH(TComPattern *pcPattern)
Generate half-sample interpolated block.
static const Int AMVP_MAX_NUM_CANDS
AMVP: advanced motion vector prediction - max number of final candidates.
RD cost computation class.
#define HHI_RQT_INTRA_SPEEDUP
tests one best mode with full rqt
UInt xGetIntraBitsQT(TComTU &rTu, Bool bLuma, Bool bChroma, Bool bRealCoeff)
motion information handling classes (header)
TComMv m_acMvPredictors[NUM_MV_PREDICTORS]
Int TCoeff
transform coefficient
RefPicList
reference list index
Void xMergeEstimation(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, UInt &uiInterDir, TComMvField *pacMvField, UInt &uiMergeIndex, Distortion &ruiCost, TComMvField *cMvFieldNeighbours, UChar *uhInterDirNeighbours, Int &numValidMergeCand)
estimation of best merge coding
Void init(TEncCfg *pcEncCfg, TComTrQuant *pcTrQuant, Int iSearchRange, Int bipredSearchRange, MESearchMethod motionEstimationSearchMethod, const UInt maxCUWidth, const UInt maxCUHeight, const UInt maxTotalCUDepth, TEncEntropy *pcEntropyCoder, TComRdCost *pcRdCost, TEncSbac ***pppcRDSbacCoder, TEncSbac *pcRDGoOnSbacCoder)
TEncSbac *** m_pppcRDSbacCoder
TEncEntropy * m_pcEntropyCoder
#define AMP_MRG
encoder only force merge for AMP partition (no motion search for AMP)
Void xExtDIFUpSamplingQ(TComPattern *pcPatternKey, TComMv halfPelRef)
Generate quarter-sample interpolated blocks.
UChar * m_puhQTTempCbf[MAX_NUM_COMPONENT]
Void xStoreIntraResultQT(const ComponentID compID, TComTU &rTu)
MESearchMethod m_motionEstimationSearchMethod
Void xGetBlkBits(PartSize eCUMode, Bool bPSlice, Int iPartIdx, UInt uiLastMode, UInt uiBlkBit[3])
Void IPCMSearch(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *rpcPredYuv, TComYuv *rpcResiYuv, TComYuv *rpcRecoYuv)
Function for PCM mode estimation.
Context-adaptive entropy encoder class (header)
Pel * m_pSharedPredTransformSkip[MAX_NUM_COMPONENT]
Void estIntraPredLumaQT(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE *MAX_CU_SIZE])
Void xEstimateMvPredAMVP(TComDataCU *pcCU, TComYuv *pcOrgYuv, UInt uiPartIdx, RefPicList eRefPicList, Int iRefIdx, TComMv &rcMvPred, Bool bFilled=false, Distortion *puiDistBiP=0)
#define DEBUG_STRING_FN_DECLARE(name)
TComTrQuant * m_pcTrQuant
neighbouring pixel access classes (header)
TComYuv * m_pcQTTempTComYuv
Void predInterSearch(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Bool bUseRes=false, Bool bUseMRG=false)
encoder estimation - inter prediction (non-skip)
static const Int MAX_CU_SIZE
= 1<<(MAX_CU_DEPTH)
UInt xGetIntraBitsQTChroma(TComTU &rTu, ComponentID compID, Bool bRealCoeff)
__inline Void xTZ8PointDiamondSearch(const TComPattern *const pcPatternKey, IntTZSearchStruct &rcStruct, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB, const Int iStartX, const Int iStartY, const Int iDist, const Bool bCheckCornersAtDist1)
transform and quantization class
TCoeff * m_pcQTTempTUCoeff[MAX_NUM_COMPONENT]
Void xSetIntraResultChromaQT(TComYuv *pcRecoYuv, TComTU &rTu)
Void xEncodeInterResidualQT(const ComponentID compID, TComTU &rTu)
#define MCTS_ENC_CHECK
Temporal MCTS encoder constraint and decoder checks. Also requires SEITMCTSTileConstraint to be enabl...
Void xGetInterPredictionError(TComDataCU *pcCU, TComYuv *pcYuvOrg, Int iPartIdx, Distortion &ruiSAD, Bool Hadamard)
basic motion vector class
Void xSetInterResidualQTData(TComYuv *pcResi, Bool bSpatial, TComTU &rTu)
Void xRecurIntraCodingLumaQT(TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE *MAX_CU_SIZE], Distortion &ruiDistY, Bool bCheckFirst, Double &dRDCost, TComTU &rTu)
transform and quantization class (header)
Void xStoreCrossComponentPredictionResult(Pel *pResiLuma, const Pel *pBestLuma, TComTU &rTu, const Int xOffset, const Int yOffset, const Int strideResi, const Int strideBest)
__inline Void xTZ2PointSearch(const TComPattern *const pcPatternKey, IntTZSearchStruct &rcStruct, const TComMv *const pcMvSrchRngLT, const TComMv *const pcMvSrchRngRB)
encoder configuration class
Void xPatternSearchFracDIF(Bool bIsLosslessCoded, TComPattern *pcPatternKey, Pel *piRefY, Int iRefStride, TComMv *pcMvInt, TComMv &rcMvHalf, TComMv &rcMvQter, Distortion &ruiCost)
Void xLoadIntraResultQT(const ComponentID compID, TComTU &rTu)
SChar xCalcCrossComponentPredictionAlpha(TComTU &rTu, const ComponentID compID, const Pel *piResiL, const Pel *piResiC, const Int width, const Int height, const Int strideL, const Int strideC)
Void encodeResAndCalcRdInterCU(TComDataCU *pcCU, TComYuv *pcYuvOrg, TComYuv *pcYuvPred, TComYuv *pcYuvResi, TComYuv *pcYuvResiBest, TComYuv *pcYuvRec, Bool bSkipResidual)
encode residual and compute rd-cost for inter mode
Void xCheckBestMVP(TComDataCU *pcCU, RefPicList eRefPicList, TComMv cMv, TComMv &rcMvPred, Int &riMVPIdx, UInt &ruiBits, Distortion &ruiCost)
TComMv m_integerMv2Nx2N[NUM_REF_PIC_LIST_01][MAX_NUM_REF]
Void estIntraPredChromaQT(TComDataCU *pcCU, TComYuv *pcOrgYuv, TComYuv *pcPredYuv, TComYuv *pcResiYuv, TComYuv *pcRecoYuv, Pel resiLuma[NUMBER_OF_STORED_RESIDUAL_TYPES][MAX_CU_SIZE *MAX_CU_SIZE])