38 #ifndef __TCOMTRQUANT__
39 #define __TCOMTRQUANT__
70 Int blockRootCbpBits[4][2 ];
89 const Int chromaQPOffset,
106 Bool useRDOQ =
false,
107 Bool useRDOQTS =
false,
108 Bool useSelectiveRDOQ =
false,
110 Bool useTransformSkipFast =
false
112 ,
Bool bUseAdaptQpSelect =
false
122 #
if ADAPTIVE_QP_SELECTION
147 #if RDOQ_CHROMA_LAMBDA
161 const Int scanPosition,
162 const Int log2BlockWidth,
163 const Int log2BlockHeight,
170 const UInt widthInGroups,
171 const UInt heightInGroups);
190 #if ADAPTIVE_QP_SELECTION
202 #if ADAPTIVE_QP_SELECTION
210 #if RDOQ_CHROMA_LAMBDA
220 #if ADAPTIVE_QP_SELECTION
245 #
if ADAPTIVE_QP_SELECTION
262 #
if ADAPTIVE_QP_SELECTION
283 Bool useLimitedPrefixLength,
284 const Int maxLog2TrDynamicRange
289 const UShort ui16CtxNumOne,
290 const UShort ui16CtxNumAbs,
291 const UShort ui16AbsGoRice,
294 const Bool useLimitedPrefixLength,
295 const Int maxLog2TrDynamicRange
335 #endif // __TCOMTRQUANT__
Bool xNeedRDOQ(TComTU &rTu, TCoeff *pSrc, const ComponentID compID, const QpParam &cQP)
static const Int SCALING_LIST_REM_NUM
Int * m_dequantCoef[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of dequantization matrix coefficient 4x4
Int m_sliceNsamples[LEVEL_RANGE+1]
static const Int SCALING_LIST_NUM
list number for quantization matrix
static Int getSigCtxInc(Int patternSigCtx, const TUEntropyCodingParameters &codingParameters, const Int scanPosition, const Int log2BlockWidth, const Int log2BlockHeight, const ChannelType chanType)
Void destroyScalingList()
Void setScalingList(TComScalingList *scalingList, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Double * m_errScale[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
Void setFlatScalingList(const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Defines version information, constants and small in-line functions.
Void setRDOQOffset(UInt uiRDOQOffset)
#define DEBUG_STRING_FN_DECLAREP(name)
estBitsSbacStruct * m_pcEstBitsSbac
static Void crossComponentPrediction(TComTU &rTu, const ComponentID compID, const Pel *piResiL, const Pel *piResiC, Pel *piResiT, const Int width, const Int height, const Int strideL, const Int strideC, const Int strideT, const Bool reverse)
__inline Double xGetICost(Double dRate) const
Void applyForwardRDPCM(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, const QpParam &cQP, TCoeff *pcCoeff, TCoeff &uiAbsSum, const RDPCMMode mode)
general YUV buffer class (header)
Bool m_useTransformSkipFast
QpParam(const Int qpy, const ChannelType chType, const Int qpBdOffset, const Int chromaQPOffset, const ChromaFormat chFmt)
Double m_sliceSumC[LEVEL_RANGE+1]
static const Int LEVEL_RANGE
G382: max coefficient level in statistics collection.
Void xQuant(TComTU &rTu, TCoeff *pSrc, TCoeff *pDes, TCoeff *pArlDes, TCoeff &uiAbsSum, const ComponentID compID, const QpParam &cQP)
Void xITransformSkip(TCoeff *plCoef, Pel *pResidual, UInt uiStride, TComTU &rTu, const ComponentID component)
Int * getDequantCoeff(UInt list, Int qp, UInt size)
get Quant Coefficent
__inline Int xGetICRate(const UInt uiAbsLevel, const UShort ui16CtxNumOne, const UShort ui16CtxNumAbs, const UShort ui16AbsGoRice, const UInt c1Idx, const UInt c2Idx, const Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange) const
#define NUM_ONE_FLAG_CTX
number of context models for greater than 1 flag
Int * getQuantCoeff(UInt list, Int qp, UInt size)
get Error Scale Coefficent
Void init(UInt uiMaxTrSize, Bool useRDOQ=false, Bool useRDOQTS=false, Bool useSelectiveRDOQ=false, Bool bEnc=false, Bool useTransformSkipFast=false, Bool bUseAdaptQpSelect=false)
Void setUseScalingList(Bool bUseScalingList)
get DeQuant Coefficent
Void xDeQuant(TComTU &rTu, const TCoeff *pSrc, TCoeff *pDes, const ComponentID compID, const QpParam &cQP)
static UInt getSigCoeffGroupCtxInc(const UInt *uiSigCoeffGroupFlag, const UInt uiCGPosX, const UInt uiCGPosY, const UInt widthInGroups, const UInt heightInGroups)
Void storeSliceQpNext(TComSlice *pcSlice)
Int Intermediate_Int
used as intermediate value in calculations
#define NUM_SIG_CG_FLAG_CTX
number of context models for MULTI_LEVEL_SIGNIFICANCE
Double & getErrScaleCoeffNoScalingList(UInt list, UInt size, Int qp)
get Error Scale Coefficent
Double * getErrScaleCoeff(UInt list, UInt size, Int qp)
Void transformSkipQuantOneSample(TComTU &rTu, const ComponentID compID, const TCoeff resiDiff, TCoeff *pcCoeff, const UInt uiPos, const QpParam &cQP, const Bool bUseHalfRoundingPoint)
Void invRdpcmNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride)
#define ADAPTIVE_QP_SELECTION
G382: Adaptive reconstruction levels, non-normative part for adaptive QP selection.
__inline Double xGetRateLast(const UInt uiPosX, const UInt uiPosY, const ComponentID component) const
Void processScalingListDec(const Int *coeff, Int *dequantcoeff, Int invQuantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc)
Bool m_scalingListEnabledFlag
Defines constants and tables for SBAC.
Int TCoeff
transform coefficient
Int * m_quantCoef[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
__inline Double xGetRateSigCoeffGroup(UShort uiSignificanceCoeffGroup, UShort ui16CtxNumSig) const
Void xSetScalingListEnc(TComScalingList *scalingList, UInt list, UInt size, Int qp)
ChromaFormat
chroma formats (according to semantics of chroma_format_idc)
__inline Double xGetRateSigCoef(UShort uiSignificance, UShort ui16CtxNumSig) const
#define NUM_QT_CBF_CTX_PER_SET
number of context models for QT CBF
Void signBitHidingHDQ(TCoeff *pQCoef, TCoeff *pCoef, TCoeff *deltaU, const TUEntropyCodingParameters &codingParameters, const Int maxLog2TrDynamicRange)
Bool getUseScalingList(const UInt width, const UInt height, const Bool isTransformSkip)
__inline Double xGetIEPRate() const
Void setErrScaleCoeff(UInt list, UInt size, Int qp, const Int maxLog2TrDynamicRange[MAX_NUM_CHANNEL_TYPE], const BitDepths &bitDepths)
Void rdpcmNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, const QpParam &cQP, TCoeff *pcCoeff, TCoeff &uiAbsSum, RDPCMMode &rdpcmMode)
Void invTrSkipDeQuantOneSample(TComTU &rTu, ComponentID compID, TCoeff pcCoeff, Pel &reconSample, const QpParam &cQP, UInt uiPos)
Void invTransformNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, TCoeff *pcCoeff, const QpParam &cQP)
__inline UInt xGetCodedLevel(Double &rd64CodedCost, Double &rd64CodedCost0, Double &rd64CodedCostSig, Intermediate_Int lLevelDouble, UInt uiMaxAbsLevel, UShort ui16CtxNumSig, UShort ui16CtxNumOne, UShort ui16CtxNumAbs, UShort ui16AbsGoRice, UInt c1Idx, UInt c2Idx, Int iQBits, Double errorScale, Bool bLast, Bool useLimitedPrefixLength, const Int maxLog2TrDynamicRange) const
#define NUM_ABS_FLAG_CTX
number of context models for greater than 2 flag
Void xTransformSkip(Pel *piBlkResi, UInt uiStride, TCoeff *psCoeff, TComTU &rTu, const ComponentID component)
Void selectLambda(const ComponentID compIdx)
Void processScalingListEnc(Int *coeff, Int *quantcoeff, Int quantScales, UInt height, UInt width, UInt ratio, Int sizuNum, UInt dc)
transform and quantization class
static Int calcPatternSigCtx(const UInt *sigCoeffGroupFlag, UInt uiCGPosX, UInt uiCGPosY, UInt widthInGroups, UInt heightInGroups)
Void xIT(const Int channelBitDepth, Bool useDST, TCoeff *plCoef, Pel *pResidual, UInt uiStride, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange)
Void xsetFlatScalingList(UInt list, UInt size, Int qp)
static const Int RExt__GOLOMB_RICE_ADAPTATION_STATISTICS_SETS
Void xRateDistOptQuant(TComTU &rTu, TCoeff *plSrcCoeff, TCoeff *piDstCoeff, TCoeff *piArlDstCoeff, TCoeff &uiAbsSum, const ComponentID compID, const QpParam &cQP)
Void invRecurTransformNxN(const ComponentID compID, TComYuv *pResidual, TComTU &rTu)
#define NUM_QT_CBF_CTX_SETS
CU data structure (header)
Void setScalingListDec(const TComScalingList &scalingList)
Void transformNxN(TComTU &rTu, const ComponentID compID, Pel *pcResidual, const UInt uiStride, TCoeff *rpcCoeff, TCoeff *rpcArlCoeff, TCoeff &uiAbsSum, const QpParam &cQP)
Double m_lambdas[MAX_NUM_COMPONENT]
#define NUM_SIG_FLAG_CTX
number of context models for sig flag
Void xSetScalingListDec(const TComScalingList &scalingList, UInt list, UInt size, Int qp)
Void xT(const Int channelBitDepth, Bool useDST, Pel *piBlkResi, UInt uiStride, TCoeff *psCoeff, Int iWidth, Int iHeight, const Int maxLog2TrDynamicRange)
Double m_errScaleNoScalingList[SCALING_LIST_SIZE_NUM][SCALING_LIST_NUM][SCALING_LIST_REM_NUM]
array of quantization matrix coefficient 4x4
Void setLambdas(const Double lambdas[MAX_NUM_COMPONENT])
static const Int LAST_SIGNIFICANT_GROUPS